From f3d9bdd004ddea81f0b12d7c9797621a4ebcf54b Mon Sep 17 00:00:00 2001 From: Tommy Persson <tommmy.persson@liu.se> Date: Tue, 22 Sep 2020 14:14:04 +0200 Subject: [PATCH] Work on doc. --- doc/local_ros_installation.md | 86 +---------------------------------- script/wdb | 2 +- script/wgrun | 2 +- script/wpull | 2 +- script/wrun | 2 +- 5 files changed, 5 insertions(+), 89 deletions(-) diff --git a/doc/local_ros_installation.md b/doc/local_ros_installation.md index 2a3a042..0285c25 100644 --- a/doc/local_ros_installation.md +++ b/doc/local_ros_installation.md @@ -1,7 +1,5 @@ # Local ROS Installation and LRS -BIG ISSUE: wexec STARTED IN SCREEN DO NOT DIE WHEN SCREEN KILLED WITH C-o \ y - Here we descripe how to use a local ROS installation and interface with the LRS Modules available through docker. The intention is that this should be enough for a person knowledgeable about ROS to start @@ -26,12 +24,6 @@ export WORLD_ORIGIN_LON=16.6827607783 export WORLD_ORIGIN_ELEVATION=29.8 ``` -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. - If you have gotten a lot of running containers that interfere with each other you can stop allrunning containers with: @@ -125,16 +117,11 @@ Load the dji model in gazebo: wexec roslaunch lrs_wara_gazebo dji_to_gazebo.launch name:=dji0 with_laser:=true x:=0 ``` -### op 0 - -```bash -wexec roslaunch lrs_launch op.launch ns:=/op0 -``` ### dji 0 ```bash -wexec roslaunch lrs_launch djisim.launch kdb:=false use_airspace_booking:=false ns:=/dji0 +wexec roslaunch lrs_launch djisimtst.launch kdb:=false use_airspace_booking:=false ns:=/dji0 ``` ### Start tstdisplayserver @@ -165,74 +152,3 @@ wexec rosrun lrs_tst tstcommand.py --fly -x 100 -y 100 -z 12 --speed 3 --exec __ ``` -## 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 -``` - - diff --git a/script/wdb b/script/wdb index 921541d..9e9e97a 100755 --- a/script/wdb +++ b/script/wdb @@ -1,6 +1,6 @@ #!/bin/bash -tag=gitlab.liu.se:5000/lrs/waraps_docker_images/wdb-minimal:latest +tag=gitlab.liu.se:5000/lrs/waraps_docker_images/wdb-minimal:devel if [ $1 = "pull" ]; then docker pull $tag diff --git a/script/wgrun b/script/wgrun index 189af24..d3a4398 100755 --- a/script/wgrun +++ b/script/wgrun @@ -8,5 +8,5 @@ docker run --gpus all \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e DISPLAY=unix${DISPLAY}\ -e ROS_HOSTNAME=localhost \ - --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:latest "$@" + --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel "$@" diff --git a/script/wpull b/script/wpull index 01e1a20..72985dd 100755 --- a/script/wpull +++ b/script/wpull @@ -1,4 +1,4 @@ #!/bin/bash -docker pull gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:latest +docker pull gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel diff --git a/script/wrun b/script/wrun index 555e922..e0f5b97 100755 --- a/script/wrun +++ b/script/wrun @@ -7,4 +7,4 @@ docker run \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e DISPLAY=unix${DISPLAY}\ -e ROS_HOSTNAME=localhost \ - --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:latest "$@" + --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel "$@" -- GitLab