Fix uninitialized acceleration limit, and add unit tests to TricycleDrive plugin#84
Merged
josephduchesne merged 6 commits intomasterfrom Jan 17, 2023
Merged
Conversation
| ros::spinOnce(); | ||
| } | ||
|
|
||
| // TODO: Check odom is 0 linear, 0 angular |
Contributor
There was a problem hiding this comment.
Does this TODO still apply?
|
|
||
| // directly set the Twist message for velocity input | ||
| geometry_msgs::Twist cmd_vel; | ||
| cmd_vel.angular.x = 0; //m/s |
Contributor
There was a problem hiding this comment.
Should this be linear.x = 0?
|
|
||
|
|
||
| // rotate front wheel for 1 seconds | ||
| cmd_vel.angular.z = 0.5; // rad/s, but the limit is 0.2m/s |
Contributor
There was a problem hiding this comment.
// rad/s, but the limit is 0.2 rad/s
Contributor
There was a problem hiding this comment.
Just this one comment (the units at the end should be rad/s) otherwise PR looks good
| } | ||
| EXPECT_NEAR(0.2, odom.twist.twist.linear.x, 0.01); // verify that we're being capped at 0.2m/s | ||
| EXPECT_NEAR(0, odom.twist.twist.angular.z, 0.01); | ||
| EXPECT_NEAR(12.2, odom.pose.pose.position.x, 0.01); // should have driven 0.5m from the start |
Contributor
There was a problem hiding this comment.
// should have driven 0.2 m
|
|
||
| EXPECT_NEAR(0.0, odom.twist.twist.linear.x, 0.01); | ||
| EXPECT_NEAR(0, odom.twist.twist.angular.z, 0.01); | ||
| EXPECT_NEAR(12.2, odom.pose.pose.position.x, 0.01); // should have driven 0.5m from the start |
Contributor
There was a problem hiding this comment.
// should have driven 0.2 m
| ros::spinOnce(); | ||
| } | ||
|
|
||
| // TODO: Check odom is 0 linear, 0 angular |
| ros::spinOnce(); | ||
| } | ||
|
|
||
| // TODO: Check odom is 0 linear, 0 angular |
| // front wheel should have rotated to 0.2 radians, but we didn't move | ||
| EXPECT_NEAR(0.0, odom.twist.twist.linear.x, 0.01); | ||
| EXPECT_NEAR(0.0, odom.twist.twist.angular.z, 0.01); | ||
| EXPECT_NEAR(12.0, odom.pose.pose.position.x, 0.01); // should have driven 0.5m from the start |
Contributor
There was a problem hiding this comment.
// should not have moved from the start
avidbots-kenneth
approved these changes
May 17, 2022
avidbots-cameron
approved these changes
Oct 25, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.