Recommendation for proper way to export URDF from the CAD model

103 Views Asked by At

currently I have the 3D model of quadruped robot in solidworks that I would like to export to urdf file and control it by using ros2 control.

But for some reason, I tried the urdf exporter of the solidworks and it did not generate the urdf file correctly. The result is that when the robot spawn in the Gazebo the robot bounces a lot and disappear to nowhere. Moreover, the robot exploded at some point. When I take a look into the the physic properties of the urdf, it looks weird. For example, the incorrect mass value and weird inertia value. Does anyone suffer with this situation?, and also I would like to know the suggestion from someone who has been success on gerating the proper urdf file from the 3d CAD model.

Currently, I used ros2 foxy with gazebo ver 11

the image from my Gazebo

1

There are 1 best solutions below

0
On

UPDATED: The config file for ros2 control JTC controller for my robot is using position command interface and when I tried to test with humble version which the effort command interface is available. Everything was solved if you chang it to effort. I'm not sure if this is the solution or not.

position_trajectory_controller:
  ros__parameters:
    joints:
      - j_c1_rf
      - j_thigh_rf
      - j_tibia_rf

    command_interfaces:
      - effort

    state_interfaces:
      - position
      - velocity

    state_publish_rate: 50.0 # Hz, Defaults to 50
    action_monitor_rate: 20.0 # Hz, Defaults to 20

    allow_partial_joints_goal: false # Defaults to false
    open_loop_control: true
    allow_integration_in_goal_trajectories: true
    constraints:
      stopped_velocity_tolerance: 0.01 # Defaults to 0.01
      goal_time: 0.0 # Defaults to 0.0 (start immediately)