-
Notifications
You must be signed in to change notification settings - Fork 639
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
Dashing: Remove redundant storage of configuration data #276
Dashing: Remove redundant storage of configuration data #276
Conversation
It is never used outside of the setup* routines, so don't bother storing it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
It is now redundant, and we can do everything in the constructor for an RAII-style class. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Instead, get the data directly from a method as necessary. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
The lower layers already have the information. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
There is no reason for it to be a shared pointer. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
They are both only needed as temporaries. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
At least it is then always consistent. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
They don't actually need to know the information; their helper 'has-a' classes do, but we can just pass along the information as we get it. No need to store it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
The helper 'has-a' classes need it, but the Node classes themselves don't need to hold onto them. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
The node classes don't need it, so just pass along the values to the 'has-a' classes that do. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This just gives the compiler and reader a few more hints as to how the classes are used. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
It's much better to fail early here and let the user know they've done something we don't expect. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Looks great @clalancette! @JWhitleyAStuff have you had a chance to take a look at this? |
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@JWhitleyAStuff I know we are probably going to start concentrating on the other driver from Autoware, but in the meantime I would still like to get this merged (and potentially released into Dashing). Any thoughts on this? |
@clalancette I'm sorry I've been slow to respond. I'll review it today. |
@clalancette - I've looked over everything and it seems pretty logical. It also seems like something we would want to do for the ROS1 Melodic driver. Have you tested this on a device yet? |
No worries! Thanks for looking.
Yeah, I ran this on the VLP-16 I have (using Dashing). There didn't seem to be much of a difference, which is what I was shooting for :). I agree that this is something that would be nice to have in Melodic as well. I suspect there will be a bunch of merge conflicts, though, both because of the port and because of some of the subsequent cleanup that I've done on the |
I'll go ahead and approve/merge this for now and we can implement it on Melodic later. |
@JWhitleyAStuff Thanks for reviewing and merging! |
This is a somewhat large and subjective PR, but the main goal here is to reduce the amount of duplicate storage of configuration parameters in the classes that make up the velodyne_pointcloud code. The main benefits of doing so are:
There is also a bunch of cleanup of code in this PR, along with the removal of some unused functions. My suggestion for reviewing this is commit-by-commit, since each commit is fairly small and does one logical thing. @JWhitleyAStuff if you'd prefer a couple of smaller PRs, I can do that too; just let me know.
Thanks!