-
Notifications
You must be signed in to change notification settings - Fork 937
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
[jog_arm] Changes before porting to ROS2 #2151
Conversation
b220d69
to
109b83f
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.
I've tested this locally.
Codecov Report
@@ Coverage Diff @@
## master #2151 +/- ##
==========================================
- Coverage 58.27% 57.96% -0.32%
==========================================
Files 327 327
Lines 24707 25668 +961
==========================================
+ Hits 14399 14879 +480
- Misses 10308 10789 +481
Continue to review full report at Codecov.
|
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.
I'm not sure why but locally testing something is weird happening with this PR. I'll post more when I know more.
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.
Something to do with resetting the low pass filters is causing some weird behavior in one of our projects. I'll investigate more tomorrow and try to figure out why.
109b83f
to
650bdf0
Compare
Recent update is rebased on master to grab Tyler's #2155, and includes changes:
|
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.
See my PR to correct a variable type in addJointIncrements()
Fix type in addJointIncrements
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.
I don't see any performance issues. Left a couple small comments but I'm approving assuming you'll fix those
* throttle warning logs * ROS1 Basic improvements and changes * Fixes to drift dimensions, singularity velocity scaling * tf name changes, const fixes, slight logic changes * Reverting enforceSRDFAccelVelLimits changes for now * Move ROS_LOG_THROTTLE_PERIOD to cpp files * Clang formatting * Track staleness of joint and twist seperately * Ensure joint_trajectory output is always populated with something, even when no jog * Fix joint trajectory redundant points for gazebo pub * Fix crazy joint jog from bad Eigen init * Fix variable type in addJointIncrements() * Initialize last sent command in constructor * More explicit joint_jog_cmd_ and twist_stamped_cmd_ names * Add comment clarying transform calculation / use Co-authored-by: Tyler Weaver <tyler@picknik.ai> Co-authored-by: AndyZe <andyz@utexas.edu>
* throttle warning logs * ROS1 Basic improvements and changes * Fixes to drift dimensions, singularity velocity scaling * tf name changes, const fixes, slight logic changes * Reverting enforceSRDFAccelVelLimits changes for now * Move ROS_LOG_THROTTLE_PERIOD to cpp files * Clang formatting * Track staleness of joint and twist seperately * Ensure joint_trajectory output is always populated with something, even when no jog * Fix joint trajectory redundant points for gazebo pub * Fix crazy joint jog from bad Eigen init * Fix variable type in addJointIncrements() * Initialize last sent command in constructor * More explicit joint_jog_cmd_ and twist_stamped_cmd_ names * Add comment clarying transform calculation / use Co-authored-by: Tyler Weaver <tyler@picknik.ai> Co-authored-by: AndyZe <andyz@utexas.edu>
* throttle warning logs * ROS1 Basic improvements and changes * Fixes to drift dimensions, singularity velocity scaling * tf name changes, const fixes, slight logic changes * Reverting enforceSRDFAccelVelLimits changes for now * Move ROS_LOG_THROTTLE_PERIOD to cpp files * Clang formatting * Track staleness of joint and twist seperately * Ensure joint_trajectory output is always populated with something, even when no jog * Fix joint trajectory redundant points for gazebo pub * Fix crazy joint jog from bad Eigen init * Fix variable type in addJointIncrements() * Initialize last sent command in constructor * More explicit joint_jog_cmd_ and twist_stamped_cmd_ names * Add comment clarying transform calculation / use Co-authored-by: Tyler Weaver <tyler@picknik.ai> Co-authored-by: AndyZe <andyz@utexas.edu>
* throttle warning logs * ROS1 Basic improvements and changes * Fixes to drift dimensions, singularity velocity scaling * tf name changes, const fixes, slight logic changes * Reverting enforceSRDFAccelVelLimits changes for now * Move ROS_LOG_THROTTLE_PERIOD to cpp files * Clang formatting * Track staleness of joint and twist seperately * Ensure joint_trajectory output is always populated with something, even when no jog * Fix joint trajectory redundant points for gazebo pub * Fix crazy joint jog from bad Eigen init * Fix variable type in addJointIncrements() * Initialize last sent command in constructor * More explicit joint_jog_cmd_ and twist_stamped_cmd_ names * Add comment clarying transform calculation / use Co-authored-by: Tyler Weaver <tyler@picknik.ai> Co-authored-by: AndyZe <andyz@utexas.edu>
* throttle warning logs * ROS1 Basic improvements and changes * Fixes to drift dimensions, singularity velocity scaling * tf name changes, const fixes, slight logic changes * Reverting enforceSRDFAccelVelLimits changes for now * Move ROS_LOG_THROTTLE_PERIOD to cpp files * Clang formatting * Track staleness of joint and twist seperately * Ensure joint_trajectory output is always populated with something, even when no jog * Fix joint trajectory redundant points for gazebo pub * Fix crazy joint jog from bad Eigen init * Fix variable type in addJointIncrements() * Initialize last sent command in constructor * More explicit joint_jog_cmd_ and twist_stamped_cmd_ names * Add comment clarying transform calculation / use Co-authored-by: Tyler Weaver <tyler@picknik.ai> Co-authored-by: AndyZe <andyz@utexas.edu>
* throttle warning logs * ROS1 Basic improvements and changes * Fixes to drift dimensions, singularity velocity scaling * tf name changes, const fixes, slight logic changes * Reverting enforceSRDFAccelVelLimits changes for now * Move ROS_LOG_THROTTLE_PERIOD to cpp files * Clang formatting * Track staleness of joint and twist seperately * Ensure joint_trajectory output is always populated with something, even when no jog * Fix joint trajectory redundant points for gazebo pub * Fix crazy joint jog from bad Eigen init * Fix variable type in addJointIncrements() * Initialize last sent command in constructor * More explicit joint_jog_cmd_ and twist_stamped_cmd_ names * Add comment clarying transform calculation / use Co-authored-by: Tyler Weaver <tyler@picknik.ai> Co-authored-by: AndyZe <andyz@utexas.edu>
* throttle warning logs * ROS1 Basic improvements and changes * Fixes to drift dimensions, singularity velocity scaling * tf name changes, const fixes, slight logic changes * Reverting enforceSRDFAccelVelLimits changes for now * Move ROS_LOG_THROTTLE_PERIOD to cpp files * Clang formatting * Track staleness of joint and twist seperately * Ensure joint_trajectory output is always populated with something, even when no jog * Fix joint trajectory redundant points for gazebo pub * Fix crazy joint jog from bad Eigen init * Fix variable type in addJointIncrements() * Initialize last sent command in constructor * More explicit joint_jog_cmd_ and twist_stamped_cmd_ names * Add comment clarying transform calculation / use Co-authored-by: Tyler Weaver <tyler@picknik.ai> Co-authored-by: AndyZe <andyz@utexas.edu>
Description
These are changes I wanted to make (in addition to #2103) before starting on porting the jogger to ROS2 because I want these changes there as well.
The changes consist of a lot of minor changes, see list below for details. Note that discussion and reviews exist here already: PickNikRobotics#8, because I wanted to start the review process before #2103 landed.
const
in functions where applicable, fixing comments, combining if statements and making them flow bettersuddenHalt(Eigen::ArrayXd& delta_theta)
overload. It included comments saying position and velocity controlled robots were handled differently, but this function did not handle them differently (and only setdelta_theta
to all 0 which could be really bad for a position controlled robot). It was only called one place with the Eigen Array, and I replaced the call with asetZero()
there and deleted the function so future users don't use it and accidentally send the robot to 0's.have_nonzero_twist_stamped_
andhave_nonzero_joint_jog_
which were used intermittently in therun()
timer callback but also set in the command subscriber callbacks. Moved them to mutex protected implementation similar to the rest of subscriber callback variablesChecklist