-
Notifications
You must be signed in to change notification settings - Fork 71
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 work with Heartbeat #288
Comments
Hi, thanks for the comment and sorry for the confusion. We removed the service at some point because the possibility to fix heartbeat settings in the yaml for master and devices seemed sufficient. Actually this is a problem in the documentation. I have created PR #294 for adjusting this. |
Thanks for the reply and the correction, but still for me I am a bit confused about how to set the heartbeat in such a way that the PC is producer and the motors are consumers. Can you provide yaml examples please ? |
You would need to add |
Thanks for the tip, I will check and get back to you ASAP to conclude the issue |
I did the test today and just wanted to double check something because I didn't get the behavior expected. I am in contact with our CANOpen motor controller to see if the error is in their side (most likely), meanwhile I have a small doubt about Basically the But after compiling I checked the resulting file So my question is: Is this normal ? I mean the fact that in this autogenerated |
Describe the question
I am using the library on an Embedded onboard PC the problem is if I send a non-zero command to my motors and for one reason or other the ROS application is shut down the robot keep moving with this command, very risky business.
So I want to set the motors (the slaves) to be consumers of a Heartbeat, the supplier already showed me how to activate it on their controllers so that is done. Now I need my master to send it.
I started following the exercise here with the virtual CAN to have a prove of concept. So I focused on the
Service Interface
withros2 launch canopen_tests cia402_setup.launch.py
and did the following:ros2_canopen/canopen_tests/config/cia402/bus.yml
set themaster
heartbeat to 1000 msWhich according to here should have the service:
~/set_heartbeat
Which according to here
After that I checked:
/cia402_node_1
:~/set_heartbeat
there:So we can see there no heartbeat service nor in the can trace, What I am missing here ? I expected the presence of the service and a continuous can trace every second, did I misunderstood that ?
Logs
Launch log of
cia402_setup.launch.py
:cia402_setup_launch_output.txt
Candump of vcan0:
candump_vcan0.txt
Setup:
Additional context
I tried to look up the code on my side and I was surprised to see that in neither:
canopen_master_driver/include/canopen_master_driver/node_interfaces/node_canopen_basic_master.hpp
here, norcanopen_master_driver/include/canopen_master_driver/node_interfaces/node_canopen_basic_master_impl.hpp
hereThere is no use of
canopen_interfaces/srv/co_heartbeat_id.hpp
, and I even look through the whole repos and it is not used anywhere. I mean it is defined and built as we can see incanopen_interface
here but not used afterwards.Does this mean that I need to write the service myself?
The text was updated successfully, but these errors were encountered: