-
Notifications
You must be signed in to change notification settings - Fork 498
Conversation
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
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.
Can we have this test case : We set the intrinsics as the default values, get the interinsics using FocalLengthX/Y()
. Now don't set the intrinsics in sdf (for a separate camera), let the sensor use default values, and query the intrinsics again using the new methods. These values should be same as those obtained earlier, and the images should also be the same visually.
Yeah that’s a good test case to have. This test case should be in |
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Should we expose the API's for We can also get those values though from |
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Maybe, I'm not sure of the scenario where this might be required. I guess it's easy to add. This is probably a better question for @scpeters |
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
I think it would be simpler to just use the https://github.com/osrf/gazebo/blob/gazebo11/gazebo/sensors/CameraSensor.hh#L93 |
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
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.
LGTM
I'm not sure if we should expect CI to be completely green. I'll leave that up to @scpeters
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
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.
Looks good to me !
the new test is failing in macOS; I'll take a quick look and disable it if there's not an easy fix: |
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
disabled on macOS in 71a7397 |
This PR makes efforts to expose camera intrinsic parameters so that they can be accessed by
gazebo_ros_camera
plugin.Currently, the Camera API exposes a
ProjectionMatrix()
which is normalised based on Open GL graphics and whose values doesn't make sense to the user using the API.The PR exposed
ImageFocalLengthX(), ImageFocalLengthY(), ImageOpticalCentreX() and ImageOpticalCentreY()
API's. These values are populated from theintrinsic
tag in case intrinsic are provided insdf
file. If no intrinsic are provided then these values are decoupled from theProjectionMatrix
since the ProjectionMatrix is calculated by default based onfov
,image size
and we can decouple it to get the intrinsic.Some related discussion here: ros-simulation/gazebo_ros_pkgs#1407
Signed-off-by: deepanshu deepanshubansal01@gmail.com