-
Notifications
You must be signed in to change notification settings - Fork 307
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
CombinedRobotHW implementation #231
Conversation
It sounds good, like I would want to use it a lot... my humble opinion as an user, if I may...
|
// * Redistributions in binary form must reproduce the above copyright | ||
// notice, this list of conditions and the following disclaimer in the | ||
// documentation and/or other materials provided with the distribution. | ||
// * Neither the name of PAL Robotics S.L. nor the names of its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor] PAL or Shadow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I didn't spot that.
Hi, I understand that this would be very desired to use with modular robot products such as Shadow's robots or PAL's TIAGo. Let me begin with the quick and simple but annoying notes.
Are you sure that API changes are utmost necessary? I'm not sure how the jade release would tolerate breaking API. Is it still young enough to allow for it, @davetcoleman ? |
The dependency error results from the broken travis config.
This should solve the dependency error ;) |
read(ros::Time time, ros::Duration period)
write(ros::Time time, ros::Duration period) |
PLUGINLIB_EXPORT_CLASS( my_robot_hw::MyRobotHW, hardware_interface::RobotHW) in your cpp file. But that is of course acceptable as it is a requirement of
|
This will make it possible to combine several RobotHW objects into a single one.
683b77d
to
2c7c55e
Compare
////////////////////////////////////////////////////////////////////////////// | ||
|
||
#ifndef COMBINED_ROBOT_HARDWARE_COMBINED_ROBOT_HARDWARE_H | ||
#define COMBINED_ROBOT_HARDWARE_COMBINED_ROBOT_HARDWARE_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should HARDWARE be HW?
The changes to interface_manager.h are very complex, maybe @adolfo-rt can review those? |
Most of the changes in interface_manager.h belong to PR #220. It's probably easier to review that one first. I'm not sure if it's good practice to submit a PR that includes the commits of a previous unmerged PR, but for this PR I needed to build on that. |
…robot_hw allows to load different RobotHW as plugins and combines them into a single RobotHW. A single controller manager can then access resources from any robot.
2c7c55e
to
6e27ab4
Compare
I have fixed some of the comments and also changed read() and write() to read(const ros::Time& time, const ros::Duration& period)
write(const ros::Time& time, const ros::Duration& period) |
Building on a different PR is fine, but risky since that one needs to be cleared first! |
Reopen against kinetic-devel as #235 |
Is it possible that we can control different hardware interface with different frequency in control loop. |
(Includes changes in PR #220)
This is related to some of the issues discussed in #75.
CombinedRobotHW allows to dynamically load a list of RobotHW objects defined in the parameter server (using pluginlib à la controller manager) and combines them into a single RobotHW. A single controller manager can then access resources from any robot.
Configuration example:
This is a similar approach to #151 but removing the need for a separate DeviceHW class, and for a URDF to be passed. It uses #220 to combine the resources of the different RobotHWs.
Only one change in this PR is not backwards compatible: All the classes derived from RobotHW will have to declare a parameterless constructor in order to build correctly.(See #231 (comment))If a RobotHW derived class is intended to be loaded by CombinedRobotHW then it needs to implement at least:
bool init(ros::NodeHandle& root_nh, ros::NodeHandle &robot_hw_nh)
function that sets up and initializes the RobotHW (potentially reading ROS parameters)read()
and/orwrite()
Our motivation to write this class is to have an easy way to combine the Shadow Robot hand with different types of arms, so that we can have access to all the robot hardware resources from a single controller (e.g. to implement an impedance controller for arm+hand).