ros_control fails (couldn't find the expected controller_manager)
Hi!
I am trying to run a custom humanoid robot (foo) in Gazebo. I have the urdf running correctly (in Rviz and Gazebo the robot spawns without problems. However i am not able of doing the correct set up of the control in Gazebo. When the robot spawns it falls to the ground. The only warning i have is the following:
[WARN] Controller Spawner couldn't find the expected controller_manager ROS interface.
So i suppose the problem is that the control is not loaded. I have searched for similar problems, and i have made sure that the plugin is correctly configured. The output of rosservice list | grep controller_manager is
/foo/controller_manager/list_controllers
/foo/controller_manager/load_controller
/foo/controller_manager/reload_controller_libraries
/foo/controller_manager/switch_controller
/foo/controller_manager/unload_controller
I have also checked the namespaces, but i can not see anything wrong. I have the following code for the spawn of the robot:
<!-- Joint trajectory controllers -->
<rosparam command="load" file="$(find foo_control)/config/joint_trajectory_controllers.yaml"/>
<param name="robot_description" command="$(find xacro)/xacro.py $(find foo_gazebo_description)/robots/foo_humanoid.urdf.xacro" />
<node pkg="gazebo_ros" type="spawn_model" name="spawn_$(arg robot_name)" args="-param robot_description
-urdf
-x $(arg robot_initial_pose/x)
-y $(arg robot_initial_pose/y)
-z $(arg robot_initial_pose/z)
-R $(arg robot_initial_pose/roll)
-P $(arg robot_initial_pose/pitch)
-Y $(arg robot_initial_pose/yaw)
-model $(arg robot_name)
-robot_namespace /foo"
respawn="false">
</node>
The following for the control:
<!-- Force-torque sensors controller -->
<rosparam file="$(find foo_control)/config/effort_controller.yaml" command="load"/>
<!-- Controllers that come up started
<node name="bringup_controllers_spawner"
pkg="controller_manager" type="spawner" output="screen"
args="force_torque_sensor_controller
joint_state_controller" /> -->
<!-- load the controllers -->
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="/foo" args="
waist_yaw_position_controller
waist_pitch_position_controller (etc..)"/>
<!-- Robot state publisher -->
<node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher">
<param name="publish_frequency" type="double" value="50.0" />
<param name="tf_prefix" type="string" value="" />
<remap from="/joint_states" to="/foo/joint_states" />
I think all the stuff is loaded in the foo namespace. If any of you have any clue about why this could be happenning, you will be welcome.
Thank you in advance!
UPDATE
Added the terminal info when lauching my simulation:
Although it says ros_control is loaded there are no controllers spawned by the controller (no controller topics)
It would be helpful to upload your full package to repository (e.g. github). If not possible, try launching gazebo_ros_demos. If they are not working it means that your setup is corrupted.
Thanks for all the help!, yes i can run the rrbot tutorials. I also confirmed that although it says that the gazebo_ros_control is loaded, none of the actuals controllers are loaded in the robot, since there are no controllers topics as happens with the rrbot.
I will try to find a solution, but if the problem persists maybe use a github repository for sharing the code can be an option :D. Anyway any help still welcome!