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

sensor_msgs/Range lacks variance field #181

Merged
merged 2 commits into from
Mar 15, 2023

Conversation

ejalaa12
Copy link
Contributor

Fixes #180

As stated in the original issue, the Range msg lacks the variance field as opposed to most sensor msgs.

A similar issue exist for ros1, and here the discussion about it: ros/common_msgs#142

@ejalaa12
Copy link
Contributor Author

For some reason the build is failing on the std_msgs pkg, which is completely independant from my change...
@gbiggs would you know why ?

@clalancette
Copy link
Contributor

For some reason the build is failing on the std_msgs pkg

Our PR builds are currently broken due to the transition to Ubuntu 22.04. We'll manually run CI on it once it has been reviewed.

@clalancette
Copy link
Contributor

@ros-pull-request-builder retest this please

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

Other than the small nit inline, I think this is a fine addition. @gbiggs @tfoote could you comment here with your thoughts?


float32 variance # variance of the range sensor
# 0 is interpreted as variance unknown

Copy link
Contributor

Choose a reason for hiding this comment

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

Small nit: no newline at the end of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi! Thanks for reviewing my PR. I just removed the newline at the end of the file in the latest commit.
(sorry for the force-push I keep forgetting to sign-off with git commit -s)

@gbiggs
Copy link
Member

gbiggs commented Mar 24, 2022

I think this is a good addition. There are now some sensors on the market that can provide estimated error for each range measurement, rather than just having a value in the data sheet.

@tfoote
Copy link
Contributor

tfoote commented Apr 5, 2022

Going ahead with this makes sense. We should do some due diligence about reviewing current usages and providing recommended migrations for existing usage patterns. That we can add to changelogs as well as potentially open some example pull requests based on the audit of code using the message.

@clalancette
Copy link
Contributor

Thanks for the responses. In that case, I think we have agreement that this is the way to go.

However, we are now in a freeze for Humble, and we still need to do the due diligence that @tfoote mentioned. So we'll hold off on this for two weeks until we come out of the freeze (the week of April 18th).

@clalancette clalancette added this to In progress in Iron Irwini via automation Apr 21, 2022
@clalancette clalancette added the more-information-needed Further information is required label Apr 29, 2022
@audrow audrow changed the base branch from master to rolling June 28, 2022 14:17
@gbiggs
Copy link
Member

gbiggs commented Jul 6, 2022

@tfoote @clalancette How would you recommend going about finding the current usages? sensor_msgs is a common and broadly-used package so just finding the reverse dependencies isn't feasible.

@tfoote
Copy link
Contributor

tfoote commented Jul 6, 2022

Yes there's a lot, but cloning all the reverse depends and grepping isn't that bad. It just takes a little bit of patience.

@ejalaa12
Copy link
Contributor Author

ejalaa12 commented Jul 7, 2022

Hey, I'm not sure what you guys mean by "do due diligence"?
What concretely needs to be done ?

Yes there's a lot, but cloning all the reverse depends and grepping isn't that bad. It just takes a little bit of patience.

So the idea is to find all packages that uses the Range message and notify them (by opening PRs or Issues) so that they can now add the variance when publishing those messages ?

@tfoote
Copy link
Contributor

tfoote commented Jul 7, 2022

So the idea is to find all packages that uses the Range message and notify them (by opening PRs or Issues) so that they can now add the variance when publishing those messages ?

Basically yes. If the list is too long to do that we may want to reconsider this process. Along with that we should be adding documentation and linking to it from the issues opened that talks about the required migration steps in different use cases. In many cases like this with a pure addition like this it generally won't break anything. But if the variance would be useful it should be at least passed through potentially if the values are being copied.

@ejalaa12
Copy link
Contributor Author

ejalaa12 commented Aug 9, 2022

Is the distribution.yaml a good place to start ?

I created a very naive script that goes through all those repo, filter the one that have sensor_msgs listed in the package.xml dependencies. Then run a grep to find instance of Range in their code.
I looked for stuff like

  • 'sensor_msgs::msg::Range',
  • 'from sensor_msgs.msg import Range',
  • 'sensor_msgs.msg.Range',

Here are the list of repos that came out. My script might have missed some...

https://github.com/mavlink/mavros.git
https://github.com/ros-simulation/gazebo_ros_pkgs.git
https://github.com/cyberbotics/webots_ros2.git
https://github.com/MRPT/mrpt.git
https://github.com/ros2/rviz.git

I'm a bit surprised that I have so few, but since I'm only looking at "officially distributed" ros packages...

@tfoote
Copy link
Contributor

tfoote commented Sep 22, 2022

Yeah, that's the right place to look. The Range message has never had a lot of sensors providing it so it has definitely been less used. Some in the ultrasonics space too. Because this list is relatively short, it this change can be accompanied with PRs for all of those projects relatively easily. And by linking to them provide clear documentation of what will need to change as an example to other code bases.

@ejalaa12
Copy link
Contributor Author

ejalaa12 commented Mar 8, 2023

Hi,
In my precedent message I listed a few repos/packages that use the Range msg.
That list is the best I could get at the time.

Should we just open Issues to those repo to notify them of the change? If so, should I do it, or would it make more sense that a developer from Ros does it?

Also, do we have to wait for those issues to be opened before merging this?
As this is a non breaking change, I think as soon as the issues have been created, I don't see a reason to wait any longer.

Thank you again

@tfoote
Copy link
Contributor

tfoote commented Mar 10, 2023

+1 to opening tracking issues on the repositories above and then we can merge this into rolling to get it in before Iron. As you said we don't expect this to break builds with a pure extension so we don't need to wait for a response.

@ejalaa12
Copy link
Contributor Author

I've just created the tracking issues.
Feel free to comment them as needed.
And thank you for the response.

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

This looks good to me with green CI. Thanks for doing the additional work of finding other repositories that use this. I'm going to run CI on it, and if there are no issues or objections, I'll merge it in later this week.

@clalancette
Copy link
Contributor

clalancette commented Mar 13, 2023

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

Fixes ros2#180

Signed-off-by: Alaa <ejalaa12@gmail.com>
Signed-off-by: Alaa <ejalaa12@gmail.com>
@clalancette clalancette merged commit 05d7e19 into ros2:rolling Mar 15, 2023
Iron Irwini automation moved this from In progress to Done Mar 15, 2023
@ejalaa12 ejalaa12 deleted the ejalaa12/issue180 branch March 16, 2023 08:15
@clalancette clalancette removed this from Done in Iron Irwini Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Further information is required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sensor_msgs/Range lacks variance field
4 participants