laser_filter.yaml limits in linorobot2 are incorrect for ld19 lidar #59
Replies: 12 comments 3 replies
-
The limit should be -3.14 and +3.14 for 360 degrees scan. I updated the wiki. https://github.com/hippo5329/linorobot2_hardware/wiki#laser-filter |
Beta Was this translation helpful? Give feedback.
-
I think the angle bound should be depended on angle_min and angle_max. So 0 and 6.28 should be used for ld19. |
Beta Was this translation helpful? Give feedback.
-
I think it will be easier to revert to square filter. I will update the filter later. |
Beta Was this translation helpful? Give feedback.
-
ldrobot ld19 scan angle: 0 to 360 degrees. The scan message def said only, "with zero angle being forward along the x axis". All of them are correct. But ldlidar is different from others. https://docs.ros2.org/foxy/api/sensor_msgs/msg/LaserScan.html |
Beta Was this translation helpful? Give feedback.
-
@PaulBouchier you may chain/cascade filters as you want. |
Beta Was this translation helpful? Give feedback.
-
I change the laser filter to box filter with default all pass. I am traveling and do not have robot/lidar to test. Please verify and let me know. Thanks. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/hippo5329/linorobot2_hardware/wiki#laser-filter |
Beta Was this translation helpful? Give feedback.
-
I will try to update ld19 driver to change the scan range to -180 to 180 degrees. |
Beta Was this translation helpful? Give feedback.
-
Hi Thomas - thank you for always being willing to try and make things better. I honestly don't think it's necessary to change the ld19 driver scan range to -180 to 180 degrees, unless it breaks something else in ROS that I don't know about. The problem with scan angle range can easily be solved with documentation. There are dangers in modifying someone else's package. I leave it to your judgement as to whether modifying LDLidar's package is necessary. (I see you already modified it to support the UDP client). |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm using Jazzy for the first time along with your Linorobot2 changes. The lidar scan is now a full 360 degrees (thank you!), however when I run the bringup file, I get a "base_ laser" frame does not exist error message. Any suggestions would be most appreciated. See here: tb@tb-750XDA:~$ ros2 launch linorobot2_bringup bringup.launch.py micro_ros_transport:=udp4 micro_ros_port:=8888 lidar_transport:=udp_server lidar_server_port:=8889 [INFO] [launch]: All log files can be found below /home/tb/.ros/log/2025-02-25-11-55-26-243213-tb-750XDA-2351 |
Beta Was this translation helpful? Give feedback.
-
I reverted again to angle bound with default all pass. Please pull and check again. |
Beta Was this translation helpful? Give feedback.
-
Hello Again, Here are the results after you reverted to angle bound: tb@tb-750XDA:~$ ros2 launch linorobot2_bringup bringup.launch.py micro_ros_transport:=udp4 micro_ros_port:=8888 lidar_transport:=udp_server lidar_server_port:=8889 [INFO] [launch]: All log files can be found below /home/tb/.ros/log/2025-02-25-19-05-18-078138-tb-750XDA-6551 I shared the above with ChatGPT. It answered with the following: It looks like your ROS 2 launch process started successfully, but there are a few warnings and errors to note:
Next Steps:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
linorobot2_bringup/config/laser_filter.yaml appears based on experimentation to require the lower_angle and upper_angle to be in the range 0 - 2*pi for an ld19 lidar. I was only seeing 90 degrees of scan data (about 105 data items) on /scan when running
ros2 launch linorobot2_bringup bringup.launch.py micro_ros_transport:=udp4 micro_ros_port:=8888 lidar_transport:=udp_server lidar_server_port:=8889
Yet on the /scan/unfiltered topic I saw the full 360-degree scan that matched my room.
lower_angle was -1.57 and upper_angle was 1.57 as in the current repo. After some experimentation I found that if I set lower_angle to 0.0 and upper_angle to 6.1 I got the full scan on /scan when viewed with rviz.
I have your latest code pulled in linorobot2:
bouchier@xps15:linorobot2$ git remote -v origin https://github.com/hippo5329/linorobot2 (fetch) origin https://github.com/hippo5329/linorobot2 (push) bouchier@xps15:linorobot2$ pwd /home/bouchier/linorobot2_ws/src/linorobot2 bouchier@xps15:linorobot2$ git branch \* rolling
The link in the Laser Filters section of the wiki page points to wiki.ros.org, which is ROS1 documentation, and actually specifies upper and lower in degrees. The current ros2 laser-filters package source seems to be at
https://github.com/ros-perception/laser_filters/blob/ros2/examples/angular_filter_example.yaml
but there's no documentation there, and the examples angular_filter_example.yaml has -1.57 and +1.57 as lower and upper bounds.What is your finding for the correct values to use for upper and lower angular bounds?
TIA!
Beta Was this translation helpful? Give feedback.
All reactions