Skip to content
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

Unify tf frame parameters between transform and cloud nodes #344

Merged
merged 13 commits into from
Jul 9, 2020

Conversation

AndreasR30
Copy link
Contributor

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

Fixes #342

@cynosure4sure
Copy link

This is really useful inclusion. Can it be merged soon?

@AndreasR30
Copy link
Contributor Author

Unfortunately Github's file size limit is limited to 10MB so I published a very short explanatory video at YouTube: https://youtu.be/Ji9btFjtnJM

@cynosure4sure
Copy link

Unfortunately Github's file size limit is limited to 10MB so I published a very short explanatory video at YouTube: https://youtu.be/Ji9btFjtnJM

Thank you for sharing. Two questions:

  1. It is difficult to see the affect of motion compensation in the video. Have you compared the compensated and uncompensated clouds to verify they are being transformed correclty?
  2. What is the frequency at which your 'odom' frame is being published? As the car is moving I assume it would be at a very high update rate.

@AndreasR30
Copy link
Contributor Author

AndreasR30 commented May 29, 2020

1. It is difficult to see the affect of motion compensation in the video. Have you compared the compensated and uncompensated clouds to verify they are being transformed correclty?

You can see in the video, that as soon the field for fixed_frame is empty the rings of the point clouds transform from a helix-like shape to a regular circle (gaps in the back of the vehicle disappear). At this moment ego motion compensation is turned off. Compared to the last point of a ring, the first point is shifted backwards by ego motion compensation because the vehicle has moved forwards during a whole scan/rotation.

2. What is the frequency at which your 'odom' frame is being published? As the car is moving I assume it would be at a very high update rate.

Currently our odom frame is published at 100Hz. Our velodyne sensor rotates with 10 rotations per second (600rpm). So there are 10 TF "updates" for a full rotation or a "update" every 36deg of rotation. This is sufficient for our use case as we are not driving that fast. It would be no problem to publish the odom frame at a higher rate for highly dynamic scenarios (especially with high turn rates of the ego vehicle). Currently the transformations are only done per packet (contains 384 points == 6 shots of the 64 diodes for our Velodyne 64E_S2). Therefore maximum meaningful rate to publish odom frame would be approx. 3470Hz for our 64E_S2 because it publishes ~347 packets per rotation and our sensor rotates at 10Hz.

@cynosure4sure
Copy link

Thank you for the very informative response and thank you for your work. I hope it gets merged soon.

@UniBwTAS
Copy link
Contributor

UniBwTAS commented Jun 3, 2020

We also think that this pull request is very useful as it reduces duplicate code and, more importantly, fixes some bugs with the frame_id names.

@UniBwTAS
Copy link
Contributor

UniBwTAS commented Jun 3, 2020

@JWhitleyWork Do you have any plans to review this pull request?

@JWhitleyWork
Copy link
Contributor

@JWhitleyWork Do you have any plans to review this pull request?

I apologize for the long delay. My job has been overwhelming lately. I will review it today.

To what extent has this been tested and on which sensors?

@cynosure4sure
Copy link

@JWhitleyWork I have tested this pull request on VLP-16. @AndreasR30 has tested this on Velodyne 64E_S2 as shown in their shared video above.

@UniBwTAS
Copy link
Contributor

UniBwTAS commented Jun 5, 2020

We tested it on a HDL-64E_S2. We can also test it on HDL32E and VLP16 next week. But in general the changes are not sensor specific but are on a higher (point cloud) level so there should be no (newly indroduced) issues just for a specific sensor.
We also plan another pull request to support the VLS128. Then it can be also tested there.
In general we plan to actively contribute to this repository in the future as we do a lot with velodyne sensors at our institute.

@UniBwTAS
Copy link
Contributor

UniBwTAS commented Jun 5, 2020

To avoid cunfusion: @AndreasR30 works at our institute and will communicate just through this account from now on.

@JWhitleyWork JWhitleyWork self-requested a review June 8, 2020 01:31
@JWhitleyWork
Copy link
Contributor

@AndreasR30 Since master now targets Noetic and has new CI to match, please rebase your branch on master so CI will build in Noetic.

