Failed to Load mobile_base_controller
Hi.
I cannot load the differential controllers for my robot. I am having the following message error ( I will use an image because the output of the terminal is too big):
summarizing it: "Could not load controller “mobilebasecontroller because…” and: (1)Failed to load mobilebase controller (2) Failed to load jibo2/rightwheelvelocitycontroller (3) Failed to load jibo2/leftwheelvelocity_controller
I imagine the error 2 and 3 happens because of the first .yaml (diff-drive type) was not correctly loaded. I tried to load the yaml file without put the name space, out of the group=“jibo2” area…but no success.
I have already seen this video https://www.youtube.com/watch?v=9OWxX7PA4SU trying to answer this similar question issue https://answers.ros.org/question/289561/help-to-run-diff_drive_controller/ but unfortunately for me it did not work.
So My LAUNCH file is below:
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="urdf_robot_file" default="$(find solution_jibo_description)/urdf/jibo2.urdf"/>
<arg name="x" default="-2"/>
<arg name="y" default="0.0"/>
<arg name="z" default="0.0"/>
<arg name="roll" default="0.1"/>
<arg name="pitch" default="0"/>
<arg name="yaw" default="0"/>
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find solution_jibo_gazebo)/worlds/my_world.world"/>
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="headless" value="$(arg headless)"/>
<!-- more default -->
</include>
<group ns="jibo2">
<!-- Spawn Part -->
<arg name="robot_name" default="jibo2" />
<node name="jibo2_diff_controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="/jibo2" args="mobile_base_controller"/>
<rosparam file="$(find solution_jibo_description)/config/jibo2_controllers.yaml" command="load" ns="/jibo2"/>
<!--
<rosparam file="$(find solution_jibo_description)/config/jibo2_diff_drive.yaml" command="load" ns="/jibo2"/> -->
<param name="/jibo2/robot_description" command="cat $(arg urdf_robot_file)" />
<rosparam file="$(find solution_jibo_description)/config/jibo2_drive_controllers.yaml" command="load" ns="/jibo2"/>
<!-- send fake joint values -->
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="use_gui" value="TRUE"/>
</node>
<node name="urdf_spawner_jibo2" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg roll) -P $(arg pitch) -Y $(arg yaw) -model $(arg robot_name) -param /jibo2/robot_description"/>
<node name="robot_state_publisher_jibo2" pkg="robot_state_publisher" type="robot_state_publisher"
respawn="false" output="screen">
<param name="publish_frequency" type="double" value="5.0" />
</node>
<node name="jibo2_controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" args="--namespace=/jibo2
/jibo2/joint_state_controller
/jibo2/base_waist_joint_position_controller
/jibo2/waist_body_joint_position_controller
/jibo2/body_head_joint_position_controller
/jibo2/left_wheel_velocity_controller
/jibo2/right_wheel_velocity_controller">
</node>
</group>
</launch>
MY Config - yaml files are below:
jibo2diffdrive.yaml:
mobile_base_controller:
type : "diff_drive_controller/DiffDriveController"
left_wheel : 'wheel_left_joint'
right_wheel : 'wheel_right_joint'
publish_rate: 50.0 # default: 50
pose_covariance_diagonal : [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0]
twist_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0]
# Wheel separation and diameter. These are both optional.
# diff_drive_controller will attempt to read either one or both from the
# URDF if not specified as a parameter
wheel_separation : 0.235
wheel_radius : 0.04
# Wheel separation and radius multipliers
wheel_separation_multiplier: 1.0 # default: 1.0
wheel_radius_multiplier : 1.0 # default: 1.0
# Velocity commands timeout [s], default 0.5
cmd_vel_timeout: 0.22
# Base frame_id
base_frame_id: base_footprint #default: base_link
# Velocity and acceleration limits
# Whenever a min_* is unspecified, default to -max_*
linear:
x:
has_velocity_limits : true
max_velocity : 1.0 # m/s
min_velocity : -0.5 # m/s
has_acceleration_limits: true
max_acceleration : 0.8 # m/s^2
min_acceleration : -0.4 # m/s^2
has_jerk_limits : true
max_jerk : 5.0 # m/s^3
angular:
z:
has_velocity_limits : true
max_velocity : 1.7 # rad/s
has_acceleration_limits: true
max_acceleration : 1.5 # rad/s^2
has_jerk_limits : true
max_jerk : 2.5 # rad/s^3
And the jibo2_controllers.yaml:
# Publish all joint states -----------------------------------
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
# Position Controllers ---------------------------------------
base_waist_joint_position_controller:
type: effort_controllers/JointPositionController
joint: base_waist_joint
pid: {p: 60.0, i: 10.0, d: 10.0}
waist_body_joint_position_controller:
type: effort_controllers/JointPositionController
joint: waist_body_joint
pid: {p: 60, i: 15.0, d: 1.0}
body_head_joint_position_controller:
type: effort_controllers/JointPositionController
joint: body_head_joint
pid: {p: 10, i: 1, d: 0.0}
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
left_wheel_joint_velocity_controller:
type: velocity_controllers/JointVelocityController
joint: wheel_left_joint
pid: {p: 00.1, i: 0.00001, d: 0.0001}
right_wheel_joint_velocity_controller:
type: velocity_controllers/JointVelocityController
joint: wheel_right_joint
pid: {p: 100.0, i: 0.1, d: 10.0}
Someone had a similar issue?
Asked by Vini71 on 2020-02-01 08:13:29 UTC
Comments
Isnt diff_drive claiming the wheel_joint resources, the same as velocity_controller?
Asked by Dragonslayer on 2020-02-01 15:33:04 UTC
I will stop asking you to not do this, as it seems you're not willing to follow forum rules.
"is too big" is not a reason to post screenshots.
Please stop doing that.
Asked by gvdhoorn on 2020-02-02 12:24:11 UTC