Add optional optical frame id to camera sensors#259
Add optional optical frame id to camera sensors#259ahcorde merged 2 commits intogazebosim:ign-sensors6from
Conversation
Signed-off-by: marqrazz <marq.razz@gmail.com>
5a5211a to
01eadf9
Compare
I can but nothing will pass till the SDF PR is merged. Any feedback there? |
|
@ahcorde after looking into this some more it seems like adding a proper test could be a sizable amount of work. The current tests in Camera_TEST.cc do not create a valid sensor object. You can see when running the tests the 11: [ RUN ] Camera_TEST.CreateCamera 11: [Err] [CameraSensor.cc:385] Camera doesn't exist. 11: [Err] [CameraSensor.cc:274] Attempting to a load a Camera sensor, but received a none 11: [Err] [CameraSensor.cc:280] Attempting to a load a Camera sensor, but received a null sensor. 11: [Err] [SensorFactory.hh:144] Failed to load sensor [cam_name] of type[not_camera] 11: [Err] [Manager.hh:80] Failed to create sensor. 11: [ OK ] Camera_TEST.CreateCamera (121 ms) 11: [ RUN ] Camera_TEST.Topic 11: [Err] [Sensor.cc:278] Failed to set sensor topic [@@@] 11: [Err] [SensorFactory.hh:144] Failed to load sensor [TestCamera] of type[camera] 11: [Err] [Manager.hh:80] Failed to create sensor. 11: [ OK ] Camera_TEST.Topic (174 ms) I attempted to load a camera from the SDF stream but it fails to create a valid publisher. and here's the error I get... Do you have any suggestions on how I can go about creating a valid |
|
I need this merged for a project I'm working on! Are the new tests mandatory @ahcorde? |
|
we need a sdformat release to merge this, I will talk with the maintainer ⛑️ |
|
Thank you!! |
|
@ahcorde Any news on this? Can we merge it? What are the main concerns why we shoudn't? |
|
@osrf-jenkins run tests please! |
|
we need a special branch of gzdev in order to use the prerelases, as well as a pull request with a special branch name: #273 |
|
I'm trying to get CI working; in the meantime, I think the required version of sdformat12 should be updated to 12.6.0 |
Signed-off-by: marqrazz <marq.razz@gmail.com>
|
Sorry for the small delay! Please let me know if there is anything else I can help with here! |
I've updated the test branch in #273 with your latest changes and CI is running again |
|
@ahcorde CI looks ok with prereleases; this is ready for additional review. Once you are happy we can request a stable release of sdformat12 |
|
I merged because the CI was fine, but I;m getting an error in |
the CI for this branch is using prereleases, we need to make a stable release before this will work |
🎉 New feature
Closes #175
Summary
This adds the ability for a
CameraSensororRgbdCameraSensorto use the optional sdf specifiedoptical frame_idthat will be used when publishing the camera_info, rgb_image, and point_cloud topic's from a simulated sensor. Note: this PR depends on an open PR in sdformat.This feature request was noted in CameraSensors.cc and will help close #175 in ign-sensors.
Test it
Here are the instructions on how I setup my test environment:
osrf/ros:humble-desktopoptical_frame_idhere. You will also need to clone some dependencies withvcs import src --skip-existing --input src/rgbd_camera_ignition/rgbd_camera_ignition.reposros2 launch rgbd_camera_ignition rgbd_ignition.launch.pyRviz should appear with the point cloud being rendered in the 6-DOF scene and the

Camerawidget properly overlaying it over the RGB image.I even made a custom frustum mesh (not included in my repo) to ensure the camera was rendering in the correct location in Gazebo and Rviz.

Checklist
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-bymessages.