robomaster_ros icon indicating copy to clipboard operation
robomaster_ros copied to clipboard

host cannot communicate with container

Open UserName-wang opened this issue 6 months ago • 3 comments

Hi, I started the container via command: sudo docker compose up I tried to use rqt (and rqt_graph) to monitor the topics published in container. and rqt can list out the topics in container but cannot print out the topic content. but rqt_grahp cannot find the nodes created in container. and RVIZ2 also cannot subscribe the image from S1. ROS_DOMAIN_ID were set to the same number both in container and host. Are there any other settings should be done before connect to S1 in container? I think it could be easy to correct the settings. thank you for any suggestions.

the yaml file: version: '3' services: driver: image: jeguzzi/robomaster_ros:humble build: context: .. dockerfile: Dockerfile network_mode: host environment: - ROS_DOMAIN_ID=1
command: ros2 launch robomaster_ros main.launch model:=s1 chassis_twist_to_wheel_speeds:=true gimbal_mode:=0 chassis_timeout:=1.0

log information print out in terminal: sudo docker compose up [sudo] password for orin: WARN[0000] Found orphan containers ([s1-teleop-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. [+] Running 1/0 ✔ Container s1-driver-1 Created 0.0s Attaching to driver-1 driver-1 | [INFO] [launch]: All log files can be found below /root/.ros/log/2024-02-24-03-33-28-258386-orin-agx-1 driver-1 | [INFO] [launch]: Default logging verbosity is set to INFO driver-1 | [INFO] [robomaster_driver-1]: process started with pid [64] driver-1 | [INFO] [robot_state_publisher-2]: process started with pid [66] driver-1 | [INFO] [joint_state_publisher-3]: process started with pid [68] driver-1 | [robot_state_publisher-2] Warning: link 'speaker_link' material 'Material #32.001' undefined. driver-1 | [robot_state_publisher-2] at line 84 in /ros_ws/src/urdfdom/urdf_parser/src/model.cpp driver-1 | [robot_state_publisher-2] Warning: link 'speaker_link' material 'Material #32.001' undefined. driver-1 | [robot_state_publisher-2] at line 84 in /ros_ws/src/urdfdom/urdf_parser/src/model.cpp driver-1 | [robomaster_driver-1] [INFO] [1708745610.117109422] [robomaster]: Waiting for a robot driver-1 | [robomaster_driver-1] [INFO] [1708745610.122266496] [robomaster]: Found a robot driver-1 | [robomaster_driver-1] [INFO] [1708745610.123151966] [robomaster]: Try to connect via sta to robot with sn None driver-1 | [robomaster_driver-1] [INFO] [1708745610.843849004] [robomaster]: Connected driver-1 | [robomaster_driver-1] [INFO] [1708745610.960670140] [robomaster]: [Chassis] Topic cmd_vel will control wheel speeds driver-1 | [robomaster_driver-1] [INFO] [1708745611.204520034] [robomaster]: Set initial robot mode to free driver-1 | [robomaster_driver-1] [INFO] [1708745611.277636644] [robomaster]: Enabled modules: Battery, Camera, Chassis, LED, Speaker, Gimbal, Blaster driver-1 | [robomaster_driver-1] [INFO] [1708745612.112190250] [robomaster]: [Camera] Started video stream with resolution 360p

UserName-wang avatar Feb 24 '24 03:02 UserName-wang