diff --git a/README.md b/README.md index 92a518a7df852c31d8d6717a46fe36c8e5d1c53b..c2d07ac393a20c1412d6c630fac7746cbf832d22 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,14 @@ export WORLD_ORIGIN_LON=16.6827607783 export WORLD_ORIGIN_ELEVATION=29.8 ``` -The scren file are in: /home/tompe/docker/waraps/screen +The screen file are in: /home/tompe/docker/waraps/screen + +NOTICE: C-o \ do not kill the docker containers. + +To stop the running containers do: +```bash +docker stop $(docker container ls -q) +``` ## Start System Using Only Dockers but use a local ROS Core @@ -44,15 +51,47 @@ gazebo roslaunch lrs_wara_gazebo dji_to_gazebo.launch name:=dji0 with_laser:=tru ``` ### 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 +wdb roslaunch lrs_launch wdb.launch vehicle:=op ns:=${NS} +tst roslaunch lrs_launch tst_part.launch ns:=${NS} +exec_system roslaunch lrs_launch exec_part.launch ns:=${NS} +``` + ### Start /dji0 simulation using a screen: + ```bash -env NS=/op0 screen -c waraps/screen/screen_djisim +env NS=/dji0 screen -c waraps/screen/screen_djisim ``` +This will start the following scripts which starts docker containers: +```bash +base_dji roslaunch lrs_dji_sim sim.launch dynamics:=true mpc:=true inair:=true ns:=/dji0 basic:=false gazebo:=true +dji_system roslaunch lrs_launch lrsdji.launch publish_pose:=true ns:=${NS} +wdb roslaunch lrs_launch wdb.launch vehicle:=op ns:=${NS} +tst roslaunch lrs_launch tst_part.launch ns:=${NS} +exec_system roslaunch lrs_launch exec_part.launch ns:=${NS} +exec_dji roslaunch lrs_launch exec_vehicle.launch vehicle:=dji ns:=${NS} +``` + +### Test the tqo running screens + +Takeoff +```bash +tst rosrun lrs_tst tstcommand.py --takeoff -x 100 -y 100 -z 12 --speed 7 --exec __ns:=/dji0 +``` + +Flyto +```bash +tst rosrun lrs_tst tstcommand.py --fly -x 100 -y 100 -z 12 --speed 3 --exec __ns:=/dji0 +``` + + ### Basic Simulator ```bash diff --git a/script/exec_system b/script/exec_system index f1587f58d16b919b7cc101c792d91f6681f4767b..5f30421f5108ed9e9d9e82bda47b83fc4d29f0ea 100755 --- a/script/exec_system +++ b/script/exec_system @@ -1,13 +1,13 @@ #!/bin/bash -tag=gitlab.liu.se:5000/lrs/waraps_docker_images/exec-minimal:v01 +tag=gitlab.liu.se:5000/lrs/waraps_docker_images/exec-exec-minimal:v01 if [ $1 = "pull" ]; then docker pull $tag exit 0 fi -docker run \ +exec docker run \ --network host \ --security-opt apparmor:unconfined \ --ulimit nofile=1024 \ diff --git a/script/gazebo b/script/gazebo new file mode 100755 index 0000000000000000000000000000000000000000..5a89ba1eeb79e823aba06332df465d2c6c3f2357 --- /dev/null +++ b/script/gazebo @@ -0,0 +1,18 @@ +#!/bin/bash + +tag=gitlab.liu.se:5000/lrs/waraps_docker_images/gazebo-minimal:v01 + +if [ $1 = "pull" ]; then + docker pull $tag + exit 0 +fi + +docker run --gpus all \ + --network host \ + --security-opt apparmor:unconfined \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix${DISPLAY} \ + --ulimit nofile=1024 \ + -e ROS_HOSTNAME=localhost \ + --rm -it ${tag} "$@" + diff --git a/script/tst b/script/tst index 8207de8c163688a0ea0550999a8f80ddb6de5805..b16e4cf3f14b99eec1a4f837e10340e2e7cffc2d 100755 --- a/script/tst +++ b/script/tst @@ -7,7 +7,7 @@ if [ $1 = "pull" ]; then exit 0 fi -docker run \ +exec docker run \ --network host \ --security-opt apparmor:unconfined \ --ulimit nofile=1024 \ diff --git a/script/wdb b/script/wdb index 9c03e6bcd6b63a27914294c64182d326309a416a..5bdd4f075d23f84f031f21971c5353f46bfec91b 100755 --- a/script/wdb +++ b/script/wdb @@ -7,7 +7,7 @@ if [ $1 = "pull" ]; then exit 0 fi -docker run \ +exec docker run \ --network host \ --security-opt apparmor:unconfined \ --ulimit nofile=1024 \