iRobotEducation / create3_examples

Example nodes to drive the iRobot® Create® 3 Educational Robot
BSD 3-Clause "New" or "Revised" License
51 stars 12 forks source link

Latest Lidar Humble Package Broken #50

Closed scottcandy34 closed 4 months ago

scottcandy34 commented 5 months ago

I have the latest ubuntu 22.04 server running on the PI4B and the latest code under the humble branch is broken. I have looked over the commits and I can't figure out what had been changed. The original code worked great and still does when I run it. here is the commit branch that works still https://github.com/iRobotEducation/create3_examples/tree/cec3e1a5f4781a8b910de13dec12f1ca22e367d7

Here is the console output with command that has it broken and the scan topic does not start because of this.

gcc@ubuntu:~/ros2_ws$ ros2 launch create3_lidar_slam sensors_launch.py
[INFO] [launch]: All log files can be found below /home/gcc/.ros/log/2024-01-26-13-49-31-145006-ubuntu-6156
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [static_transform_publisher-1]: process started with pid [6172]
[static_transform_publisher-1] [WARN] [1706294971.630396616] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-1] [INFO] [1706294971.671642238] [static_transform_publisher_muODP7AlEMtH75KH]: Spinning until stopped - publishing transform
[static_transform_publisher-1] translation: ('-0.012000', '0.000000', '0.144000')
[static_transform_publisher-1] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-1] from 'base_footprint' to 'laser_frame'
[INFO] [rplidar_composition-2]: process started with pid [6197]
[rplidar_composition-2] [INFO] [1706294973.679890697] [rplidar_composition]: RPLidar running on ROS2 package rplidar_ros. RPLIDAR SDK Version:2.0.0
[rplidar_composition-2] [ERROR] [1706294977.733637744] [rplidar_composition]: Error, operation time out. SL_RESULT_OPERATION_TIMEOUT! 
[ERROR] [rplidar_composition-2]: process has died [pid 6197, exit code 255, cmd '/opt/ros/humble/lib/rplidar_ros/rplidar_composition --ros-args -r __node:=rplidar_composition -r __ns:=/ --params-file /home/gcc/create3_examples_ws/install/create3_lidar_slam/share/create3_lidar_slam/config/rplidar_node.yaml'].

here is it working from the older branch that I reference above.

gcc@ubuntu:~/ros2_ws$ ros2 launch create3_lidar sensors_launch.py
[INFO] [launch]: All log files can be found below /home/gcc/.ros/log/2024-01-26-13-49-44-599246-ubuntu-6255
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [static_transform_publisher-1]: process started with pid [6265]
[INFO] [rplidar_composition-2]: process started with pid [6267]
[static_transform_publisher-1] [WARN] [1706294985.090244993] []: Old-style arguments are deprecated; see --help for new-style arguments
[rplidar_composition-2] [INFO] [1706294985.131224375] [rplidar_node]: RPLidar running on ROS2 package rplidar_ros. RPLIDAR SDK Version:2.0.0
[static_transform_publisher-1] [INFO] [1706294985.141901430] [static_transform_publisher_cJ3tcopAGbPMPw20]: Spinning until stopped - publishing transform
[static_transform_publisher-1] translation: ('-0.012000', '0.000000', '0.144000')
[static_transform_publisher-1] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-1] from 'base_footprint' to 'laser_frame'
[rplidar_composition-2] [INFO] [1706294985.185822397] [rplidar_node]: RPLidar S/N: 8381EDF9C7E29BD1A7E39EF21352431B
[rplidar_composition-2] [INFO] [1706294985.186026599] [rplidar_node]: Firmware Ver: 1.29
[rplidar_composition-2] [INFO] [1706294985.186082691] [rplidar_node]: Hardware Rev: 7
[rplidar_composition-2] [INFO] [1706294985.237435872] [rplidar_node]: RPLidar health status : 0
[rplidar_composition-2] [INFO] [1706294985.237581408] [rplidar_node]: RPLidar health status : OK.
[rplidar_composition-2] [INFO] [1706294985.237632907] [rplidar_node]: Start
[rplidar_composition-2] [INFO] [1706294985.932674995] [rplidar_node]: current scan mode: Sensitivity, sample rate: 8 Khz, max_distance: 12.0 m, scan frequency:10.0 Hz, 

