Files to create docker with ROS Melodic and ZED ROS Wrapper
To Build Docker Image:
chmod +x build-ros-desktop-image.sh
bash build-ros-desktop-image.sh
To Run Docker for the First Time:
xhost +si:localuser:root
(only if it's not running on the robot)docker run -it --runtime nvidia --privileged -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix 3.7-ros-gl-devel-cuda11.4-ubuntu20.04
(may add--net=host
flag for communication between docker and jackal)
To Re-enter Docker Container After the First Time (with Existing container):
docker start (docker container's name)
docker exec -it (docker container's name) bash
Following procedure are required in every new terminal for docker container
Once Enter the Docker Container, you should see:
root@(docker container ID):/opt/ros_ws#
Then Run: (in every terminal)
source devel/setup.bash
Open a New Terminal entering Jackal, Run:
2. ifconfig
to obtain inet address under docker0 # For Example, 172.17.0.1
Then Go Back to Docker Container, Run:
3. export ROS_Master_URI=http://172.17.0.1:11311/
# Replace 172.17.0.1 with inet address
To Run in Docker:
roslaunch zed_rtab_example zed_rtabmap.launch
- Wait 5 seconds before moving camera for initialization
roslaunch zed_wrapper zed2.launch
cd /opt/ros_ws/mdp_cv/
python3 inf_class.py
cd /opt/ros_ws/cv-low-level
python3 hotdog.py
rosbag record rosout tf zed/mapPath zed/zed_node/pose zed/map zed/zed_node/rgb/image_rect_color cv_nav/road_percentage/forward cv_nav/road_percentage/rotateLeft cv_nav/road_percentage/rotateRight