Skip to content
Snippets Groups Projects
Commit 3fa7faa5 authored by Jonas Kvarnström's avatar Jonas Kvarnström
Browse files

Removed more files that are obsolete according to Tommy

parent 1424f5fe
No related branches found
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 files are in `waraps/screen`.
NOTICE: C-o \ does not kill the docker containers. If somebody finds out
how to solve this problem please let us know.
## Screen Based Approach
NOT ROBUST HANGING PROCESSES. Be aware of the possibility of hanging docker processes.
### Loading configuration 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 are 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
```
INFO IN PROGRESS OF BEING MOVED TO NOTEBOOK
Things needed to build a development docker image based on WARA PS base LRS image.
Also instructions how to run different units from a docker. This will
replace the setup we have had with virtual machines that Combitech
have used.
Will be used for more things in the future.
### Create Executors for DJI
Add
```bash
exec_dji roslaunch lrs_launch exec_part.launch ns:=/dji0 vehicle:=dji
```
### Create Needed Operator
```bash
wdb roslaunch lrs_launch wdb.launch vehicle:=op ns:=/op0
```
```bash
tst roslaunch lrs_launch tst_part ns:=/op0
```
```bash
exec_op roslaunch lrs_launch exec_part.launch ns:=/op0 vehicle:=op
```
## Running Sub Systems from Docker
WORK IN PROGRESS!
### Define a location
```bash
roslaunch lrs_launch location_granso.launch ns:=/dji0
```
### Scripts to start docker containers (and pull)
- base_dji
- dji_system
- wdb
### Dji Simulator with MPC Trajectory Controller
```bash
docker run \
--network host \
--security-opt apparmor:unconfined \
--ulimit nofile=1024 \
-e ROS_HOSTNAME=localhost \
--rm -it gitlab.liu.se:5000/lrs/waraps_docker_images/base-dji-minimal:v01 \
roslaunch lrs_dji_sim sim.launch dynamics:=true mpc:=true inair:=true ns:=/dji0 basic:=false
```
or
```bash
base_dji roslaunch lrs_dji_sim sim.launch dynamics:=true mpc:=true inair:=true ns:=/dji0 basic:=false gazebo:=true
```
### Create a LRS DJI
Add
```bash
dji_system roslaunch lrs_launch lrsdji.launch publish_pose:=false ns:=/dji0
```
### Create a WDB LRS DJI
Add
```bash
wdb roslaunch lrs_launch wdb.launch vehicle:=dji ns:=/dji0
```
### Create TST Factory for Execution Trees
Add
```
tst roslaunch lrs_launch tst_part.launch ns:=/dji0
```
### Create Executors for DJI
Add
```bash
exec_dji roslaunch lrs_launch exec_part.launch ns:=/dji0 vehicle:=dji
```
### Create Needed Operator
```bash
wdb roslaunch lrs_launch wdb.launch vehicle:=op ns:=/op0
```
```bash
tst roslaunch lrs_launch tst_part.launch ns:=/op0
```
```bash
exec_op roslaunch lrs_launch exec_part.launch ns:=/op0 vehicle:=op
```
### Putting it all together in two screens
## Running units from docker
Start docker with wrun or wgrun. Use wgrun ig you have NVIDIA graphics
working in dockers using the new method with the flag "--gpus".
### Running units on different computer
To start /op0, /djisim0, /djisim1, /pirayasim0 do:
```bash
wrun op 0
```
```bash
wrun djisim 0
```
```bash
wrun djisim 1
```
```bash
wrun pirayasim 0
```
### Running units on the same computer
here we just start one container and then used "docker exec" to get different shells.
Start the docker container:
```bash
wrun bash
```
Can be detached with C-p C-q.
To start /op0, /djisim0, /djisim1, /pirayasim0 do:
```bash
wexec
op 0
```
```bash
wexec
djisim 0
```
```bash
wexec
djisim 1
```
```bash
wexec
pirayasim 0
```
## User Specific Development Docker
THIS INFORMATION IS NOT YET COMPLETE! DO NOT USE!
### Build user specific development docker image
```bash
cd docker
./build
```
### Run the user specific developer image
```bash
cd docker
./run.sh ${HOME}/wara_docker_home
```
The run.sh script takes one argument and it is the directory that is mounted as home directory.
### Init files
You have to create your own init files.
To get access to the ROS-repos put:
```bash
source /opt/lrs_wara/wara_devel_ws/deve/setup.bash
```
in your .bashrc file.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment