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

Add a RealTimeWorldNode for displaying simulations at real-time speeds #1216

Merged
merged 14 commits into from
Jan 10, 2019

Conversation

mxgrey
Copy link
Member

@mxgrey mxgrey commented Jan 10, 2019

I recently needed to make a real-time simulation display on top of dartsim, so I decided to clean it up and add it into the main repo since it's a frequently requested feature (e.g. #1204).

It's a simple wrapper on top of the dart::gui::osg::WorldNode class. Users can opt for either the old WorldNode or the new RealTimeWorldNode depending on how they want to control the speed of the simulation.

I also added a line ImGui::CreateContext(); because ImGui was crashing without that.

I know #1215 has already been opened, so I can retarget this at a 6.8 release (or we can wait until 6.7.1 since this won't impact API or ABI) instead if that would be preferred.


Before creating a pull request

  • Document new methods and classes
  • Format new code files using clang-format

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md
  • (N/A) Add unit test(s) for this change

@mxgrey
Copy link
Member Author

mxgrey commented Jan 10, 2019

I also looked over the osg examples and replaced their use of WorldNode with RealTimeWorldNode for any examples that perform simulation. I think the new playback speed looks much better.

Copy link
Member

@jslee02 jslee02 left a comment

Choose a reason for hiding this comment

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

Looks great and thanks for the fix of the crashing with ImGui! Let's ship 6.7 with this new feature.

I left a few nitpick comments. One another suggest I have is formatting the new file using clang-format. You could do that by adding these line:

dart_format_add(
  RealTimeWorldNode.hpp
  RealTimeWorldNode.cpp
)

at the end of dart/gui/osg/CMakeLists.txt, and run make format with clang-format-3.8 installed. If you're on bionic, then clang-format-3.8 isn't available. In that case, I can do it myself.

dart/gui/osg/RealTimeWorldNode.cpp Outdated Show resolved Hide resolved
dart/gui/osg/RealTimeWorldNode.hpp Outdated Show resolved Hide resolved
dart/gui/osg/RealTimeWorldNode.cpp Outdated Show resolved Hide resolved
dart/gui/osg/RealTimeWorldNode.hpp Outdated Show resolved Hide resolved
dart/gui/osg/RealTimeWorldNode.cpp Outdated Show resolved Hide resolved
jslee02 and others added 3 commits January 10, 2019 17:13
Co-Authored-By: mxgrey <grey@openrobotics.org>
Co-Authored-By: mxgrey <grey@openrobotics.org>
Co-Authored-By: mxgrey <grey@openrobotics.org>
@jslee02 jslee02 added this to the DART 6.7.0 milestone Jan 10, 2019
Copy link
Member

@jslee02 jslee02 left a comment

Choose a reason for hiding this comment

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

LGTM!

@jslee02
Copy link
Member

jslee02 commented Jan 10, 2019

Hm, the last commits from me are in incorrect order due to the wrong push dates. This is because the date setting of my virtual machine was set to 2 days late for some reason. 😞

@jslee02 jslee02 merged commit 8857288 into release-6.7 Jan 10, 2019
@jslee02 jslee02 deleted the grey/osg_real_time branch January 10, 2019 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants