以下镜像包含了ros的moveit、novnc、CAN通讯,并且可以web操作界面:
19900617/ros-moveit-rviz-gazebo:noetic
docker-compose.yml配置文件如下:
version: '3'services:ros:container_name: rosimage: 19900617/ros-moveit-rviz-gazebo:noeticentrypoint: ["bash", "-c"]command: /root/start.shstdin_open: trueprivileged: truetty: trueenvironment:- DISPLAY=vnc:0.0ports:- '9000:9000'devices:- /dev/bus/usb:/dev/bus/usbvolumes:- /etc/udev/rules.d:/etc/udev/rules.d- /dev/bus/usb:/dev/bus/usb- ./.bashrc:/root/.bashrc- ./src:/root/catkin_ws/src- ./build.sh:/root/catkin_ws/build.sh- ./start.sh:/root/start.sh- ~/.pip/pip.conf:/root/.pip/pip.conf- ./logs:/root/.ros/log/- /etc/localtime:/etc/localtimenetworks:- ros-netvnc:container_name: vncimage: theasp/novnc:latestshm_size: "4g" ports:- '6080:8080'environment:- TZ=Asia/Shanghai- RUN_XTERM=no- DISPLAY_WIDTH=1920- DISPLAY_HEIGHT=1080networks:- ros-netnetworks:ros-net:
1. start.sh文件信息如下
#!/bin/bash
echo "Load Ros ENV!"
source /opt/ros/noetic/setup.bash
roscore
if [! -d "/root/catkin_ws/src" ];thenmkdir -p ~/catkin_ws/src
fi
也可以修改docker-compose中的command处,变更为: roscore&; 但是默认没有加载了ros的基础环境。需要执行: source /opt/ros/noetic/setup.bash 才可以;
2. .bashrc文件中的信息如下, 启动roslaunch, 也可以手动启动:
roslaunch web web.launch
roslaunch can_node can.launch
roslaunch kafka_bridge kafka.launch
3. docker-compose映射了宿主机的usb的CAN通讯操作。 目前周立功的CAN已支持,直接拉取镜像即可;