jeguzzi / robomaster_ros

ROS2 for DJI Robomaster EP and S1
https://jeguzzi.github.io/robomaster_ros
MIT License
49 stars 10 forks source link

How to visualize the EP robot model in rviz/gazebo? #1

Closed xander-2077 closed 1 year ago

xander-2077 commented 1 year ago

Dear author, I have found the robomaster_description folder and xacro models of EP/S1 robot in your project, but I have not found any launch files that could open visualization nodes in robomaster_ros folder. If I need to visualize the actions of multiple EP robots in rviz/gazebo, how should I set them? Hope to get your reply, thank you!

jeguzzi commented 1 year ago

The repository does not support simulating the robots in Gazebo. You would need to write a Gazebo plug-in for that.

To visualize multiple real robots in rviz, you can:

  1. connect all robots to the same network
  2. launch one driver for each robot with separate namespaces, e.g. ros2 launch robomaster_ros main.launch name:=rm1 serial_number:=XXXXXX and ros2 launch robomaster_ros main.launch name:=rm2 serial_number:=YYYYYYY
  3. in rviz2, add multiple RobotModel, settings the namespace for each of them (e.g. rm1 and rm2)
xander-2077 commented 1 year ago

Thank you so much for your exact reply, this is really helpful!