赞
踩
以下镜像包含了ros的moveit、novnc、CAN通讯,并且可以web操作界面:
19900617/ros-moveit-rviz-gazebo:noetic
docker-compose.yml配置文件如下:
- version: '3'
-
- services:
- ros:
- container_name: ros
- image: 19900617/ros-moveit-rviz-gazebo:noetic
- entrypoint: ["bash", "-c"]
- command: /root/start.sh
- stdin_open: true
- privileged: true
- tty: true
- environment:
- - DISPLAY=vnc:0.0
- ports:
- - '9000:9000'
- devices:
- - /dev/bus/usb:/dev/bus/usb
- volumes:
- - /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/localtime
- networks:
- - ros-net
-
- vnc:
- container_name: vnc
- image: theasp/novnc:latest
- shm_size: "4g"
- ports:
- - '6080:8080'
- environment:
- - TZ=Asia/Shanghai
- - RUN_XTERM=no
- - DISPLAY_WIDTH=1920
- - DISPLAY_HEIGHT=1080
- networks:
- - ros-net
-
- networks:
- ros-net:
1. start.sh文件信息如下
- #!/bin/bash
- echo "Load Ros ENV!"
- source /opt/ros/noetic/setup.bash
- roscore
- if [! -d "/root/catkin_ws/src" ];then
- mkdir -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已支持,直接拉取镜像即可;
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。