ROS1 Base to Laser Static Transform - dont think I have got it right?
ROS Noetic on Ubuntu 20.04 64 Bit on Pi 3 with Waveshare PCA9685 based Motor Driver and LD19 LIDAR.
I setup a basic ROS1 robot adapting the Tutorial here: https://snapcraft.io/blog/your-first-... and then added PID to the motor controller and added the LD19 LIDAR following the instructions here: https://github.com/ldrobotSensorTeam/... I want to get to the point where I can add SLAM etc to it.
I have adjusted the static transformation of the Lidar to move it forwards from the center of my robot and rotate it by 90 deg - and the front of the Lidar now seems to be the front of the robot.
<node name="base_to_laser_ld19" pkg="tf" type="static_transform_publisher" args="0.04 0.0 0.11 1.571 0.0 0.0 base_link base_laser 50" if="$(arg fix_to_base_link)"/>
Me holding a PCB up directly in front of the robot:
But, my Green lines are not pointing in the same direction? My base_link doesnt seem to be facing forward like my Lidar is?
Then even more confusing, when I hold the PCB off to the Left of the robot (from the point of view of sitting in the robot): https://i.ibb.co/JxBjwq5/20230630-123... it shows as off to the Right: https://i.ibb.co/hMRCqsM/20230630-123... and vice versa - holding to the right: https://i.ibb.co/TbXHZwQ/20230630-123... it shows to the left: https://i.ibb.co/XXGfWbC/20230630-123...
I have edited my ld19.launch file to tell it the Lidar is spinning in the clockwise direction (I swear it is spinning clockwise). But the ld19 manual https://www.elecrow.com/download/prod... does say something about this "Since the point cloud data of our lidar product follows the left-handed coordinate system (clockwise), and Rviz shows that the radar point cloud data follows the right-handed coordinate system counterclockwise), we performed the product point cloud data in the function package source code toLaserScan function. The coordinate system is transformed so that it can display the point cloud normally in Rviz."
All of my Workspace is here: https://github.com/KevWal/ROS-Bot-Wor...
Thanks very much in advance. Kevin