diff --git a/doc/local_ros_installation.md b/doc/local_ros_installation.md index 35d915c12e29c598af2b7a546eba1eebd50722c3..aeefee37c2a24c7865e7acf596a552b4aece6852 100644 --- a/doc/local_ros_installation.md +++ b/doc/local_ros_installation.md @@ -61,13 +61,31 @@ Start a docker container named waradevel and run the commands there. Use this if ```bash #!/bin/bash +if [[ $(lsb_release -rs) == "18.04" ]]; then docker run --gpus all \ --network host \ + --security-opt apparmor:unconfined \ --ulimit nofile=1024 \ + --ipc=host \ -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v /tmp:/exttmp \ -e DISPLAY=unix${DISPLAY}\ -e ROS_HOSTNAME=localhost \ - --rm -it --name wara 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 "$@" +fi + +if [[ $(lsb_release -rs) == "20.04" ]]; then +docker run --gpus all \ + --network host \ + --security-opt apparmor:unconfined \ + --ulimit nofile=1024 \ + --ipc=host \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v /tmp:/exttmp \ + -e DISPLAY=unix${DISPLAY}\ + -e ROS_HOSTNAME=localhost \ + --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-noetic:devel "$@" +fi ``` @@ -77,13 +95,29 @@ Start a docker container named waradevel and run the command there. Use if you d ```bash #!/bin/bash +if [[ $(lsb_release -rs) == "18.04" ]]; then docker run \ --network host \ --ulimit nofile=1024 \ + --ipc=host \ -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v /tmp:/exttmp \ -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 "$@" +fi + +if [[ $(lsb_release -rs) == "20.04" ]]; then +docker run \ + --network host \ + --ulimit nofile=1024 \ + --ipc=host \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v /tmp:/exttmp \ + -e DISPLAY=unix${DISPLAY}\ + -e ROS_HOSTNAME=localhost \ + --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-noetic:devel "$@" +fi ``` @@ -93,7 +127,15 @@ Pull the image. ```bash #!/bin/bash -docker pull gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:latest +if [[ $(lsb_release -rs) == "18.04" ]]; then + echo "Pulling gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel" + docker pull gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel +fi + +if [[ $(lsb_release -rs) == "20.04" ]]; then + echo "Pulling gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-noetic:devel" + docker pull gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-noetic:devel +fi ``` ## How to start different parts @@ -147,6 +189,11 @@ wexec rosrun lrs_util_tst tstdisplayserver.py __ns:=/dji0 ### RVIZ +The 18.04 instructions kind of work in 20.04 but the background image +do now work. Will add instructions later how to get this to work in 20.04. + +#### Ubuntu 18.04 with ROS Melodic + Gränsö: ```bash wexec roslaunch lrs_dji_sim rviz_granso.launch @@ -156,6 +203,9 @@ Geneneral, uses the location given to config. Currently only Gränsö ortho phot ```bash wexec roslaunch lrs_launch rviz_outside.launch ``` +#### Ubuntu 20.04 with ROS Melodic + +TO BE WRITTEN ### Test the dji0 @@ -247,9 +297,3 @@ In the docker run wexec roslaunch lrs_launch djisimtst.launch simulator:=false ns:=/dji0 ``` -### Issues - -If the local machine is Ubuntu 20.04 and running ROS noetic there will -be a possible mismatch in message checksums compared to melodic -running in the docker. Most things seems to work. Docker images for -noetic will be coming soon. diff --git a/script/wgrun b/script/wgrun index 507a8f0f47c3168c363b0c88fa5635fbdd5bdf1a..dedc95649909c313deeeab2fe7085ca47bf441b9 100755 --- a/script/wgrun +++ b/script/wgrun @@ -1,5 +1,6 @@ #!/bin/bash +if [[ $(lsb_release -rs) == "18.04" ]]; then docker run --gpus all \ --network host \ --security-opt apparmor:unconfined \ @@ -10,4 +11,17 @@ docker run --gpus all \ -e DISPLAY=unix${DISPLAY}\ -e ROS_HOSTNAME=localhost \ --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel "$@" +fi +if [[ $(lsb_release -rs) == "20.04" ]]; then +docker run --gpus all \ + --network host \ + --security-opt apparmor:unconfined \ + --ulimit nofile=1024 \ + --ipc=host \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v /tmp:/exttmp \ + -e DISPLAY=unix${DISPLAY}\ + -e ROS_HOSTNAME=localhost \ + --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-noetic:devel "$@" +fi diff --git a/script/wpull b/script/wpull index 72985dd648295612c2683ec096f57b5c3658b90e..85f71491a7fb55d1618f2eba7f346cc14f818483 100755 --- a/script/wpull +++ b/script/wpull @@ -1,4 +1,13 @@ #!/bin/bash -docker pull gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel +if [[ $(lsb_release -rs) == "18.04" ]]; then + echo "Pulling gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel" + docker pull gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel +fi + +if [[ $(lsb_release -rs) == "20.04" ]]; then + echo "Pulling gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-noetic:devel" + docker pull gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-noetic:devel +fi + diff --git a/script/wrun b/script/wrun index ce6c61bdb99405ee4630e7f8ec7276de594df4d4..61902c5f2c11e96a8e9420ae34b4aab891d90ba8 100755 --- a/script/wrun +++ b/script/wrun @@ -1,5 +1,6 @@ #!/bin/bash +if [[ $(lsb_release -rs) == "18.04" ]]; then docker run \ --network host \ --ulimit nofile=1024 \ @@ -9,3 +10,16 @@ docker run \ -e DISPLAY=unix${DISPLAY}\ -e ROS_HOSTNAME=localhost \ --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-melodic:devel "$@" +fi + +if [[ $(lsb_release -rs) == "20.04" ]]; then +docker run \ + --network host \ + --ulimit nofile=1024 \ + --ipc=host \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v /tmp:/exttmp \ + -e DISPLAY=unix${DISPLAY}\ + -e ROS_HOSTNAME=localhost \ + --rm -it --name waradevel gitlab.liu.se:5000/lrs/waraps_docker_images/waraps-noetic:devel "$@" +fi