-
Notifications
You must be signed in to change notification settings - Fork 373
JTC: Use std::atomic<bool> #1720
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
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.
Just some minor nitpicks. Rest looks great
@@ -152,7 +153,7 @@ class JointTrajectoryController : public controller_interface::ControllerInterfa | |||
// Timeout to consider commands old | |||
double cmd_timeout_; | |||
// True if holding position or repeating last trajectory point in case of success | |||
realtime_tools::RealtimeBuffer<bool> rt_is_holding_; | |||
std::atomic<bool> rt_is_holding_; |
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.
std::atomic<bool> rt_is_holding_; | |
std::atomic_bool rt_is_holding_; |
@@ -179,7 +180,7 @@ class JointTrajectoryController : public controller_interface::ControllerInterfa | |||
|
|||
rclcpp_action::Server<FollowJTrajAction>::SharedPtr action_server_; | |||
RealtimeGoalHandleBuffer rt_active_goal_; ///< Currently active action goal, if any. | |||
realtime_tools::RealtimeBuffer<bool> rt_has_pending_goal_; ///< Is there a pending action goal? | |||
std::atomic<bool> rt_has_pending_goal_; ///< Is there a pending action goal? |
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.
std::atomic<bool> rt_has_pending_goal_; ///< Is there a pending action goal? | |
std::atomic_bool rt_has_pending_goal_; ///< Is there a pending action goal? |
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Sai Kishor Kothakota <[email protected]>
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.
LGTM
I think CI will be happy too
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1720 +/- ##
==========================================
- Coverage 85.69% 85.69% -0.01%
==========================================
Files 123 123
Lines 11897 11895 -2
Branches 1015 1015
==========================================
- Hits 10195 10193 -2
Misses 1379 1379
Partials 323 323
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Co-authored-by: Sai Kishor Kothakota <[email protected]> (cherry picked from commit 0dcdd04) # Conflicts: # joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller.hpp # joint_trajectory_controller/src/joint_trajectory_controller.cpp
Co-authored-by: Sai Kishor Kothakota <[email protected]> (cherry picked from commit 0dcdd04)
Co-authored-by: Sai Kishor Kothakota <[email protected]>
Apply changes from the guidelines added with ros-controls/realtime_tools#347