jeguzzi / robomaster_ros

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

About the robomasterEP model #6

Closed des-zhong closed 4 months ago

des-zhong commented 10 months ago

I load the model of the provided robomasterEP in gazebo but it seems like the arm part are not well connected like shown in the fig. I examined the arm.urdf.xacro file and find only 1 joint defined about the triangle_link and arm_1_link while there should be 3. Why and how to fix this? Screenshot 2023-11-14 20:19:03

jeguzzi commented 10 months ago

The arm has a parallel kinematics (i.e., it has closed kinematics chains). The URDF format does not support closed kinematics chains: when you import the model in Gazebo, two joints are detached. To simulate the arm in Gazebo you need to write a plugin to keep the chains closed by setting the value of one of their joints (or by applying the appropriate torque). I never tried simulating closed chains in Gazebo. I suggest to look for references.

I do simulate the RoboMaster arm in CoppeliaSim. You may want to have a look (https://github.com/jeguzzi/robomaster_sim) and try to mimic it in Gazebo.

des-zhong commented 7 months ago

Thank you for you answer, it helped me a lot! Also can you tell me where to find the doc about the relationship between joint names in the urdf/xacro file (like "right_gripper_joint_2") and the joints on the real robot. I'm having trouble connecting them.

jeguzzi commented 5 months ago

Hi @des-zhong, sorry for the delay.

I think that the easiest may be to look at the model in rviz2:

  1. launch the driver
  2. launch rviz2
  3. add a model in rviz2 subscribing to <name>/robot_description

In rviz2, you can then inspect the TF tree and/or the model and see the names of the joints. You could also use https://index.ros.org/p/joint_state_publisher_gui/ to move the joints.

des-zhong commented 4 months ago

Thank you for your kind instruction! I'm working on a robomaster and Isaacgym reinforcement learning environment and this repo really helped me alot. I will cite this repo if anything get published