iRobotEducation / create3_docs

Documentation for the iRobot® Create®3 Educational Robot
BSD 3-Clause "New" or "Revised" License
49 stars 16 forks source link

ir_intensity /tf_static transforms do not match mechanical drawing or URDF #561

Open slowrunner opened 6 months ago

slowrunner commented 6 months ago

Discussed in https://github.com/iRobotEducation/create3_docs/discussions/499

Originally posted by **slowrunner** January 4, 2024 ### How are you connecting to your Create 3? Wi-Fi (ROS 2) ### Computer(s) Model(s) and Operating System(s) _No response_ ### Which version of ROS 2 is installed on your computer? Humble ### Which firmware version is installed on your robot? H.2.3 ### Which RMW is your robot running? FastRTPS ### Does your robot have an assigned namespace? If so, please share. _No response_ ### Is the robot connected to a network? If so, what is the network type? Yes: 2.4GHz Home WiFi ### Are there multiple Create 3 robots connected to your network? No ### Is multicast enabled? Yes ### What is the Adapter Board's USB/BLE Toggle currently switched to? Bluetooth (default) ### Describe your question. Where is the URDF the Create3 is actually using to broadcast tf2 transforms? For the right_wheel, the Create3 broadcasts: ``` $ ros2 run tf2_ros tf2_echo base_link right_wheel At time 0.0 - Translation: [0.000, -0.116, 0.036] - Rotation: in Quaternion [-0.707, 0.000, 0.000, 0.707] - Rotation: in RPY (radian) [-1.571, 0.000, 0.000] - Rotation: in RPY (degree) [-90.000, 0.000, 0.000] - Matrix: 1.000 -0.000 0.000 0.000 0.000 -0.000 1.000 -0.116 -0.000 -1.000 -0.000 0.036 0.000 0.000 0.000 1.000 ``` Which would be 232mm or 233 if the full precision value is 0.1615. This would seem to match the URDF of create3_sim (distance_between_wheels = 23.3*cm2m divided by 2), and the roughly 233-234mm measurement of my Create3, but not the Create3 docs mechanical drawing which states 235.0 mm. ! BUT the Create3 is also broadcasting the base_link to ir_intensity_right sensor as: ``` $ ros2 run tf2_ros tf2_echo base_link ir_intensity_right At time 0.0 - Translation: [0.081, -0.155, 0.052] - Rotation: in Quaternion [0.000, 0.000, -0.519, 0.855] - Rotation: in RPY (radian) [0.000, 0.000, -1.092] - Rotation: in RPY (degree) [0.000, 0.000, -62.567] <<--- - Matrix: 0.461 0.888 0.000 0.081 -0.888 0.461 -0.000 -0.155 -0.000 0.000 1.000 0.052 0.000 0.000 0.000 1.000 ``` which I believe says the "ir_intensity_right" sensor is pointed -62.6 degrees CW from the Create3 heading This value does not match either the mechanical drawing value of -65.3 degrees, nor the create3_sim URDF value of -75 degrees (rpy=[0 0 -1.309] radians). I understand the create3_sim URDF might have been simplified or perhaps pre-dated the physical robot, but it is the only URDF I have found. … Additionally - front_center_left tf2 transform is broadcast as 2.636 degrees CCW from robot heading ``` $ ros2 run tf2_ros tf2_echo base_link ir_intensity_front_center_left At time 0.0 - Translation: [0.175, 0.008, 0.052] - Rotation: in Quaternion [0.000, 0.000, 0.023, 1.000] - Rotation: in RPY (radian) [0.000, -0.000, 0.046] - Rotation: in RPY (degree) [0.000, -0.000, 2.636] - Matrix: 0.999 -0.046 0.000 0.175 0.046 0.999 0.000 0.008 0.000 0.000 1.000 0.052 0.000 0.000 0.000 1.000 ``` UPDATE all sensors summary: * IR Intensity Sensor Orientation Angle (yaw from forward 0 deg) ``` Sensor tf2 |Mech Drawing| URDF - side_left: 57.3 deg | 65.3 deg | 75.0 deg - left: 36.0 deg | 38.0 deg | 50.0 deg - front_left: 19.1 deg | 20.0 deg | 25.0 deg - front_center_left: 2.6 deg | 3.0 deg | 0.0 deg (defaulted) - front_center_right: -13.8 deg | -14.25 deg | -25.0 deg - front_right: -32.3 deg | -34.0 deg | -50.0 deg _ right: -62.6 deg | -65.3 deg | -75.0 deg $ ros2 run tf2_ros tf2_echo base_link ir_intensity_side_left - Translation: [0.095, 0.147, 0.052] - Rotation: in Quaternion [0.000, 0.000, 0.479, 0.878] - Rotation: in RPY (radian) [0.000, -0.000, 1.000] - Rotation: in RPY (degree) [0.000, -0.000, 57.296] $ ros2 run tf2_ros tf2_echo base_link ir_intensity_left - Translation: [0.141, 0.103, 0.052] - Rotation: in Quaternion [0.000, 0.000, 0.309, 0.951] - Rotation: in RPY (radian) [0.000, -0.000, 0.629] - Rotation: in RPY (degree) [0.000, -0.000, 36.039] $ ros2 run tf2_ros tf2_echo base_link ir_intensity_front_left - Translation: [0.165, 0.057, 0.052] - Rotation: in Quaternion [0.000, 0.000, 0.166, 0.986] - Rotation: in RPY (radian) [0.000, -0.000, 0.333] - Rotation: in RPY (degree) [0.000, -0.000, 19.079] $ ros2 run tf2_ros tf2_echo base_link ir_intensity_front_center_left - Translation: [0.175, 0.008, 0.052] - Rotation: in Quaternion [0.000, 0.000, 0.023, 1.000] - Rotation: in RPY (radian) [0.000, -0.000, 0.046] - Rotation: in RPY (degree) [0.000, -0.000, 2.636] $ ros2 run tf2_ros tf2_echo base_link ir_intensity_front_center_right - Translation: [0.170, -0.042, 0.052] - Rotation: in Quaternion [0.000, 0.000, -0.120, 0.993] - Rotation: in RPY (radian) [0.000, 0.000, -0.240] - Rotation: in RPY (degree) [0.000, 0.000, -13.751] $ ros2 run tf2_ros tf2_echo base_link ir_intensity_front_right - Translation: [0.148, -0.094, 0.052] - Rotation: in Quaternion [0.000, 0.000, -0.278, 0.961] - Rotation: in RPY (radian) [0.000, 0.000, -0.564] - Rotation: in RPY (degree) [0.000, 0.000, -32.315] $ ros2 run tf2_ros tf2_echo base_link ir_intensity_right - Translation: [0.081, -0.155, 0.052] - Rotation: in Quaternion [0.000, 0.000, -0.519, 0.855] - Rotation: in RPY (radian) [0.000, 0.000, -1.092] - Rotation: in RPY (degree) [0.000, 0.000, -62.567] ```
alsora commented 6 months ago

The turtlebot4 URDF references

This is the urdf of the create3_sim repository, that you already found (here https://github.com/iRobotEducation/create3_sim/tree/main/irobot_create_common/irobot_create_description/urdf)

Where is the URDF the Create3 is actually using to broadcast tf2 transforms?

The create 3 robot internally doesn't use an urdf to broadcast the tf2 transforms. So the only urdf available is the one from the sim repository.

I'll check why there's a difference in the values among those different sources (sim-urdf, robot, mechanical drawings).