jeguzzi / robomaster_ros

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

URDF for Isaac Gym #14

Closed xander-2077 closed 2 months ago

xander-2077 commented 3 months ago

Hello, jeguzzi! Because the speed of Gazebo simulation is too slow, I'm working to transfer the robomaster model to Issac Gym environment, which uses ROS plugin to export URDF from XACRO files that this repo provides. But something went wrong when I imported URDF to it. I wonder if you can provide the corresponding raw URDF file or you have already deployed robomaster in Isaac Gym? Thank you!

jeguzzi commented 2 months ago

Hi @xander-2077 , sorry for the delay.

To get the URDF you can use xacro, similarly to what we do in the launch file at line 25: https://github.com/jeguzzi/robomaster_ros/blob/main/robomaster_description/launch/model.launch.py#L25 or, with the CLI

ros2 run xacro xacro `ros2 pkg prefix robomaster_description --share`/urdf/robomaster_ep.urdf.xacro name:=my_name ...

Depending on the robot model, it may not be trivial to import it correctly. If you want to simulate the arm, which has a closed-loop parallel kinematics, you need somehow to close the loop, which is something not supported by URDF files. In fact, joint rod_3_joint has a degree of freedom in the URDF but in the real robot, its position depends on the motor joints. In the driver, this is accounted for in https://github.com/jeguzzi/robomaster_ros/blob/main/robomaster_ros/robomaster_ros/modules/arm.py#L40.

So, your simulation should support closed-loop kinematics. I don't have experience with ISAAC Gym, but we do offer a simulation for the robomaster that may be of help for you. Take a look at https://github.com/jeguzzi/robomaster_sim. It is based on CoppeliaSim, which offers similar features as Gazebo (ROS binding, plugins, ...) and some more. You can run CoppeliaSim offline from Python too, although it will use IPC, so you may have significant costs.

Let me know if you need further help.

xander-2077 commented 2 months ago

Thank you for your help! I've solved this problem! Your guidance means a lot to me!