Gazebo controller spawner warning
Hi everyone. I have a problem and I hope you can help me. :)
I have a robot: Two Schunk lwa4d arms mounted on a box.
I can load this robot in gazebo.
I can load this robot in moveit + rviz and plan path for it.
But the problem is making connection between these two. So far, I am unable of doing so. I know that in both sides, gazebo and moveit, i need to have some modifications. But my major suspicion is a warning message that I receive when launching my robot in gazebo, where it warns:
[WARN] [WallTime: 1438070984.731293] [4.961000] Controller Spawner couldn't find the expected controller_manager ROS interface.
[WARN] [WallTime: 1438070984.740924] [4.954000] Controller Spawner couldn't find the expected controller_manager ROS interface.
I know it has something to do with controller_manager. In my launch file, I have:
<!-- controllers -->
<rosparam file="$(find schunk_lwa4d)/config/TwoArm/TwoArm_arm_controller_v2.yaml" command="load"/>
<rosparam file="$(find schunk_lwa4d)/config/joint_state_controller.yaml" command="load"/>
<!-- start_controllers -->
<node name="joint_state_controller_spawner" pkg="controller_manager" type="spawner" args="joint_state_controller" respawn="false" />
<node name="arm_controller_spawner" pkg="controller_manager" type="spawner" args="arm_controller" />
What I know for now is that each warning is related to one control spawning. My file, joint_state_controller.yaml is very small:
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
ROS is able to locate it. So the problem shouldn't be finding the file. But in spawning it using controller spawner, something is going wrong.
I tried to copy-paste the other file, TwoArm_arm_controller_v2.yaml, here too. But I couldn't format it in a good way to be easily readable. But the basic structure is something like:
## joint_names
joint_names: [arm1_1_joint, arm1_2_joint, arm1_3_joint, arm1_4_joint, arm1_5_joint, arm1_6_joint, arm1_7_joint, arm2_1_joint, arm2_2_joint, arm2_3_joint, arm2_4_joint, arm2_5_joint, arm2_6_joint, arm2_7_joint]
## joint trajectory controller
arm_controller:
type: position_controllers/JointTrajectoryController
joints:
- arm1_1_joint
...
- arm1_7_joint
- arm2_1_joint
...
- arm2_7_joint
constraints:
goal_time: 0.6
stopped_velocity_tolerance: 0.05
arm1_1_joint: {trajectory: 0.1, goal: 0.1}
...
arm2_7_joint: {trajectory: 0.1, goal: 0.1}
stop_trajectory_duration: 0.5
state_publish_rate: 25
action_monitor_rate: 10
What I could find by now is that there may be two reasons for this warning:
- controller manager not running.
- not launching the spawned script in the same namespace as the controller manager.
But honestly, I don't know how to move forward from this point. I know that controller_manager has been installed:
ros@ros:~/Documents/Damon_CPP/ROS_Workspace/devel$ rospack find controller_manager
/opt/ros/indigo/share/controller_manager
Unfortunately I don't know how to remove the warnings. I have the feeling that if Moveit can't communicate with gazebo, this warning can be a reason. Any help is highly appreciated. :)
UPDATE:
After launching my robot in gazebo, I tried this command:
ros@ros:~$ rosrun controller_manager controller_manager list
Nothing appears. The terminal goes frozen. I asked the same thing from my friend whose robot (2 U10 arms on a box) is loaded and controlled properly by moveit. Here is his result:
merosy@MeRoSy-1:~$ rosrun controller_manager controller_manager list joint_state_controller - hardware_interface::JointStateInterface ( running )
arm_controller - hardware_interface::PositionJointInterface ( running )
Seemingly my controller_manager is not working properly. Any suggestion ...