Skip to content
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

Steering odometry library and controllers #484

Merged

Conversation

petkovich
Copy link
Contributor

@petkovich petkovich commented Dec 21, 2022

We have noticed that the current implementations of steering mobile robot controllers (tricycle and ackermann) share much of the functionality but implement it differently. This PR proposes using a base SteeringController class/file and an implementation class/file for each mobile robot configuration. The SteeringOdometry is used for calculating open and closed loop odometry, as well as commands that need to be sent to the hardware. The new odometry fully supports different velocities of traction wheels.

This PR does not encapsulate some features that probably should be implemented in the future, for example:

  • support ackermann_msg reference messages

Robotgir and others added 30 commits December 3, 2022 21:27
…timeout updated template/ updated .hpp of controller
…ryhere is xyz) inside generated parameters.hpp, removed _ros2 from the namespace name, pkg compiles without any error,
…os2 addition in the namespace naming of the parameters.hpp file
@mergify
Copy link
Contributor

mergify bot commented Apr 29, 2023

This pull request is in conflict. Could you fix it @petkovich?

@ARK3r
Copy link
Contributor

ARK3r commented May 9, 2023

I would like to start testing the ackermann controller (for personal and community gains hopefully) to expedite the process of getting these changes pushed to the repo.

I'm looking at f1tenth car with the urdf provided here.

The model looks like this:
Screenshot from 2023-05-09 16-37-33

So I'm wondering

  • firstly if the apache 2.0 is a good license for proceeding with getting this possibly integrated into the ros2_control demos as well and if not what other available models should I go ahead with,
  • and secondly I tried to build the odometry library branch of ros2_controllers from stogl-robotics-forks with ros2_control main branch and it was failing. What configuration should I use to have it build properly or are there any dockers that help me with the build?

@christophfroehlich
Copy link
Contributor

christophfroehlich commented May 10, 2023

  • firstly if the apache 2.0 is a good license for proceeding with getting this possibly integrated into the ros2_control demos as well and if not what other available models should I go ahead with,

Apache 2.0 is the same license as others in ros-controls, I think you can use this one.

The problem is that the joint_trajectory_controller does not build since we updated the controller_state message without deprecation period in the rolling branch. Try to merge the master into this branch and it should run, unless @petkovich pushes it to the PR.

steering_controllers_library/doc/userdoc.rst Outdated Show resolved Hide resolved
steering_controllers_library/doc/userdoc.rst Outdated Show resolved Hide resolved
steering_controllers_library/doc/userdoc.rst Show resolved Hide resolved
steering_controllers_library/doc/userdoc.rst Outdated Show resolved Hide resolved
Comment on lines 72 to 75
- <controller_name>/reference [geometry_msgs/msg/TwistStamped]
**NOTE**: Parameter ``use_stamped_vel`` is ``true``.
- <controller_name>/reference_unstamped [geometry_msgs/msg/Twist]
**NOTE**: Parameter ``use_stamped_vel`` is ``true``.
Copy link
Contributor

Choose a reason for hiding this comment

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

This list is not rendered properly in rst.

What does the note mean? It expects it to be true, or it will force it to true?

Suggested change
- <controller_name>/reference [geometry_msgs/msg/TwistStamped]
**NOTE**: Parameter ``use_stamped_vel`` is ``true``.
- <controller_name>/reference_unstamped [geometry_msgs/msg/Twist]
**NOTE**: Parameter ``use_stamped_vel`` is ``true``.
- <controller_name>/reference [geometry_msgs/msg/TwistStamped]
- <controller_name>/reference_unstamped [geometry_msgs/msg/Twist]
.. note::
Parameter ``use_stamped_vel`` is ``true``.

@ARK3r
Copy link
Contributor

ARK3r commented May 10, 2023

I built the docker image with the steering controllers and made a bare bone ros2 package for the f1tenth urdf. I'm thinking my next step would be to port the urdf to gazebo and configure the Ackermann controller then get it to work with gazebo.

Any possible suggestions how I should alter this course of action? Should I use something besides gazebo classic? I've never used gazebo nor have I set up ros2 control before.

@christophfroehlich
Copy link
Contributor

christophfroehlich commented May 10, 2023

Then I'd suggest that first you should get familiar with the demos from ros2_control_demos. Have a look on example_2, which uses a simple simulation of the DiffBot within the hardware component. You could adapt this component to test the library of this PR.
Because this is rather off topic to this PR, please open a new issue or post it on answers.ros.org if you need further help

ARK3r added 2 commits May 19, 2023 21:11
* fixed some time-sync related test failures

Changed Times to be in RCL_ROS_TIME

* needed blank line at the end of file

* fully resolved time related test fails

* fixed typo
@bmagyar bmagyar changed the title Steering odometry library Steering odometry library and controllers May 22, 2023
bmagyar and others added 2 commits May 22, 2023 20:46
* fixed some time-sync related test failures

Changed Times to be in RCL_ROS_TIME

* needed blank line at the end of file

* fully resolved time related test fails

* fixed typo

* fixed not initialized test failure

* removed trailing whitespace
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

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

Marking this mammoth to be auto-merged

@bmagyar bmagyar enabled auto-merge (squash) May 26, 2023 20:38
@bmagyar bmagyar disabled auto-merge May 26, 2023 21:34
@bmagyar bmagyar merged commit 45d0083 into ros-controls:master May 26, 2023
10 of 12 checks passed
@destogl
Copy link
Member

destogl commented May 27, 2023

@Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented May 27, 2023

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request May 27, 2023
destogl pushed a commit to StoglRobotics-forks/ros2_controllers that referenced this pull request May 31, 2023
destogl added a commit that referenced this pull request Jun 1, 2023
* Steering odometry library and controllers (#484)

(cherry picked from commit 45d0083)

* Revert Rolling mean accumulator (#637)
* Move reference timeout management into `update_and_write_commands` to have access to the proper time variable.

---------

Co-authored-by: Tomislav Petković <51706321+petkovich@users.noreply.github.com>
Co-authored-by: Reza Kermani <kermani.areza@gmail.com>
Co-authored-by: Denis Štogl <denis@stoglrobotics.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants