Skip to content
Snippets Groups Projects
Commit 20ab9b70 authored by Tommy Persson's avatar Tommy Persson
Browse files

Work on doc.

parent a35dcdb1
Branches
No related tags found
No related merge requests found
BIG ISSUE: wexec STARTED IN SCREEN DO NOT DIE WHEN SCREEN KILLED WITH C-o \ y
Later you will use screen. Notice that the command key for screen is
here C-o. The screen file are in: waraps/screen
NOTICE: C-o \ do not kill the docker containers. If somebody find out
how to solve this problem pleae let us know.
## Screen Based Approach
NOT ROBUST HANGING PROCESSES. Be aware of the possibility of hanging docker processes.
### Loading configurtion launch files
For each agent you have to load a configuration file and that have to
be done before the screen for the agent is loaded. The arguments to
the config.launch file is location and ns.
Suppose we want to start unit /op0 and /dji0 in Gränsö then we do:
```bash
wexec roslaunch lrs_launch config.launch location:=granso ns:=/op0
wexec roslaunch lrs_launch config.launch location:=granso ns:=/dji0
```
We are not setting kdb to trues since the repo lrs_kdb_base_knowledge is not available.
### Start /op0 using a screen:
```bash
env NS=/op0 screen -c waraps/screen/screen_op
```
This will start the following scripts which starts docker containers:
```bash
wexec roslaunch lrs_launch wdb.launch vehicle:=op ns:=${NS}
wexec roslaunch lrs_launch tst_part.launch ns:=${NS}
wexec_system roslaunch lrs_launch exec_part.launch ns:=${NS}
wexec roslaunch lrs_launch exec_exec.launch ns:=${NS}
```
### Start /dji0 simulation using a screen:
```bash
env NS=/dji0 screen -c waraps/screen/screen_djisim
```
This will start the following scripts which starts docker containers:
```bash
wexec roslaunch lrs_dji_sim sim.launch dynamics:=true mpc:=true inair:=false ns:=/dji0 basic:=false gazebo:=true
wexec roslaunch lrs_launch lrsdji.launch publish_pose:=true ns:=${NS}
wexec roslaunch lrs_launch wdb.launch vehicle:=op ns:=${NS}
wexec roslaunch lrs_launch tst_part.launch ns:=${NS}
wexec roslaunch lrs_launch exec_part.launch ns:=${NS}
wexec roslaunch lrs_launch exec_exec.launch ns:=${NS}
wexec roslaunch lrs_launch exec_vehicle.launch vehicle:=dji ns:=${NS}
```
### Test the two running screens
On the local machine do:
Watch the pose:
```bash
rostopic echo /dji0/pose
```
Takeoff
```bash
wexec rosrun lrs_tst tstcommand.py --takeoff --exec __ns:=/dji0
```
Flyto
```bash
wexec rosrun lrs_tst tstcommand.py --fly -x 100 -y 100 -z 12 --speed 3 --exec __ns:=/dji0
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment