Closed pirobot closed 6 years ago
The robot_controllers are not Gazebo-plugins. They are ROS pluginlib-based modules. Thus, you need a gazebo plugin that can load these controllers, and connect the gazebo joints to an instance of ControllerManager which can then load the appropriate controllers (which is exactly what the fetch_gazebo_plugin is doing).
AFAIK, there is nothing specific to Fetch used in our Gazebo plugin -- if you simply add that plugin, it will load the controllers, connect with gazebo, and I think things will start to work. In retrospect, that plugin could have probably even been called robot_controllers_gazebo_plugin -- but I think when we started we imagined it would have more Fetch-specific stuff in it (like providing fake breaker interfaces, etc, which we never ended up implementing).
One additional comment for posterity - since OPs question only really talked about simulation. In a non-simulated robot, if you wanted to use the controllers, you would need to create a node with an instance of a ControllerManager, and then create a class that derives from JointHandle that actually processes the commands by sending them onto your hardware. The Gazebo demo is the only open-source reference I'm aware of, since our drivers are closed source, so the "real" JointHandle used on a robot is not available.
Things are documented, albeit briefly, on the ROS wiki at http://docs.ros.org/kinetic/api/robot_controllers_interface/html/
Many thanks Fergs. Once again you saved the day! :) FYI, I submitted this issue for the Gazebo differential_drive_controller plugin. Using the fetch_gazebo_plugin instead does not suffer from the same problem.
We have been using the diff_drive_controller/DiffDriveController plugin in Gazebo 2.3 under ROS Indigo with a model of our custom robot (Jackrabbot) at Stanford University. However, we have discovered that the robot rotates very slowly in Gazebo even with no Twist control input, in an empty world, and no matter how we set the pose and twist covariances.
We therefore wanted to try the robot_controllers/DiffDriveBaseController provided here since I noticed that the Fetch Gazebo model (also under ROS Indigo and Gazebo 2.3) does not have this rotation problem.
I include my YAML file below but the DiffDriveBaseController plugin is not being loaded when spawning our Jackrabbot model in Gazebo. I noticed that with the Fetch gazebo launch file, the following lines at the end of the file fetch.gazebo.xacro:
are necessary for the DiffDriveBaseController plugin to be loaded. My question is therefore, how can I get the DiffDriveBaseController plugin to load without using the fetch_gazebo_plugin which I am guessing is specific to the Fetch robot?
Thank you! Here is my controllers yaml file: