-
Notifications
You must be signed in to change notification settings - Fork 486
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
Physics lockstep for all sensors #2761
Conversation
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
…ailing Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
…imestamp Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Sorry about the fidgeting above. The 5 latest commits weren't showing up in the Draft state for some reason. Closing and reopening the PR made them show up. |
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
This is ready for review. |
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Now that we aren't using the SDF tag, some .world files can be removed. They are mostly copies of existing ones except the |
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Transceiver test is done. I tried to eliminate some new .world SDF files to reduce the line diffs, but I couldn't get them to pass the tests. With laser, it seems calling So it seems the most solid to test with the new .world files specifying a large |
I wonder if the update rate issue you are experiencing is due to the same problem mentioned in pull request #2784. I can see that bug occurring if you are calling |
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.
changes look good to me. I tested the remaining rendering sensors (depth, gpu ray, and multicamera) and confirm that lockstep is working. There is one test failure to address.
I made one comment about ABI which I think we don't have to do anything for now. Other places look fine and I don't see an ABI issue. There are probably more ABI issues when merging from respect_fps_gz11new
branch to gazebo11
. Once this is merged, we could just create a draft PR and look at the abi-checker report to find all ABI issues.
|
||
/// \brief Return the next timestamp going to be used by the sensor | ||
/// \return the timestamp | ||
public: double NextRequiredTimestamp() const override; |
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.
I think overriding these functions should be fine according to explanation here since we're overriding virtual functions from primary base class
double rate = static_cast<double>(totalMsgs) / dt; | ||
gzdbg << "timer [" << dt << "] seconds rate [" << rate << "] fps\n"; | ||
const double tolerance = 0.02; | ||
EXPECT_GT(rate, updateRate * (1 - tolerance)); |
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.
jenkins build caught a test failure here. I can also reproduce it locally.
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.
Okay. In 02269c0, I am disabling that test for Simbody, which is test number 2 that is failing. Many other tests in this file disabled it, and I thought about that but left it in since it didn't give me a problem. Maybe that was because I don't have Simbody installed. Let's see if Jenkins is happy now.
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Does that need to be in gazebo11 or do we just leave it, since the tests here now work around it? |
In e7da851, I changed |
I think we can leave the changes here as they are now since the tests are passing. |
the latest changes look good to me. I'll wait for jenkins build to finish |
there are a few tests failing in the ubuntu-gpu-nvidia build due to a weird boost problem, which I can't reproduce locally. It could just be an issue on the jenkins machine. |
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
I looked at the ones on ubuntu_auto-amd64-gpu-nvidia that had actual errors (as opposed to "test did not run" kind of thing), and looks like it's these ones: The ManTest ones I tried to fix in 9c61a7c. All the others I can reproduce locally. They are also failing on the buildfarmer dashboard though, so I think they are not new: |
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.
good catch on the ManTest. The latest builds look good now.
Part of issue #2736. Builds on top of #2746 (can't target that branch because that's on a fork. Should merge that one first).
Extends the physics lockstep from
CameraSensor
in #2746 to all sensors.All non-rendering sensors are covered by new code in
Sensor
.Rendering sensors that do not inherit from
CameraSensor
areGpuRaySensor
andMultiCameraSensor
. Each of these classes has new variablesrenderNeeded
andnextRenderingTime
, which are updated by new methods (SetActive(), PrerenderEnded(), NeedsUpdate(), NextRequiredTimestamp(), ResetLastUpdateTime()
) and existing methodRender()
.Because of these new members, while it's possible to check whether a sensor is a rendering one via
this->dataPtr->category == IMAGE
and put everything inSensor
, I decided to only have these members in the rendering sensor classes, even if it means the methods look mostly similar (but not exactly the same because the actual sensor variable is different) across all 3 rendering sensors.Tests for strict rate have been added to:
INTEGRATION_camera_sensor
INTEGRATION_gpu_laser
INTEGRATION_multicamera_sensor
INTEGRATION_logical_camera_sensor
INTEGRATION_contact_sensor
INTEGRATION_laser
INTEGRATION_imu
INTEGRATION_transceiver