ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

MoveIt!2 UR Driver: Parameter has invalid type

asked 2021-12-20 01:40:43 -0500

FlorianSp gravatar image

I have built ROS2 Galactic, Moveit2 and Main Branch of UR Driver https://github.com/UniversalRobots/Un... on Ubuntu. By starting like the tutorial from driver with MoveIt I got the following error on different parameters:

[rviz2-3] [INFO] [1639652465.916282193] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.00852234 seconds
[rviz2-3] [INFO] [1639652465.917162913] [moveit_robot_model.robot_model]: Loading robot model 'ur'... 
[rviz2-3] [ERROR] [1639652465.936346953] [moveit_background_processing.background_processing]: Exception caught while processing action 'loadRobotModel': parameter 'robot_description_planning.joint_limits.shoulder_pan_joint.max_position' has invalid type: Wrong parameter type, parameter {robot_description_planning.joint_limits.shoulder_pan_joint.max_position} is of type {double}, setting it to {string} is not allowed.

It comes from a yaml File like this:

joint_limits:   shoulder_pan_joint:
    # acceleration limits are not publicly available
    has_acceleration_limits: false
    has_effort_limits: true
    has_position_limits: true
    has_velocity_limits: true
    max_effort: 330.0
    max_position: !degrees  360.0
    max_velocity: !degrees  120.0
    min_position: !degrees -360.0
       shoulder_lift_joint:
    # acceleration limits are not publicly available
    has_acceleration_limits: false
    has_effort_limits: true
    has_position_limits: true
    has_velocity_limits: true
    max_effort: 330.0
    max_position: !degrees  360.0
    max_velocity: !degrees  120.0
    min_position: !degrees -360.0   elbow_joint: [....]

And loaded in a Launch File:

[....] 
description_package = LaunchConfiguration("description_package") 
[....] 
joint_limit_params = PathJoinSubstitution(   [FindPackageShare(description_package), "config", ur_type, "joint_limits.yaml"]) 
[....] 
robot_description_content = Command(
       [ [....] " ",
           "joint_limit_params:=",
           joint_limit_params,
           " ",[....]   ]) 
robot_description = {"robot_description": robot_description_content} 
[....] 
rviz_config_file = PathJoinSubstitution(    [FindPackageShare(moveit_config_package), "rviz", "view_robot2.rviz"] ) 
rviz_node = Node(    
    package="rviz2",
    condition=IfCondition(launch_rviz),
    executable="rviz2",
    name="rviz2_moveit",
    output="log",
    arguments=["-d", rviz_config_file],
    parameters=[
       robot_description,
       robot_description_semantic,
       ompl_planning_pipeline_config,
       robot_description_kinematics,
       robot_description_planning,
       octomap_config,
       octomap_updater_config,]
    ,)
[....]

Is there anything wrong with the Launch File, Ubuntu, MoveIt!2 or ROS2 configuration, that it tries to load it as string?

Perhaps it could have something to do with it: I am not allowed now to publish a double with to_string to the RCLCPP Logger. It was absolutely working under Foxy on the same Machine.

RCLCPP_INFO(LOGGER, std::to_string(q.x()));

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-06-27 21:03:08 -0500

danzimmerman gravatar image

it begins with "!degrees". I've never seen yaml files containing values that start with such string. Is that supported usage?

It has been supported in the past, for example http://wiki.ros.org/rosparam#YAML_Format

Possibly related: https://github.com/UniversalRobots/Un...

The current robot description for UR robots still uses this YAML tag, so I think it's been fixed since this question was posted:

https://github.com/UniversalRobots/Un...

edit flag offensive delete link more

Comments

Thanks, I've never known that format. Converted your comment as an answer and marked as an answer hoping OP agrees.

130s gravatar image 130s  ( 2023-06-27 21:12:19 -0500 )edit
0

answered 2023-06-27 13:15:51 -0500

130s gravatar image
Wrong parameter type, parameter {robot_description_planning.joint_limits.shoulder_pan_joint.max_position} is of type {double}, setting it to {string} is not allowed.

This error indicates the expected parameter type was double but the Parameter server received string.

joint_limits:   shoulder_pan_joint:
:
    max_position: !degrees  360.0

Not entirely sure but the yaml parser took max_position as string as it begins with "!degrees". I've never seen yaml files containing values that start with such string. Is that supported usage? Either way, removing that portion of string should get rid of the very issue in question.

edit flag offensive delete link more

Comments

1

The !degrees is a YAML constructor. It's supported.

gvdhoorn gravatar image gvdhoorn  ( 2023-06-28 02:43:19 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-12-20 01:40:43 -0500

Seen: 521 times

Last updated: Jun 27 '23