Skip to content

Add DiffDriveOdometry pybind11 interface and examples#314

Merged
ahcorde merged 12 commits intoign-math6from
ahcorde/pybind11/diffdriveodom
Dec 28, 2021
Merged

Add DiffDriveOdometry pybind11 interface and examples#314
ahcorde merged 12 commits intoign-math6from
ahcorde/pybind11/diffdriveodom

Conversation

@ahcorde
Copy link
Copy Markdown
Contributor

@ahcorde ahcorde commented Dec 17, 2021

Signed-off-by: ahcorde ahcorde@gmail.com

🎉 New feature

Summary

This PR creates a DiffDriveOdometry Pybind11 interface and adds examples

Depends on

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

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.

Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde requested a review from scpeters December 17, 2021 11:46
@ahcorde ahcorde self-assigned this Dec 17, 2021
@github-actions github-actions bot added Gazebo 1️1️ Dependency of Gazebo classic version 11 🌱 garden Ignition Garden 🏢 edifice Ignition Edifice 🏯 fortress Ignition Fortress 🏰 citadel Ignition Citadel 🔮 dome Ignition Dome labels Dec 17, 2021
Signed-off-by: ahcorde <ahcorde@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 17, 2021

Codecov Report

Merging #314 (6b9c8d7) into ign-math6 (fc9fb78) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           ign-math6     #314   +/-   ##
==========================================
  Coverage      99.65%   99.65%           
==========================================
  Files             67       67           
  Lines           6364     6364           
==========================================
  Hits            6342     6342           
  Misses            22       22           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc9fb78...6b9c8d7. Read the comment docs.

@chapulina chapulina added the scripting Scripting interfaces to Ignition label Dec 18, 2021
@ahcorde ahcorde marked this pull request as ready for review December 28, 2021 09:34
Copy link
Copy Markdown
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed some formatting for the examples in 7870ccd, now they both should have similar output:

C++

--- Rotate both wheels by 1 degree. ---
  Linear velocity:  0.0872665 m/s
  Odom linear velocity: 0.0872665 m/s
Angular velocity should be zero since the "robot" is traveling
in a straight line:
  Odom angular velocity:  0 rad/s
--- This time rotate the right wheel by 1 degree. ---
The heading should be the arc tangent of the linear distance
traveled by the right wheel (the left wheel was stationary)
divided by the wheel separation.
  Heading:    0.0043633 rad
  Odom Heading:   0.00436332 rad
  X distance traveled:  0.0218166 m
  Odom X:   0.0218166 m
  Y distance traveled:  9.51916e-06 m
  Odom Y:   2.85578e-05 m
Angular velocity should be the difference between the x and y
distance traveled divided by the wheel separation divided by
the seconds elapsed.
  Angular velocity: 0.0217688 rad/s
  Odom angular velocity:  0.0218166 rad/s

Python:

--- Rotate both wheels by 1 degree. ---
  Linear velocity:  0.08726646259971647 m/s
  Odom linear velocity: 0.08726646259971647 m/s
Angular velocity should be zero since the "robot" is traveling
in a straight line:
  Odom angular velocity:  0 rad/s
--- This time rotate the right wheel by 1 degree. ---
The heading should be the arc tangent of the linear distance
traveled by the right wheel (the left wheel was stationary)
divided by the wheel separation.
  Heading:    0.004363295439797267 rad
  Odom Heading:   0.00436332 rad
  X distance traveled:  0.021816574114764897 m
  Odom X:   0.021816574114211357 m
  Y distance traveled:  9.519158445048248e-06 m
  Odom Y:   2.855783779653898e-05 m
Angular velocity should be the difference between the x and y
distance traveled divided by the wheel separation divided by
the seconds elapsed.
  Angular velocity: 0.02176881218188277 rad/s
  Odom angular velocity:  0.0218166 rad/s

I just have one question left

Signed-off-by: Alejandro Hernández <ahcorde@gmail.com>
@ahcorde ahcorde requested a review from chapulina December 28, 2021 19:47
@ahcorde ahcorde merged commit c2ce7d4 into ign-math6 Dec 28, 2021
@ahcorde ahcorde deleted the ahcorde/pybind11/diffdriveodom branch December 28, 2021 21:27
@chapulina chapulina mentioned this pull request Dec 30, 2021
45 tasks
@osrf-triage
Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏰 citadel Ignition Citadel 🔮 dome Ignition Dome 🏢 edifice Ignition Edifice 🏯 fortress Ignition Fortress 🌱 garden Ignition Garden Gazebo 1️1️ Dependency of Gazebo classic version 11 scripting Scripting interfaces to Ignition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants