-
Notifications
You must be signed in to change notification settings - Fork 225
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
Move communication setup to on_configure instead of on_activate #732
Move communication setup to on_configure instead of on_activate #732
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems reasonable, but if we start all communication in on_configure
i would expect the corresponding cleanup to move to on_cleanup
.
@fmauch Just saw this PR and thought I take a look at it as it might has the potential breaking multiarm support. Given that Universal_Robots_ROS2_Driver/ur_robot_driver/include/ur_robot_driver/hardware_interface.hpp Line 227 in a8a96dc
to
This goes btw. probably also for all other variables which are used from multiple threads (e.g. everything being set by |
a8a96dc
to
86defa7
Compare
81be24b
to
0ccc16a
Compare
@fmauch I agree with you. For passing information between the non-rt and rt thread and
In general you are right. Often one can get away with it if only one thread writes and one thread reads and it is okey to have partially updated data. |
48455e0
to
a73e05f
Compare
@firesurfer yes, thank you for your comments. Thread safety is definitively something we need to tackle at some point. For now, for this PR I would restrict things to the |
a73e05f
to
eb89515
Compare
I just rebased and tested this. Especially with the deprecation and upcoming removal of passing the robot_description as a parameter and instead using a topic this becomes a required step. |
64181bc
to
c8dc25d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@RobertWilbrandt a review from you would be required to merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that, i was not aware that i needed to be the person to re-review this. Looks good now.
* Move communication setup to on_configure instead of on_activate * Cleanup in on_cleanup instead on_deactivate * Use std::atomic_bool for rtde_comm_has_been_started_ (cherry picked from commit da7b09f)
@Mergifyio backport iron |
✅ Backports have been created
|
* Move communication setup to on_configure instead of on_activate * Cleanup in on_cleanup instead on_deactivate * Use std::atomic_bool for rtde_comm_has_been_started_ (cherry picked from commit da7b09f)
Corrects point of initialization / connection to the robot by moving it to
on_configure
instead ofon_activate
.@destogl we talked about this yesterday, I found my commit I had in mind :-)