Hi @KeithW, (Heavily edited post so ignore any emailed versions)
Moving back a link from the Tuning Guide, to:
navigation/Tutorials/RobotSetup/TF - ROS Wiki
I read:
“base_link” (for navigation, its important that this be placed at the rotational center of the robot)
and wondered what we are using?
The base_link of the URDF models of “Hands On ROS For Robotic Programming” is the center of a square box, and the wheels rotate about that base_link:
<joint name="joint_left_wheel" type="continuous">
<parent link="base_link"/>
<child link="left_wheel"/>
<origin xyz="0 0.30 0" rpy="0 0 0" />
<axis xyz="0 1 0" />
</joint>
I thought I followed the book’s pattern in building Dave’s URDF model, keeping the base_link at the center of the body box, and offset the wheels 20mm forward of the center of the box:
<joint name="joint_left_wheel" type="continuous">
<parent link="base_link"/>
<child link="left_wheel"/>
<origin xyz="0.020 0.058 0.0325" rpy="0 0 0" />
<axis xyz="0 1 0" />
</joint>
Do you have your center of rotation at the base_link?
Somewhere I copied something I called keith_gpg.urdf which would seem to have your center of rotation 100mm in front of the base_link:
<!-- Left Wheel JOINT base_link -->
<joint name="joint_left_wheel" type="continuous">
<parent link="base_link"/>
<child link="left_wheel"/>
<origin xyz="0.1 0.15 0.0125" rpy="0 0 0" />
<axis xyz="0 1 0"/>
</joint>
Apparently it is important that the wheel link x value be 0, so I need to change my base_link visual box, the castor, the distance sensor joint, and the joint_ydlidar to put everything relative to the virtual axle between the wheels.
What I’m rebuilding my URDF with:
<!-- GoPiGo3 as 216mm long, 103mm wide, 4mm thick plates (blue) -->
<!-- with a 3/4 inch castor holding the chassis level (blue) -->
<!-- with (effective) 66.77mm dia 25mm wide wheels (black) spaced 106mm (Wheel base) apart -->
<!-- NOTE: The center of rotation must be at xyz="0 0 X" of the base link -->
<!-- therefore the wheel joints' x value must be 0 -->
<!-- The chassis center is 20mm back of the center of rotation (wheels) -->
<!-- DI Distance Sensor is 95mm in front of wheels -->
<!-- The LIDAR is ~22mm behind the center of rotation (wheels) -->
<!-- (A bit hard to measure after assembled.)