Copy link
Contributor

@spuetz spuetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing the merge of the two classes. I intended to have this merge at some point as mentioned in here #214 (comment) more than a year ago when I developed the containers for the organized mode and removed pcl.
I would be careful about always having a TFListener, I intended the node also having the option to not transform points. Further, we should go for tf2 here and also use the fixed frame in the lookupTransform. Using tf2 there is no need to waitForTransform.
I also would prevent to check if computeTransformToFixed returns true all the time.
Additionally, we should watch out for the transform with respect to the time stamp related to each single point, and not only packets wise.

@UniBwTAS
Copy link
Contributor

UniBwTAS commented Jun 9, 2020

Further, we should go for tf2 here

I agree.

I also would prevent to check if computeTransformToFixed returns true all the time.

I think it is necessary to check if the transform is available. Otherwise the program will not work properly.

Additionally, we should watch out for the transform with respect to the time stamp related to each single point, and not only packets wise.

I'm really not sure whether it is a good idea to call lookupTransform and to calculate a transform matrix millions of times per second. This will introduce a very, very large CPU overhead for minimal win. Furthermore one would have to publish the odometry frame (or something similar) millions of times per seconds, which introduces additional overhead. We think this error introduced by a per-packet-calculation is negligible to other errors.

@JWhitleyWork
Copy link
Contributor

@UniBwTAS Please rebase on the current master which now targets noetic or re-target this PR to melodic-devel which targets Melodic and Kinetic.

@UniBwTAS
Copy link
Contributor

@spuetz and @JWhitleyWork is everything ok for you now or did I miss some remarks? I would be happy when you integrate it into the master branch.

@JWhitleyWork JWhitleyWork merged commit f123e98 into ros-drivers:master Jul 9, 2020
@JWhitleyWork
Copy link
Contributor

@UniBwTAS Thank you for working on this! Can you please create another PR to apply the same changes to the melodic-devel branch?

JWhitleyWork pushed a commit that referenced this pull request Jul 9, 2020
* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
@UniBwTAS UniBwTAS deleted the unify_tf_frames branch July 14, 2020 07:26
wep21 pushed a commit to wep21/velodyne that referenced this pull request Dec 29, 2021
…ers#344)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
wep21 pushed a commit to wep21/velodyne that referenced this pull request Jan 4, 2022
…ers#344)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
wep21 pushed a commit to wep21/velodyne that referenced this pull request Jan 5, 2022
…ers#344)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
wep21 pushed a commit to wep21/velodyne that referenced this pull request Jan 6, 2022
…ers#344)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
wep21 pushed a commit to wep21/velodyne that referenced this pull request Feb 2, 2022
…ers#344)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
wep21 pushed a commit to wep21/velodyne that referenced this pull request Mar 3, 2022
…ers#344)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
wep21 pushed a commit to wep21/velodyne that referenced this pull request Mar 3, 2022
…ers#344)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
wep21 pushed a commit to wep21/velodyne that referenced this pull request Mar 5, 2022
…ers#344)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
wep21 pushed a commit to wep21/velodyne that referenced this pull request Mar 5, 2022
…ers#344)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>
JWhitleyWork pushed a commit that referenced this pull request Dec 4, 2022
)

* Unify tf frame parameters between transform and cloud nodes

At this point there is no need any more for cloud node because transform node includes all features of cloud node.

* Reformat code slightly to avoid roslint errors

* Use boost bind instead of lambdas to add support for kinetic

* Fix some search and replace errors in comments

* Add fixed_frame and target_frame params back

* Use more common ROS terminology instead of 'htm'

* Undo renaming of publisher and subscriber

* Just use tf listener when necessary

* Migrate package to tf2

* Explicitly store sensor frame in a dedicated variable to make code easier to read

* Reformat code slightly to avoid roslint errors

* Avoid unnecessary transforms when sensor_frame == target_frame

* Fix comments

Co-authored-by: anre <andreas.reich@unibw.de>

Co-authored-by: AndreasR30 <andreas-reich@live.de>
Co-authored-by: anre <andreas.reich@unibw.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing naming of TF frame parameters in velodyne_pointcloud package
5 participants