Gazebo ros control plugin not loading on OSX

asked 2016-03-13 08:24:12 -0500

LiohAu gravatar image

updated 2016-03-14 19:25:51 -0500

I am trying to simulate my robot with gazebo, and I am getting the following warning "Controller Spawner couldn't find the expected controller_manager ROS interface.". After looking to other answers, I assume that it is related to the gazebo gazebo_ros_control plugin which is not being loaded appropriatelly.

I checked if the controller_manager was running with that command

rosservice list | grep controller_manager

But I did not get any result. The only services listed with a name containing "controller" are the "/controller_spawner/get_loggers" and "/controller_spawner/set_logger_level" (and they are available until that warning message is displayed).

My URDF file contains this :

<robot>
<gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
        <robotNamespace>/</robotNamespace>
    </plugin>
    ...

And since I am on OSX, I had to clone the gazebo_ros_pkgs repository in my catkin workspace, and I built it myself (using catkin_make). I noticed that the built files are .dylib files instead of .so, but replacing .so by .dylib in the "filename" attribute value of the URDF file does not solve the issue. I have seen a related issue on the gazebo bitbucket repo but since all the other gazebo libraries I have built are .dylib, I think that the gazebo version I use, already embed their fix (else I would have crashed sooner ?)

So here is the full log following my roslaunch command, I'm open to any idea that can solve this problem :)

$ roslaunch myrobot_gazebo myrobot_world.launch
... logging to /Users/.../.ros/log/9d1a05e3-e8f5-11e5-9c0d-0025bce79628/roslaunch-MacBook-Pro.local-19181.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt

... loading XML file [/opt/ros/indigo/etc/ros/roscore.xml]
... executing command param [rosversion roslaunch]
Added parameter [/rosversion]
... executing command param [rosversion -d]
Added parameter [/rosdistro]
Added core node of type [rosout/rosout] in namespace [/]
... loading XML file [/Users/.../catkin_ws/src/myrobot_simulator/myrobot_gazebo/launch/myrobot_world.launch]
... loading XML file [/Users/.../catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/launch/empty_world.launch]
Added parameter [/use_sim_time]
Added node of type [gazebo_ros/gzserver] in namespace [/]
Added node of type [gazebo_ros/gzclient] in namespace [/]
... done importing include file [/Users/.../catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/launch/empty_world.launch]
... loading XML file [/Users/.../catkin_ws/src/myrobot/myrobot_description/launch/robot_state_publisher.launch]
... executing command param [/opt/ros/indigo/lib/xacro/xacro '/Users/.../catkin_ws/src/myrobot/myrobot_description/urdf/base.urdf.xacro']
Added parameter [/robot_description]
Added node of type [robot_state_publisher/state_publisher] in namespace [/]
... done importing include file [/Users/.../catkin_ws/src/myrobot/myrobot_description/launch/robot_state_publisher.launch]
... loading XML file [/Users/.../catkin_ws/src/myrobot/myrobot_control/launch/control.launch]
Added parameter [/myrobot_joint_publisher/type]
Added parameter [/myrobot_joint_publisher/publish_rate]
Added parameter [/myrobot_velocity_controller/pose_covariance_diagonal]
Added parameter [/myrobot_velocity_controller/twist_covariance_diagonal]
Added parameter [/myrobot_velocity_controller/linear/y/max_velocity]
Added parameter [/myrobot_velocity_controller/linear/y/has_acceleration_limits]
Added parameter [/myrobot_velocity_controller/linear/y/has_velocity_limits]
Added parameter [/myrobot_velocity_controller/linear/y/max_acceleration]
Added parameter [/myrobot_velocity_controller/linear/x/max_velocity]
Added parameter [/myrobot_velocity_controller/linear/x/has_acceleration_limits]
Added parameter [/myrobot_velocity_controller/linear/x/has_velocity_limits]
Added parameter [/myrobot_velocity_controller/linear/x/max_acceleration]
Added parameter [/myrobot_velocity_controller/publish_rate]
Added parameter [/myrobot_velocity_controller/wheel_radius_multiplier]
Added parameter [/myrobot_velocity_controller/front_right_wheel_joint]
Added parameter [/myrobot_velocity_controller/back_left_wheel_joint]
Added parameter [/myrobot_velocity_controller/front_left_wheel_joint]
Added parameter [/myrobot_velocity_controller/back_right_wheel_joint]
Added parameter [/myrobot_velocity_controller/wheel_separation_multiplier]
Added parameter ...
(more)
edit retag flag offensive close merge delete

Comments

As of gazebo 2.2 (see pull request 925) the .dylib plugin suffix should not be a problem. Is there a way to print more verbose console output to diagnose the error?

scpeters gravatar imagescpeters ( 2016-03-14 12:32:36 -0500 )edit

Is there any flag, arg or env var that I can add to get a more verbose output ?

LiohAu gravatar imageLiohAu ( 2016-03-14 12:59:17 -0500 )edit

gazebo_ros/launch/empty_world.launch has a verbose option. Try adding verbose:=true to your roslaunch invocation

scpeters gravatar imagescpeters ( 2016-03-14 13:57:34 -0500 )edit

I have completed the log with the -v option for roslaunch AND with verbose:=true.

LiohAu gravatar imageLiohAu ( 2016-03-14 19:14:42 -0500 )edit