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
How to create a cia301 system that works with real hardware? #215
Comments
Can you check the candump? Is the tpdo sent out? |
@ipa-cmh you are right. By default the device was mapping all the sub indexes of 0x2106 to all of its TPDOs and all the sub indexes fo object 0x2005 was being mapped to all of its RPDOs. I used the remapping keyword to apply the remappings for all the tpdos and rpdos. See below for the bus.yml
The launch log now shows this. Note the section where it shows which RPDOs and TPDOs were found. This suggests that the remapping worked.
But when I do
When I send the set motor command via 0x2000 using the command below, I see no changes in the proxy_device_1/rpdo index 0x2101. See below.
|
@jclinton830 can you try with a sync? We have not really tested async mode for pdos (we just do not have the use case) usually with drives you want fixed periodic commands and feedback to be able to control them reliably. Then use |
@ipa-cmh Okay, I tried that and nothing really changed. Here is the candump log
The only thing I can see here is the EMCY message 8220 being fired by the master from 081. This would suggest the length of the received PDO does not match the configured length. But I have checked the EDS and the manual and it all seems to be okay. I have attached the manual here and the eds. Can you please have a look to see if I am missing anything? New bus.yaml - https://github.com/jclinton830/canopen_test/blob/main/config/canopen_system/bus.yml and the manual for the controller (see pages 33-44) - https://github.com/jclinton830/canopen_test/blob/main/CAN%20Networking%20Manual_v2.1a.pdf |
@jclinton830 I will see if I can setup a simulation with fake slaves today. With regards to the candump, the startup sequence is most interesting as well as a section during which you sent pdo. |
@ipa-cmh any update on this? |
@ipa-cmh any chance you can shed some light on what is going on with this setup? I still have a few questions: when I do ros2 topic echo /node_1_controller/rpdo I only ever see one RPDO being reported by the publisher. See below. If this is normal behaviour then my question is what makes the canopen_proxy_controller decide which one of the 4 rpdos to publish?
|
Describe the bug
I have been following this tutorial https://ros-industrial.github.io/ros2_canopen/manual/rolling/software-tests/ros2_control_system-test.html after setting up a canopen cia301 system by following this tutorial https://ros-industrial.github.io/ros2_canopen/manual/rolling/user-guide/how-to-create-a-cia301-system.html
I am working with real hardware instead of using the virtual slave. My motor controller of choice is an MBL1660 from roboteq.
I have the drivers booting up fine. See the below output.
After booting up I send a command to the controller as stated in the above tutorial like this
`
ros2 topic pub /node_1_controller/tpdo canopen_interfaces/msg/COData "
index: 0x2005
subindex: 9
data: 0x3E8"
`
and this does not move the motor, I also echo the node_1_controller/rpdo topic and see no changes in the data values. See below.
My question is, have you tested this on real hardware? Am I missing something? I also see in my launch output the following warning
[joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
Is there any additional setup one must do for this to work with real hardware?
Setup:
The text was updated successfully, but these errors were encountered: