-
Notifications
You must be signed in to change notification settings - Fork 277
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
VelocityCmd components applied to models don't have any effect #966
Comments
Thanks for pointing out the issue. I have written a test that does fail to move a model when applying a However, I am unable to see a behavior change before/after #678. I have tried running this test before and after #678, but it always fails no matter which commit/release of |
oh and is the demo using dart or tpe? |
It seems the test world
It happened on both dart and TPE |
Sorry about that! I've added the world in f2cba0b |
@luca-della-vedova I am able to run the following example that applies a command velocity to a model, which moves the model: https://github.com/ignitionrobotics/ign-gazebo/compare/adlarkin/linVelCmdTest. This example is based on the latest commit of @iche033 pointed out that default plugins aren't loaded if a user specifies their own plugins in a SDF file (c2834e0#r54822602). In the SDF file you provided in the issue description, it looks like you define a custom plugin, which means that you'll probably need to add in other plugins like physics in order to get desired behavior. Can you try modifying your SDF file based on the recommendations in c2834e0#r54822602 and let me know if the issue still persists for you? On a side note, I'm not sure why the visual example I mentioned above is working, but the test I wrote is failing. Here's everything I've done for the test. If someone sees something wrong I'm doing in the test, please let me know! https://github.com/ignitionrobotics/ign-gazebo/compare/adlarkin/linVelCmd |
For reference this is the world, we actually redefine all the systems / GUI elements to be safe. I'll try your examples now and see how they behave |
OK it has been quite the debugging journey! I think it is not quite correct to read I pushed an example that is closer to what we actually do in Apologies for the wrong information but I hope this example can help, maybe we are doing something wrong and actually relied on some buggy behavior before? |
You're assumption is correct: looking at the physics system (
At first glance, I'm not sure either 😂 #678 did not touch any of the code that applies/resets linear velocities via command components. So, I'll have to take a closer look at how #678 changed behavior.
No apology needed! It sounds like we've had buggy behavior that has gone unnoticed until now 🙃 Based on our discussion, I think there are a few things that need to be addressed:
I will go ahead and work on addressing the two things I mentioned above (if there's anything else you'd like me to investigate, let me know). Once everything has been addressed, the correct behavior on your end should be to set |
@luca-della-vedova I have proposed a fix for links in #992 that would allow for users to apply a I made this change in Citadel because I found that this behavior is broken for all released versions. So, what we can do is merge #992 forward to other released versions if it seems like a good solution. I have not made the fix for when So, for now, assuming that #992 gets merged, I believe what you can do to fix the buggy behavior in RMF is apply Also, regarding the test I wrote earlier in this thread that I couldn't get to work - I found that it was because I was applying a |
Following up the discussion in #992, I changed the example to read the velocity components on the CanonicalLink and I am still a bit puzzled at the result.
I played a bit with the model and noticed that depending on the size of the box's collision item, the box behaves differently, for example:
The behavior is also dependent on the I guess my final question is whether it is intended that when applying a |
Whether this behavior was intentional or not, I am not sure - however, looking at the physics system, |
It looks like the current implementation with DART as the physics engine does not compensate for friction or any other forces when applying a This, unfortunately, does not follow the pattern we have for
So to answer the question, I don't think it was intended. A better name for the current |
Thanks for the explanation! I think that @luca-della-vedova is using TPE though, so if the behavior that was explained in #966 (comment) is when TPE is used, then I assume that we can fix the TPE behavior since it's a plugin inside of |
TPE was only used as a fallback after we observed the issues with friction that made controlling robots through |
Environment
Ubuntu 20.04, Ignition Edifice source build (latest ign-gazebo5 branch).
Description
We relied on using
LinearVelocityCmd
andAngularVelocityCmd
to apply velocities at the model level in our robot simulation plugins. However, I noticed that recently the commands don't have any effect.An example SDF that we use this plugin with is here.
I ran
git bisect
and found out the exact commit that introduced this behavior, #678. I didn't look into the commit diff too much but my guess is that, since we are applying the velocity to a model entity and not a link entity it is skipped by that optimization PR.I wonder if there was a recommended way to adapt our plugin or if this is something that should be fixed in the core code. I tried to fetch the model's canonical link through the
ModelCanonicalLink
component and applying the velocities to it but didn't have much success.Steps to reproduce
It is arguably a bit complicated, it would require setting up the whole
rmf_demos
workspace, but let me know if you want detailed instructions.The text was updated successfully, but these errors were encountered: