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

Error in robot control (gazebo) - load_parameters: unable to set parameters (last param was [/bl_wheel_trans_controller/pid/i=1.0]): cannot marshal None unless allow_none is enabled

asked 2020-09-03 07:20:04 -0600

kubsone gravatar image

updated 2020-09-09 03:41:05 -0600

Hello, I'm trying to control my robot which is written in xacro file. I added launch file that is responsible for controlling the robot, which looks like this:

<param name="robot_decription" command="$(find xacro)/xacro '$(find mybot_description)/urdf/mybot.xacro' " />

<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" args="-urdf -model mybot -param robot_description -y -6"/>
<!-- load the controllers -->
<rosparam file="$(find mybot_control)/config/mybot_control.yaml" command="load"/>
<node name="controller_spawner" pkg ="controller_manager" type="spawner" ns="/mybot" args="bl_wheel_trans_controller br_wheel_trans_controller joint_state_controller --shutdown-timeout 3"/>
<!-- converts joint states to TF transforms -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen">
    <remap from="joint_state" to="/mybot/joint_states" />

My config.yaml looks like this:

    type: joint_state_controller/JointStateController
    publish_rate: 20

    type: effort_controllers/JointPositionController
    joint: bl_wheel_hinge
    pid: {p: 1.0, i: 1.0, d: 0.0}

    type: effort_controllers/JointPositionController
    joint: br_wheel_hinge
    pid: {p: 1.0, i: 1.0, d: 0.0}

After running the launch file, an error

load_parameters: unable to set parameters (last param was [/bl_wheel_trans_controller/pid/i=1.0]): cannot marshal None unless allow_none is enabled

What am I doing wrong? I haven't used any "none" arguments in the code but the error still exists.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-11-16 07:53:44 -0600

phil0stine gravatar image

There is an indentation problem with your config.yaml. If you use some kind of online yaml interpreter you will see the issue. The value for key mybot is interpreted as null since mybot is at the same indentation level as joint_state_controller etc.

edit flag offensive delete link more


Yes, this is the most common cause for this problem.

Provided the OP has pasted a verbatim copy of config.yaml of course.

gvdhoorn gravatar image gvdhoorn  ( 2020-11-16 11:21:07 -0600 )edit

answered 2021-07-27 03:44:22 -0600

qyp gravatar image

Hello! You can follow the above tutorial: Configure it. But one thing I must point out is that your situation also appeared when my trajectory_control.yaml and controllers.yaml were configured; after careful inspection, I found that in your moveit_config package, the launch file failed to load controller.yaml, but the loaded ros_controllers.yaml, which led to the failure to recognize! ! I use an effort controller! Hope it can help you!

edit flag offensive delete link more

Question Tools


Asked: 2020-09-03 06:09:12 -0600

Seen: 2,374 times

Last updated: Jul 27 '21