Fix velocity control for slotcar in Ignition TPE #40
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.
Bug fix
Fixed bug
Slotcar in Ignition was relying on an incorrect behavior for velocity control. Specifically it was reading
JointVelocityCmd
to estimate the current robot's velocity, however that component is meant as a write only and the behavior of it being read back to the last command was actually not intended, and it has been fixed with it now always being read as 0.Fix applied
Now slotcar reads the velocity from the model's canonical link and uses it for velocity control, unfortunately when using dartsim as a physics engine the robot's friction slows down the robots a lot and they barely move, however this PR fixes behavior under TPE.
To test:
ros2 launch rmf_demos_ign office.launch.xml use_tpe:=1
Robots will move after the PR but will be stuck before. Note that doors in TPE don't work since they require an old PR to be picked up again and merged.
Requires ign-physics #289 so it should be tested with a source build of Ignition with the branch above (until it gets merged)