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

Restructure of nao_teleop to allow reuse via subclasses #3

Closed
GoogleCodeExporter opened this issue Feb 12, 2016 · 6 comments
Closed

Comments

@GoogleCodeExporter
Copy link

I am in the process of developing a Nao teleoperation node to generate a demo 
system. As I would like to reuse as much existing functionality as possible, 
I'd like to base this on the teleop_nao_joy node. However the source files for 
this class do not currently allow subclassing. I have restructured them (based 
on svn rev 2730) to do so. In summary I've created 
nao_teleop/include/nao_teleop/teleop_nao_joy.h and made a library that is built 
from teleop_nao_joy.cpp. There is now a new file teleop_nao_joy_node.cpp which 
creates a node which has the same functionality as the previous 
teleop_nao_joy.cpp node. New classes can be developed by subclassing 
TeleopNaoJoy and calling subscribeToJoystick with a callback from the subclass. 
I've attached an svn diff of the changes plus an example of subclassing that 
works. I would be extremely grateful if you could merge these into the trunk, 
or let me know what changes you'd like before merging can happen.

cheers, Nick

Original issue reported on code.google.com by nick.ha...@gmail.com on 16 May 2012 at 12:55

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Updated files with more superclass functionality exposed. 

Original comment by nick.ha...@gmail.com on 16 May 2012 at 1:28

Attachments:

@GoogleCodeExporter
Copy link
Author

Original comment by h...@informatik.uni-freiburg.de on 17 May 2012 at 3:31

  • Changed state: Accepted
  • Added labels: Type-Enhancement, nao
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Fixed in Rev. #2752. I just made some slight adjustments:
- name of the library in manifest and CMakeLists is nao_teleop, like the 
package. In the future this could be extended e.g. with keyboard teleop in the 
same lib.
- name of the node binary is teleop_nao_joy in order to not break existing 
launchfiles

Original comment by h...@informatik.uni-freiburg.de on 24 May 2012 at 1:05

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

I just added the package namespace around the classes as well, you should 
probably consider this for your derived classes.

Original comment by h...@informatik.uni-freiburg.de on 24 May 2012 at 1:48

@GoogleCodeExporter
Copy link
Author

Great, thanks. I can confirm that this works for my components as expected. 

Original comment by nick.ha...@gmail.com on 25 May 2012 at 11:43

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

No branches or pull requests

1 participant