-
Notifications
You must be signed in to change notification settings - Fork 289
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
Add linear velocity components to links that have linear velocity cmds applied #992
Conversation
…s applied Signed-off-by: Ashton Larkin <ashton@openrobotics.org>
If the user wants the |
I'm not opposed to this, but if we expect the user to create this component themselves, then how can they accurately populate the data for this component? They could set the data of the EDIT: Actually, what I said above does not matter. If the user creates a |
Maybe we don't have this documented very well, but in general, when users want a value like |
Yeah, I just realized this - see my edit on #992 (comment). So, should this PR be closed? If so, I can post on #992 that the solution is to create a |
For beginners, my recommendation would be to encourage them to use Link::EnableVelocityChecks, which creates the necessary components. But I agree that it's a good idea to document that thee components should be created, for power users. |
Codecov Report
@@ Coverage Diff @@
## ign-gazebo3 #992 +/- ##
============================================
Coverage 77.84% 77.84%
============================================
Files 221 221
Lines 12687 12689 +2
============================================
+ Hits 9876 9878 +2
Misses 2811 2811
Continue to review full report at Codecov.
|
I guess my only other remark is that it looks like we currently don't have code in the physics system that would take care of updating a model's velocity if a |
I agree with not adding |
The reason why this is the current behavior is because in the physics system, we get updated
I am not opposed to applying a @azeey what do you think about adding functionality for updating |
I'm on board with setting <model name="M">
<link name="L">
<pose>1 0 0 0 0 0</pose>
</link>
</model> The model frame of The reason we he haven't implemented updates to the |
gazebo-classic does something similar - when vel cmd is set on the model, it applies to all the links and when user requests to get vel, it returns the canonical link's vel: |
Sounds reasonable to me 👍 @luca-della-vedova, for RMF, are you guys okay with using canonical links for now, or would you prefer to use command velocities on models? If adding functionality for updating a model's |
Sounds good, we can use the canonical links for now! |
Okay, thanks! I have opened an issue so that we can track the status of adding I am going to close this PR since it's agreed that it's up to users to generate the |
Signed-off-by: Ashton Larkin ashton@openrobotics.org
🦟 Bug fix
Fixes #966
Summary
When a link has a
LinearVelocityCmd
applied to it in a given simulation step, there's no way to read what the link's linear velocity is in future simulation steps since theLinearVelocityCmd
is "zeroed out" after it is applied. This PR adds aLinearVelocity
andWorldLinearVelocity
component to a link when aLinearVelocityCmd
is applied to it, so that users have a way to read a link's linear velocity in future simulation steps. I've added a test case to check this in the physics system integration test, and have verified that running the test to read linear velocity data from a link with aLinearVelocityCmd
applied to it fails without the other changes made in this PR.We should probably make similar updates for
LinearVelocityCmd
s applied to models, but this will be easier to do starting inign-gazebo5
since we can make use of #736 and #685 (if aLinearVelocityCmd
is applied to a model and we want to createLinearVelocity
andWorldLinearVelocity
components for the model, we could populate the data in these components with the new velocity information from the model's canonical link).On a somewhat related note to this, we could also make similar changes for
AngularVelocityCmd
, so that users who applyAngularVelocityCmd
s can read the corresponding entity's angular velocity data in future simulation steps. We could either open a new PR for this, or add it to this one if this change seems like something worthwhile.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge