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

[Example 11] Carlike Robot using Bicycle Steering Controller #316

Merged
merged 58 commits into from
Feb 17, 2024
Merged

[Example 11] Carlike Robot using Bicycle Steering Controller #316

merged 58 commits into from
Feb 17, 2024

Conversation

ARK3r
Copy link
Contributor

@ARK3r ARK3r commented Jun 20, 2023

Example with 2 front wheels and 2 rear wheels.

Copying a lot from DiffBot, I would say the only difference is that CarlikeBot uses Ackermann Steering Controller, everything else should be quite similar.

I've also added Carlikebot to ros2_control_demo_description as per the new convention for the robot models.

@ARK3r ARK3r changed the title reserving example 11 [Example 11] Carlike Robot using two of steering controller library derivatives Jun 21, 2023
@ARK3r
Copy link
Contributor Author

ARK3r commented Jan 26, 2024

Here I changed the carlikebot description a little so that I can use the bicycle controller on a 4-wheel vehicle. There are two virtual joints, one for steering and one for traction where carlikebot's actual wheels just mimic the movements of the virtual joints. I think this will be a good baseline for using ackermann on the same urdf with minor changes and adding a couple of arguments to the xacro and launch files.

I have yet to fix the documentation but everything should be functional so I would appreciate it if you could give it a try. I also made some design changes by defining a map for hw_interfaces_ instead of a vector. I believe this will make the code way more readable.

Also I added a node to relay the /tf_odometry topic to /tf which you can activate by calling ros2 launch ros2_control_demo_example_11 carlikebot.launch.py relay_odometry_tf:=true

@ARK3r ARK3r marked this pull request as ready for review January 26, 2024 22:17
@ARK3r
Copy link
Contributor Author

ARK3r commented Jan 26, 2024

One strange thing I'm noticing is when linear.x=0, whatever value angular.z gets, the steering just snaps to $\pm \pi$ which I believe comes from SteeringOdodmetry::get_commands. I'm just not sure what the reason for this is and it feels strange. Wonder if anyone has an explanation.

@ARK3r ARK3r changed the title [Example 11] Carlike Robot using Ackermann Steering Controller [Example 11] Carlike Robot using Bicycle Steering Controller Jan 29, 2024
@ARK3r
Copy link
Contributor Author

ARK3r commented Feb 6, 2024

There is an issue in the URDF: the traction joint of the front wheels has wrong axis. image

this issue is now resolved with the new description.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

One strange thing I'm noticing is when linear.x=0, whatever value angular.z gets, the steering just snaps to ±π which I believe comes from SteeringOdodmetry::get_commands. I'm just not sure what the reason for this is and it feels strange. Wonder if anyone has an explanation.

I think this is fine, because this is a singular point of the inverse kinematics. It would be also fine if the bicycle controller does not accept it, because this does not work with the traction wheel not being the steered one (but with the tricycle model it would work).

There is an issue in the URDF: the traction joint of the front wheels has wrong axis.

this issue is now resolved with the new description.

Perfect.

Here I changed the carlikebot description a little so that I can use the bicycle controller on a 4-wheel vehicle. There are two virtual joints, one for steering and one for traction where carlikebot's actual wheels just mimic the movements of the virtual joints. I think this will be a good baseline for using ackermann on the same urdf with minor changes and adding a couple of arguments to the xacro and launch files.

I'm fine with that. This also is aligned with my nomenclature of ros-controls/ros2_controllers#954 (I'd be happy about some feedback there).

Also I added a node to relay the /tf_odometry topic to /tf which you can activate by calling ros2 launch ros2_control_demo_example_11 carlikebot.launch.py relay_odometry_tf:=true

I changed this to use remapping instead, to avoid a dependency on topic_tools.

@christophfroehlich
Copy link
Contributor

@Mergifyio backport iron humble

Copy link
Contributor

mergify bot commented Feb 17, 2024

backport iron humble

✅ Backports have been created

@christophfroehlich christophfroehlich merged commit edb011a into ros-controls:master Feb 17, 2024
12 checks passed
mergify bot pushed a commit that referenced this pull request Feb 17, 2024
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
(cherry picked from commit edb011a)
mergify bot pushed a commit that referenced this pull request Feb 17, 2024
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
(cherry picked from commit edb011a)
christophfroehlich pushed a commit that referenced this pull request Feb 17, 2024
…449)

Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
(cherry picked from commit edb011a)

Co-authored-by: Reza Kermani <kermani.areza@gmail.com>
christophfroehlich pushed a commit that referenced this pull request Feb 17, 2024
…450)

Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
(cherry picked from commit edb011a)

Co-authored-by: Reza Kermani <kermani.areza@gmail.com>
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.

3 participants