iRobotEducation / create3_sim

ROS 2 Simulation for the iRobot® Create® 3 Educational Robot
BSD 3-Clause "New" or "Revised" License
110 stars 56 forks source link

Description fixes #200

Closed roni-kreinin closed 1 year ago

roni-kreinin commented 1 year ago

Description

For the bumper I have renamed the main link that sets the visual and collision to "bumper" and added a "bump_front_center" dummy link for the front center bump sensor. This way the transform published by the robot does not offset the bumper mesh.

For the wheel drops I added a static transform publisher for each wheel.

Fixes #125 and #170.

Type of change

How Has This Been Tested?

Tested on physical robot. RVIZ no longer shows the wheel drop error and the bumper is in the correct position.

image

image

Checklist

alsora commented 1 year ago

Hi @roni-kreinin, I tested this PR but I see some problems.

roni-kreinin commented 1 year ago

@alsora With the latest changes I am able to see the odom topic correctly.

~/create3_ws/src# ros2 topic info /odom --verbose
Type: nav_msgs/msg/Odometry

Publisher count: 1

Node name: diffdrive_controller
Node namespace: /
Topic type: nav_msgs/msg/Odometry
Endpoint type: PUBLISHER
GID: 01.10.27.94.d9.0b.90.04.2d.70.f3.e1.00.00.69.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RELIABLE
  History (Depth): KEEP_LAST (1)
  Durability: VOLATILE
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

Subscription count: 2

Node name: motion_control
Node namespace: /
Topic type: nav_msgs/msg/Odometry
Endpoint type: SUBSCRIPTION
GID: 01.10.a0.d9.79.9a.f6.ec.36.fd.43.74.00.00.5a.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: BEST_EFFORT
  History (Depth): KEEP_LAST (5)
  Durability: VOLATILE
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

Node name: robot_state
Node namespace: /
Topic type: nav_msgs/msg/Odometry
Endpoint type: SUBSCRIPTION
GID: 01.10.ad.7a.5f.93.83.2a.98.20.3c.2b.00.00.19.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: BEST_EFFORT
  History (Depth): KEEP_LAST (5)
  Durability: VOLATILE
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

Although I can see that the QoS are not the same.

I still see the errors in RViz when the fixed frame is odom though. From the tf tree I can see that the transforms for the wheeldrops are not being stamped with sim time, which may be the issue.

image

alsora commented 1 year ago

The sim-time thing was reported here https://github.com/iRobotEducation/create3_sim/issues/203 with a proposed fix.

roni-kreinin commented 1 year ago

Yep, that fixed it.

I will test if the static transforms are needed after this fix.

roni-kreinin commented 1 year ago

image

Looks good to me.