-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check LaserIgnore flag when publishing laserscan? #13
Comments
or perhaps explain how to use laser_filters to do it? |
Looks like I need to fix this issue since the Pioneer LX has LaserIgnore set. Seems that the S300 range of vision is wider than the aperture, so the robot sees its own body at the extrema of the range. ROS thinks this is an obstacle, of course. The easy way is to just remove that data from the message and adjust the min and max angles accordingly. This won't work if LaserIgnore partitions the range of vision into two parts, however, since ROS LaserScan messages are supposed to be contiguous. Don't know if there are any MobileRobots platforms where this is the case. |
What does ROS use for a sample that doesn’t hit any obstacle (max range?) That’s what I would use. ARIA uses this when creating its point cloud data. There are other robots where there are structural supports within the laser field of view, and we want customers to have the ability to modify or add on to their robot requiring such supports, which is the main reason for LaserIgnore parameter. From: Blake Anderson [mailto:[email protected]] Looks like I need to fix this issue since the Pioneer LX has LaserIgnore set. Seems that the S300 range of vision is wider than the aperture, so the robot sees its own body at the extrema of the range. ROS thinks this is an obstacle, of course. The easy way is to just remove that data from the message and adjust the min and max angles accordingly. This won't work if LaserIgnore partitions the range of vision into two parts, however, since ROS LaserScan messages are supposed to be contiguous. Don't know if there are any MobileRobots platforms where this is the case. — |
I got it working with these changes. I basically made a bitmask to specify which indices to ignore. At the end of LaserPublisher constructor. This requires some other work on our fork that converts the .p file to ROS params.
And:
|
You should be able to just get the ignore flag from the ArSensorReading structs, you don’t need to look at the LaserIgnore parameter separately. It might be better to keep those separate. In publishLaserScan() when iterating over the ArSensorReading pointers, just check (*r)->getIgnoreThisReading(). We can also check whether its within the configured field of view here as well. The other option for dealing with this stuff is to use ROS Laser Filter nodes. This is the more ROS-like way to deal with this. I.e. if you were using the ROS driver node for a laser, then it would just give you the laser data without these conditions. You would then use the ROS laser filter nodes to flip, filter, etc. From: Blake Anderson [mailto:[email protected]] I got it working with these changes. I basically made a bitmask to specify which indices to ignore. At the end of LaserPublisher constructor. This requires some other work on our fork that converts the .p file to ROS params. // Check LaserIgnore setting std::vector laser_ignore_list; _n.getParam("Laser_parameters/LaserIgnore", laser_ignore_list); // LaserIgnore is assumed to consist of ranges given by pairs of values if (laser_ignore_list.size() % 2) {
} else {
} And: void LaserPublisher::publishLaserScan() { laserscan.header.stamp = convertArTimeToROS(laser->getLastReadingTime()); const std::list<ArSensorReading*> *readings = laser->getRawReadings(); assert(readings); laserscan.ranges.resize(readings->size()); laser_ignore_indices.resize(readings->size()); size_t n = 0; if (laser->getFlipped()) {
} else {
} laserscan_pub.publish(laserscan); } — |
I just made a pull request #19 fixing this issue using your suggested method. |
No description provided.
The text was updated successfully, but these errors were encountered: