Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commandline controller_manager command freezes #23

Open
ptiza-v-nebe opened this issue Sep 20, 2018 · 2 comments
Open

commandline controller_manager command freezes #23

ptiza-v-nebe opened this issue Sep 20, 2018 · 2 comments

Comments

@ptiza-v-nebe
Copy link

First I just run:
roslaunch ros_control_boilerplate rrbot_simulation.launch

Now I'm trying to list all available controllers with:
rosrun controller_manager controller_manager list

It freezes, nothing happens, no error, no nothing until ctrl-c

The same operation with ros services do the job well:
rosservice call /rrbot/controller_manager/list_controllers

Return of service call:

controller: 
  - 
    name: "joint_state_controller"
    state: "running"
    type: "joint_state_controller/JointStateController"
    claimed_resources: 
      - 
        hardware_interface: "hardware_interface::JointStateInterface"
        resources: []
  - 
    name: "position_trajectory_controller"
    state: "running"
    type: "position_controllers/JointTrajectoryController"
    claimed_resources: 
      - 
        hardware_interface: "hardware_interface::PositionJointInterface"
        resources: [joint1, joint2]

Now in the search for solution I found that custom namespaces do maybe something wrong.
If I go to rrbot_simulation.launch and change this:

...
<group ns="/rrbot">

    <!-- Load hardware interface -->
    <node name="rrbot_hardware_interface" pkg="ros_control_boilerplate" type="sim_hw_main"
          output="screen" launch-pref...

Into this:

...
<group>

    <!-- Load hardware interface -->
    <node name="rrbot_hardware_interface" pkg="ros_control_boilerplate" type="sim_hw_main"
          output="screen" launch-pref...

it works well.

If anyway need a custom namespace then use something like this:

...
    <node name="ros_control_controller_manager" pkg="controller_manager" type="controller_manager" respawn="false"
	  output="screen" args="spawn /rrbot/joint_state_controller /rrbot/position_trajectory_controller" />
...

This sounding all a little bit like tutorial but no, this is a question. Do I'm something wrong or is the behavior above, a bug or feature or what else??

Same issue and ros_control_boilerplate, with same commandline controller_manager freezing behaviour, are mentioned here:
https://answers.ros.org/question/284099/controller-spawner-stuck-while-loading/

Thank you!

@rickstaa
Copy link

@ptiza-v-nebe I stumbled upon this issue by accident, but let me answer it for future reference. The problems you're experiencing is that by default, the controller manager script looks for controllers under the base namespace (i.e., /). In your case, the robot controller_maneger is found under the /rrbot namespace. It looks like the controller_manager unfortunately doesn't throw a warning when this happens, but waits till controllers are found. When this happens you have to change the ROS_NAMESPACE for the controller_manager to find your controllers. This is done by setting the ROS_NAMESPACE environmental variable:

export ROS_NAMESPACE=/rrbot

@Sofiap91
Copy link

@ptiza-v-nebe I stumbled upon this issue by accident, but let me answer it for future reference. The problems you're experiencing is that by default, the controller manager script looks for controllers under the base namespace (i.e., /). In your case, the robot controller_maneger is found under the /rrbot namespace. It looks like the controller_manager unfortunately doesn't throw a warning when this happens, but waits till controllers are found. When this happens you have to change the ROS_NAMESPACE for the controller_manager to find your controllers. This is done by setting the ROS_NAMESPACE environmental variable:

export ROS_NAMESPACE=/rrbot

Hi Rick. I was just wondering how should it be specified when you have more than one namespace, e.g., if you have two arms. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants