UniversalRobots / Universal_Robots_ROS2_GZ_Simulation

BSD 3-Clause "New" or "Revised" License
30 stars 14 forks source link

loadRobotModel problem in Humble #40

Closed YeisonGonzalez closed 4 months ago

YeisonGonzalez commented 4 months ago

I'm trying to run the moveit example in the library but I keep getting this error, In Humble with Ubuntu 22.04.4 LTS:


[ruby $(which ign) gazebo-5] [INFO] [1720076654.997991583] [resource_manager]: Initialize hardware 'ur' 
[ruby $(which ign) gazebo-5] [WARN] [1720076654.998024231] [gz_ros2_control]: On init...
[ruby $(which ign) gazebo-5] [INFO] [1720076654.998133838] [resource_manager]: Successful initialization of hardware 'ur'
[ruby $(which ign) gazebo-5] [INFO] [1720076654.998292894] [resource_manager]: 'configure' hardware 'ur' 
[ruby $(which ign) gazebo-5] [INFO] [1720076654.998305048] [gz_ros2_control]: System Successfully configured!
[ruby $(which ign) gazebo-5] [INFO] [1720076654.998330352] [resource_manager]: Successful 'configure' of hardware 'ur'
[ruby $(which ign) gazebo-5] [INFO] [1720076654.998354196] [resource_manager]: 'activate' hardware 'ur' 
[ruby $(which ign) gazebo-5] [INFO] [1720076654.998368019] [resource_manager]: Successful 'activate' of hardware 'ur'
[ruby $(which ign) gazebo-5] [INFO] [1720076654.998383251] [gz_ros2_control]: Loading controller_manager
[ruby $(which ign) gazebo-5] [Wrn] [Component.hh:144] Trying to serialize component with data type [N3sdf3v125WorldE], which doesn't have `operator<<`. Component will not be serialized.
[ruby $(which ign) gazebo-5] [WARN] [1720076655.027557932] [gz_ros2_control]:  Desired controller update period (0.002 s) is slower than the gazebo simulation period (0.001 s).
[ruby $(which ign) gazebo-5] [GUI] [Wrn] [Component.hh:189] Trying to deserialize component with data type [N3sdf3v125WorldE], which doesn't have `operator>>`. Component will not be deserialized.
[ruby $(which ign) gazebo-5] [INFO] [1720076655.105434778] [controller_manager]: Loading controller 'joint_state_broadcaster'
[spawner-2] [INFO] [1720076655.111018989] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ruby $(which ign) gazebo-5] [INFO] [1720076655.111732892] [controller_manager]: Configuring controller 'joint_state_broadcaster'
[ruby $(which ign) gazebo-5] [INFO] [1720076655.111798736] [joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[spawner-2] [INFO] [1720076655.118961317] [spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[ruby $(which ign) gazebo-5] [INFO] [1720076655.160750102] [controller_manager]: Loading controller 'joint_trajectory_controller'
[ruby $(which ign) gazebo-5] [WARN] [1720076655.168406831] [joint_trajectory_controller]: [Deprecated]: "allow_nonzero_velocity_at_trajectory_end" is set to true. The default behavior will change to false.
[spawner-3] [INFO] [1720076655.170471652] [spawner_joint_trajectory_controller]: Loaded joint_trajectory_controller
[ruby $(which ign) gazebo-5] [INFO] [1720076655.170982521] [controller_manager]: Configuring controller 'joint_trajectory_controller'
[ruby $(which ign) gazebo-5] [INFO] [1720076655.171060808] [joint_trajectory_controller]: No specific joint names are used for command interfaces. Using 'joints' parameter.
[ruby $(which ign) gazebo-5] [INFO] [1720076655.171070174] [joint_trajectory_controller]: Command interfaces are [position] and state interfaces are [position velocity].
[ruby $(which ign) gazebo-5] [INFO] [1720076655.171076350] [joint_trajectory_controller]: Using 'splines' interpolation method.
[ruby $(which ign) gazebo-5] [INFO] [1720076655.171593799] [joint_trajectory_controller]: Controller state will be published at 100.00 Hz.
[ruby $(which ign) gazebo-5] [INFO] [1720076655.172184573] [joint_trajectory_controller]: Action status changes will be monitored at 20.00 Hz.
[spawner-3] [INFO] [1720076655.180362841] [spawner_joint_trajectory_controller]: Configured and activated joint_trajectory_controller
[INFO] [spawner-2]: process has finished cleanly [pid 10290]
[INFO] [spawner-3]: process has finished cleanly [pid 10292]
[rviz2-7] [ERROR] [1720076655.836477238] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available
[rviz2-7] [INFO] [1720076655.854336263] [moveit_ros_visualization.motion_planning_frame]: MoveGroup namespace changed: / -> . Reloading params.
[rviz2-7] [INFO] [1720076655.898461867] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.00160471 seconds
[rviz2-7] [INFO] [1720076655.898499663] [moveit_robot_model.robot_model]: Loading robot model 'ur'...
[rviz2-7] [INFO] [1720076655.898508455] [moveit_robot_model.robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint
[rviz2-7] [ERROR] [1720076655.905705312] [moveit_background_processing.background_processing]: Exception caught while processing action 'loadRobotModel': parameter 'robot_description_planning.joint_limits.shoulder_pan_joint.max_acceleration' has invalid type: Wrong parameter type, parameter {robot_description_planning.joint_limits.shoulder_pan_joint.max_acceleration} is of type {double}, setting it to {string} is not allowed.

I have checked the file joint_limits.yaml:

joint_limits:
  shoulder_pan_joint:
    has_acceleration_limits: true
    max_acceleration: 5.0
  shoulder_lift_joint:
    has_acceleration_limits: true
    max_acceleration: 5.0
  elbow_joint:
    has_acceleration_limits: true
    max_acceleration: 5.0
  wrist_1_joint:
    has_acceleration_limits: true
    max_acceleration: 5.0
  wrist_2_joint:
    has_acceleration_limits: false
    max_acceleration: 5.0
  wrist_3_joint:
    has_acceleration_limits: false
    max_acceleration: 5.0

And I don't see how it woul be interpreted as a double, maybe I'm forgetting something. And this cause that I don't see any model in RViz

fmauch commented 4 months ago

Thank you for reaching out. I assume, that you are using a locale where "," is the decimal delimiter instead of ".". This is currently not supported by MoveIt!, see https://github.com/moveit/moveit2/issues/1882.

You can get things running by adding a "LC_ALL=C" in front of your call:

LC_ALL=C ros2 launch ur_simulation_gz ur_sim_moveit.launch.py
YeisonGonzalez commented 4 months ago

Thanks a lot, that has worked.