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

Update camera sensors to use the //sensor/camera/pose sdf element. #2433

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ release will remove the deprecated code.
each time step, whereas previously the component values were set to `0`
after each time step. Persistent velocity commands should be reapplied at
each time step.
+ For camera based sensors, their pose now takes into account the
`//sensor/camera/pose` sdf element. Previously only the `//sensor/pose`
sdf element was used and `//sensor/camera/pose` was ignored.

## Gazebo Sim 7.x to 8.0
* **Deprecated**
Expand Down
4 changes: 4 additions & 0 deletions src/rendering/RenderUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,10 @@ void RenderUtil::Update()
{
sensorPose = dataSdf.RawPose();
}
if (dataSdf.CameraSensor())
{
sensorPose = sensorPose * dataSdf.CameraSensor()->RawPose();
}
sensorNode->SetLocalPose(sensorPose);
}
}
Expand Down
Loading