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

Generic CANOpen Devices aka, non-motor support #393

Open
BenArtes opened this issue Jun 11, 2020 · 1 comment
Open

Generic CANOpen Devices aka, non-motor support #393

BenArtes opened this issue Jun 11, 2020 · 1 comment

Comments

@BenArtes
Copy link

We have a CANbus with some motors on it using ros_canopen; we're also starting to add non-motor devices (digital / analog inputs, video muxes, encoders etc) and looking to use the with ros_canopen. I had incorrectly read-between-the-lines of the canopen_master / canopen_chain_node wiki pages and code and thought that this was supported using the the 'publish' tag and get_object / set_object services. (Overall a more fully featured solution for generic can devices would be great, but I understand the focus of this project / package is on ros_control motor support). The devices I'm trying to integrate would be fine using these methods of communication for now.

It seems, I was hasty in my reading and this isn't supported. First I implemented a 'no_defaults' yaml tag in ros_canopen to get rid of pdo-mappings that apply for all the motors but don't make sense for non-motor devices. Then I was stuck because I tried to name the joints after non-joints. I tried optionally skipping the motor_node stuff out by creating non-motor tag but ran into other issues.

I just want to A) confirm that this isn't supported. And B) if I was to implement this feature, are there ways it would be best to implement or features that might seem important beyond my initial thoughts?

@mathias-luedtke
Copy link
Member

Actually, one reason for writing ros_canopen was to address these use cases, which were not possible with our previous solution.

However, canopen_motor_node was not designed to be used with non-motor devices.
Instead, you should subclass canopen_chain_node and add a layer for your device profile (that's how canopen_motor_node worsk as well). As a first test you could just use canopen_chain_node as-is, but the object service are mostly meant for debugging.
You can run multiple processes in parallel, you just have to use the external sync feature (Example).

If you want to run everything in one process, you could subclass canopen_motor_node as well, but this might need some modifications. I have never tried this.

Another, much more flexible, way would be to add a plugin system to canopen_chain_node to load additional layers dynamically.

Overall a more fully featured solution for generic can devices would be great,

CAN or CANopen?
What is missing?

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

2 participants