ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Find LaserScan ray index in RViz for LaserScanMaskFilter

asked 2021-01-21 10:15:45 -0500

mntcore gravatar image

I'm planning to use the (relatively new) LaserScanMaskFilter to filter out echos from the mechanical arm that has a camera attached to it from my LaserScan messages. The Filter takes an array of numbers and sets the distance in a LaserScan message with the corresponding index to NaN.

So far, so good. But how do i find out which echo indexes i should filter? If i select the offending echos inside RViz i can only see x/y/z position and intensity inside the selection box. The name of each selection (e.g. "Point 156") does not seem to correlate to the ray index inside the LaserScan message.

Example Image: https://ibb.co/9VzQLkb

What is the best way to find out which indexes i need to filter?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-01-26 10:36:46 -0500

mntcore gravatar image

I found two crappy workarounds that may work for some:

First method: Open a console big enough you can see the whole laserscan message when echoing the scan topic. Make sure there is enough space around your lidar and use an instance of LaserScanRangeFilter so all rays are NaN. Place an obstacle near the lidar. Use your eyes to visually scan the message dump until you spot which indexes affected rays have.

Second method: The lidar of my robot is smack in the middle, so i can just use the x/y coordinates of a single Point visible in the selection window of RViz to calculate the angle in rad and use LaserScanAngularBoundsFilter instead. Use enough numeric precision to statisfy the filter (remember that a single ray has 0.01744 rad).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-01-21 10:15:45 -0500

Seen: 105 times

Last updated: Jan 26 '21