-
Notifications
You must be signed in to change notification settings - Fork 283
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
Add TF publishing in MecanumDrive system #1619
Comments
Hi @cccleon , can you please update your feature request to follow the template?
|
It looks like the MecanumDrive system lacks an updateOdometry function unlike the ackermann and diffDrive systems. To get odom and TF you'll need to first calculate accurate odom for a Mec drive, and then copy that odom message exactly over to a Pose_V message for Tf. The publishers are in the mec drive file, but unused. |
Thanks for your reply. You are right. The publisher is defined in line 308 but unused. |
Desired behaviorAdd updateOdometry function in MecanumDrive.cc Implementation suggestionCaculate the odometry message from joint states and publish. Additional contextMaybe users can specify the <robot_base_frame> and <odom_frame> in sdf, thus the plugin can publish the TF between odom frame and robot_base frame as they want.
Thanks for your reply! I think the problem is the lack of updateOdometry function as @andyblarblar mentioned. Desired behaviorAdd updateOdometry function in MecanumDrive.cc Implementation suggestionCaculate the odometry message from joint states and publish. Additional contextMaybe users can specify the <robot_base_frame> and <odom_frame> in sdf, thus the plugin can publish the TF between odom frame and robot_base frame as they want. |
Hi @danilogsch, thank you for your contributions! I added some comments in the gz-math PR gazebosim/gz-math#486 Feel free to ask any question you have! |
HI @ahcorde , |
Thanks for your excellent work!
I use the mecanum plugin in my sdf file:
<plugin filename="ignition-gazebo-mecanum-drive-system" name="ignition::gazebo::systems::MecanumDrive"> <front_left_joint>front_left_wheel_joint</front_left_joint> <front_right_joint>front_right_wheel_joint</front_right_joint> <back_left_joint>rear_left_wheel_joint</back_left_joint> <back_right_joint>rear_right_wheel_joint</back_right_joint> <min_acceleration>-5</min_acceleration> <max_acceleration>5</max_acceleration> </plugin>
By running 'ign topic -l', I can see the topic "/model/xxx/odometry", but I get nothing when I echo this topic.
Additionally, "odom" frame is not in the TF tree, and there is no element like "publish_odom_tf" or "odom_frame" in MecanumDrive.cc, which can be found in the source code of navigation2 tutorial(diff-drive) .The tutorial uses 'libgazebo_ros_diff_drive.so', but I can't find the mecanum_drive.so
The text was updated successfully, but these errors were encountered: