-
Notifications
You must be signed in to change notification settings - Fork 164
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
Skip laserscans with no corresponding tf transform #313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add the sleep (1s) after the initialization of the transform listener, as proposed in the issue.
Also, please investigate (in simulation) what happens if you set the frequency of this node to something higher than 10 Hz.
ROS_DEBUG("now project to point_cloud"); | ||
projector_.transformLaserScanToPointCloud("/base_link",vec_laser_struct_.at(i).current_scan_msg, vec_cloud.at(i), listener_); | ||
projector_.transformLaserScanToPointCloud("base_link",vec_laser_struct_.at(i).current_scan_msg, vec_cloud.at(i), listener_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please make this a parameter, while you are at it?
Frequency was already 100Hz. Tried also with 15Hz and it works. Should I add the param to the YAMLs of all robots? |
@mig-em yes, please do that. |
@mig-em Please do as commanded ;-) |
vec_laser_struct_.at(i).current_scan_msg.header.stamp, ros::Duration(3.0))) | ||
{ | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please correct indentation
@mig-em @ipa-mig isn't 15Hz a bad idea? See your comments here: ipa320/cob_robots#367 I think we should switch to https://github.com/iralabdisco/ira_laser_tools because they seem to have a better implementation. I've already used their implementation once and it worked quite well. |
So should I adapt the synchronisation part by using the TimeSynchronizer filter and investigate https://github.com/ipa320/cob_driver/issues/249 or better use the ira_laser_tools? |
I'd say we should evaluate |
Well, if |
if |
@ipa-bnm would this be worth investigating on cob4? |
@ipa-mig yes, we can/should test this on cob4 as soon as a new hardware is available |
I tried the ira_laser_tools and they seem to work but https://github.com/ipa320/cob_driver/pull/257 and https://github.com/ipa320/cob_driver/issues/268 are not fixed (there is still the "Lookup would require extrapolation into the past." error and they use tf1). In this screen you see raw3-3 scans (red, green) and the unified scan (yellow) |
Is the following summary correct?
|
Just for completeness. |
Additionally the parameters of the ira_laser_tools should be adapted. |
if (!listener_.waitForTransform(frame_, vec_laser_struct_.at(i).current_scan_msg.header.frame_id, | ||
vec_laser_struct_.at(i).current_scan_msg.header.stamp, ros::Duration(3.0))) | ||
{ | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ipa-mig @mig-em
Well, here we silently skip a scan that cannot be transformed. Should we at least notify in some way?
e.g. ROS_ERROR_STREAM("Not using scan during unification: " << vec_laser_struct_.at(i).current_scan_msg.header.frame_id,);
@ipa-mig FYI As discussed with @mig-em, we will try a message_filter-based implementation before merging this PR |
good idea. |
https://github.com/ipa320/cob_driver/pull/324 is the proper way to solve #268 |
fixes https://github.com/ipa320/cob_driver/issues/268