-
Notifications
You must be signed in to change notification settings - Fork 276
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
New trajectory follower system #1332
Conversation
Signed-off-by: Carlos Agüero <[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.
works well for me after fixing the force that's applied to objects.
left a couple of other minor suggestions.
filename="ignition-gazebo-trajectory-follower-system" | ||
name="ignition::gazebo::systems::TrajectoryFollower"> | ||
<link_name>box_link</link_name> | ||
<loop_forever>true</loop_forever> |
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.
suggestion to name this <loop>
for consistency with actor's loop param
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.
Changed in f082490.
if (this->dataPtr->localWaypoints.empty()) | ||
return; | ||
|
||
//this->dataPtr->modelPose = this->dataPtr->link.WorldPose(_ecm); |
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.
remove?
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.
Removed in f082490.
//this->dataPtr->modelPose = this->dataPtr->link.WorldPose(_ecm); | ||
this->dataPtr->modelPose = ignition::gazebo::worldPose( | ||
this->dataPtr->link.Entity(), _ecm); | ||
// (*this->dataPtr->modelPose).Pos().Z() = 0; |
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.
remove?
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.
Removed in f082490.
|
||
// Parse the optional <torque> element. | ||
if (_sdf->HasElement("torque")) | ||
this->forceToApply = _sdf->Get<double>("torque"); |
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.
forceToApply
-> torqueToApply
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.
after fixing this, I made both <force>
and <torque>
in demo world file to be 10
and the box moves nicely without too much overshooting when rotating
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.
Good catch, changed in f082490.
/// The block should contain the relative direction and distance from | ||
/// the initial position in which the vehicle should move, specified | ||
/// in the world frame. | ||
/// <direction>: Relative direction (degrees) in the world frame for |
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 think most of our angles are specified in radians? For the <pose>
element in particular, there is a bool degrees attribute to indicate if it's degrees or not. Don't have strong opinion on this though.
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.
Changed to radians in f082490.
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.
thanks, I updated doc in 0927042
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Carlos Agüero <[email protected]>
Signed-off-by: Ian Chen <[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.
looks good to me.
there's a windows build error:
|
Signed-off-by: Ian Chen <[email protected]>
pushed a fix in 9a1ddd9 |
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo6 #1332 +/- ##
============================================
Coverage 62.06% 62.06%
============================================
Files 278 278
Lines 23378 23378
============================================
Hits 14510 14510
Misses 8868 8868 Continue to review full report at Codecov.
|
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-03-01-citadel-edifice-fortress/1313/1 |
I'm porting this forward in #1380 and it doesn't work out of the box in Garden. I'm looking into it. I also noticed that the plugin was added without a test. We should add one. |
Signed-off-by: Carlos Agüero [email protected]
🎉 New feature
Summary
This system adds a very basic trajectory follower applied to a model. The trajectory is performed by applying forces and torques to a link. It's possible to specify the trajectory in three ways:
Note that trajectories are in 2D.
Test it
Run the
trajectory_follower.sdf
example to see it in action with a box.You can see a more interesting example here.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.