This works and the scan topic exists. and if you echo it shows the scans as you would expect. Now even though the error is the same as my previous issue here https://github.com/iRobotEducation/create3_examples/issues/41 it is not the same issue since the original code that was used here works well and I understand what I did wrong. But now its unknown what was done wrong. since the new code is the problem from my testing.

I could really use help to figure this out or get some hotfixes in to fix the code.

scottcandy34 commented 5 months ago

@slowrunner Sorry Reload I accidently created the issue before I could make a comment.

scottcandy34 commented 5 months ago

Ok I figured it out. Can you delete this line.

https://github.com/iRobotEducation/create3_examples/blob/humble/create3_lidar_slam/launch/sensors_launch.py#L41

The rplidar_composition does not like this and throws an error. Changing the name will not work either. It needs to be removed

I can put in a pull request for this if you would like.

scottcandy34 commented 5 months ago

This is the output once that line gets removed.

gcc@ubuntu:~/ros2_ws$ ros2 launch create3_lidar_slam sensors_launch.py
[INFO] [launch]: All log files can be found below /home/gcc/.ros/log/2024-01-26-14-45-06-242419-ubuntu-15054
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [static_transform_publisher-1]: process started with pid [15070]
[static_transform_publisher-1] [WARN] [1706298306.726169622] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-1] [INFO] [1706298306.767661462] [static_transform_publisher_2oAi9aUZ053DHeBh]: Spinning until stopped - publishing transform
[static_transform_publisher-1] translation: ('-0.012000', '0.000000', '0.144000')
[static_transform_publisher-1] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-1] from 'base_footprint' to 'laser_frame'
[INFO] [rplidar_composition-2]: process started with pid [15095]
[rplidar_composition-2] [INFO] [1706298308.776607173] [rplidar_node]: RPLidar running on ROS2 package rplidar_ros. RPLIDAR SDK Version:2.0.0
[rplidar_composition-2] [INFO] [1706298308.830661832] [rplidar_node]: RPLidar S/N: 8381EDF9C7E29BD1A7E39EF21352431B
[rplidar_composition-2] [INFO] [1706298308.830868867] [rplidar_node]: Firmware Ver: 1.29
[rplidar_composition-2] [INFO] [1706298308.830970236] [rplidar_node]: Hardware Rev: 7
[rplidar_composition-2] [INFO] [1706298308.882440884] [rplidar_node]: RPLidar health status : 0
[rplidar_composition-2] [INFO] [1706298308.882624345] [rplidar_node]: RPLidar health status : OK.
alain-lnpcrd commented 4 months ago

Hi, I've been tearing my hair out for over a month 1 lidar return on amazon.fr 1 more in preparation elsewhere A great thank you

scottcandy34 commented 4 months ago

Should I just make a pull request to fix this or will someone else do that?

It seams other people are having problems with this and are getting the wrong help since the errors are similar for the help that's offered. https://github.com/iRobotEducation/create3_docs/discussions/513 https://github.com/iRobotEducation/create3_docs/discussions/520

It would be awful if more people run into this after pulling the latest package.

shamlian commented 4 months ago

Thanks all, sorry for the delay. You've root-caused this correctly and I will fix it. (The config file get_package_share_directory("create3_lidar_slam") + '/config/rplidar_node.yaml' indicates a name for the node, but that line is changing the name.)

shamlian commented 4 months ago

PR here: https://github.com/iRobotEducation/create3_examples/pull/51 . Once merged, this ticket will be closed.

scottcandy34 commented 4 months ago

Once again @shamlian your awesome thx.

shamlian commented 4 months ago

That's very kind, thanks; you did all the work! 😅