Rosanswers logo

Dears all,

I'm new to ROS_control and I'm investigating the possibility to use it to build an hardware-interface and a controller for a 6 gdl human-exoskeleton. To begin, I wrote a simple hardware-interface as the one in: https://github.com/ros-controls/ros_control/wiki/hardware_interface
I registered a "joint state interface" and a "joint effort interface" for all my joints and created the hardware-interface class. In my main program I created the controller_manager passing the created object as explained in the same tutorial. I could compile the code and run the so created control-loop; when it is running I can see the /controller_manager services trough "rosservice list".

My question is: if I want to use some "effort_controllers/JointPositionController" for my joints, how should I load them? As a beginning, I built a yaml configuration file and a launch file to load a joint controller as follows:

yaml file

robot: #what should robot be for? Package name? Namespace?
type: effort_controllers/JointPositionController
joint: rHip
pid: {p: 100.0, i: 0.01, d: 10.0} #random example values

and launcher

rosparam file="$(find biomot_control)/config/biomot_config.yaml" command="load"

node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="rHip_position_controller"

But when I launch it, it blocks at the step: Loading controller: rHip_position_controller. Am I missing any step or doing something wrong?

Also running "rosrun controller_manager controller_manager list-types" blocks without prompting any error or answer.

Thank you very much for the attention.

Originally posted by MarcoB on ROS Answers with karma: 28 on 2015-03-11

Post score: 0


1 Answer 1


Rosanswers logo

But when I launch it, it blocks at the step: [..]


Also running "rosrun controller_manager controller_manager list-types" blocks [..]

This reminds me of Unresponding control node on the ros-sig-robot-control list.

Without access to your actual code: make sure you service ros_control callbacks somewhere, as if those are not processed, it cannot correctly handle incoming service requests, which typically results in the hangs you are describing.

Originally posted by gvdhoorn with karma: 86574 on 2015-03-11

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by MarcoB on 2015-03-11:
Thank you, that seems to be my problem. I fixed with a ros::spinOnce() in my control loop, I'm not sure that's the correct way to do it. Now I'm facing another problem, when loading:"Could not find parameter robot_description on param serv." I made a urdf file but I can't figure out how to load it.

Comment by MarcoB on 2015-03-11:
EDIT: I had to start a dedicate thread running ros::spin as explained in the linked discussion. with position interfaces now controllers can load fine, to run effort interfaces I still need to understand how to get a proper xml description file from the urdf file.

Comment by gvdhoorn on 2015-03-12:
You might be interested in the ros_control_boilerplate package by Dave Coleman.

Comment by MarcoB on 2015-03-12:
Very interesting, thank you very much!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.