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

Export SimHWInterface for combined_robot_hw #34

Open
4 of 5 tasks
RobertWilbrandt opened this issue Apr 28, 2020 · 1 comment · May be fixed by #49
Open
4 of 5 tasks

Export SimHWInterface for combined_robot_hw #34

RobertWilbrandt opened this issue Apr 28, 2020 · 1 comment · May be fixed by #49

Comments

@RobertWilbrandt
Copy link
Collaborator

RobertWilbrandt commented Apr 28, 2020

It is surprisingly useful to have a purely kinematic simulation of a hardware interface in a combined_robot_hw. Using a custom adapter i already used it to allow for partially-simulated execution in a more complex combined_robot_hw setup, and it generally makes switching between real hardware and simulation in such projects much easier. I would however prefer this to be an upstream feature of ros_control_boilerplate (and am happy to provide a PR for it) for the following reasons:

  • It would demonstrate how to properly write and export a hw interface using pluginlib
  • Adding a launch file to rrbot_control could demonstrate how to use a combined_robot_hw
  • It can be quite handy to use this as a placeholder when developing bigger combined_robot_hw setups

Unfortunately i don't think simply changing SimHWInterface (or GenericHWInterface) would be possible without quite some restructuring, as pluginlib requires a parameterless constructor. Thus i would create an extra adapter class deriving from hardware_interface::RobotHW which would hold a SimHWInterface as a member and delay it's construction until init(), simply delegating all relevant calls from there on.

The way i see it the required steps for this are:

  • Create CombinedHWAdapter class
  • Export interface correctly as ros_control_boilerplate/SimHWInterface
  • Add node src to rrbot_control. Unfortunately running a combined_robot_hw from a GenericHWControlLoop doesn't seem too nice.
  • Add sample launch files to rrbot_control
  • Add short description to README.md

I'm happy to hear about opinions, otherwise i'd start implementing this in the next days.

@Tuebel
Copy link

Tuebel commented Nov 23, 2020

I have just stumbled over this issue after opening PR #42 which is intended to bring support for combined_robot_hw.
Definitely agree that an adapter could be a good solution. More concerns and ideas can be found in the PR, I don't want to cross-post too much.

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