Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for simulation interfaces in RViz2 #1

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

Merged
michalpelka merged 8 commits into master from mp/rviz2_panel
Aug 21, 2025
Merged

Conversation

Copy link
Collaborator

@michalpelka michalpelka commented Aug 6, 2025

This commit introduces a new panel for simulation interfaces in RViz2, allowing users to interact with various simulation plugins. The changes include:

  • Addition of a new SimulationInterfacesPanel class.
  • Integration of the panel into the RViz2 interface.
  • Updates to the CMake build system to include the new panel.
  • New icons and configuration files for the panel.
  • Added standalone app.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a comprehensive RViz2 plugin for simulation interfaces, transforming a standalone Qt application into a fully integrated RViz2 panel while maintaining standalone functionality. The changes include refactoring the service architecture to use async/sync patterns, adding interactive marker support for visual entity manipulation, and implementing proper plugin architecture.

Key changes:

  • Refactored service architecture from synchronous to asynchronous pattern with timeout handling
  • Added RViz2 panel integration with plugin export configuration
  • Implemented interactive marker support for visual entity manipulation in 3D space

Reviewed Changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/vector_utils.hpp New utility functions for converting between Qt strings and tf2::Vector3
src/stringToKeys.h Performance optimization changing std::map to std::unordered_map for lookups
src/standalone_main.cpp New standalone application entry point with proper ROS node management
src/simulation_widget.hpp Core widget header with service clients and interactive marker support
src/simulation_widget.cpp Main widget implementation with async service calls and interactive markers
src/simulation_panel.cpp RViz2 panel wrapper with automatic interactive marker display creation
src/service.h Complete service architecture refactor with Expected pattern and async support
package.xml Added RViz2 and plugin dependencies with proper export configuration
include/q_simulation_interfaces/simulation_panel.hpp Public header for RViz2 panel class
CMakeLists.txt Build system updates for library creation and plugin export
Comments suppressed due to low confidence (1)

src/vector_utils.hpp:8

  • [nitpick] Function name 'VectorToQstring' has inconsistent capitalization. It should be 'VectorToQString' to match Qt naming conventions.
inline QString VectorToQstring (const tf2::Vector3& v )

This commit introduces a new panel for simulation interfaces in RViz2, allowing users to interact with various simulation plugins. The changes include:
- Addition of a new `SimulationInterfacesPanel` class.
- Integration of the panel into the RViz2 interface.
- Updates to the CMake build system to include the new panel.
- New icons and configuration files for the panel.
- Added standalone app.
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Copy link
Collaborator

@jhanca-robotecai jhanca-robotecai left a comment

Choose a reason for hiding this comment

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

I built the code and tested it with ROS 2 Humble on Ubuntu 22.04.
It works as expected and I did not encounter any issues with the stability.

Few comments added to the review. The most important one is about a warning when building the package itself and the readme.

Copy link

@norbertprokopiuk norbertprokopiuk left a comment
edited
Loading

Choose a reason for hiding this comment

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

Most of my comments are just nitpicks or UI improvements (you can feel free to ignore it), but I cannot approve this PR without one important improvement. What I mean is customization of the services names. Currently those names are hard-coded but standard does not define names for services. It would be nice to allow user to change called service name without need to recompile the package. ROS 2 parameters probably would work here.

Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
Copy link

norbertprokopiuk commented Aug 21, 2025
edited
Loading

@michalpelka What about changing services names without recompiling? Is it going to be added here or it is gonna be added as an issue for later?

Copy link
Collaborator Author

@norbertprokopiuk create an issue with proposition how to do that.

norbertprokopiuk reacted with thumbs up emoji

Copy link

Issue for services names adjustment #3

Copy link

@norbertprokopiuk norbertprokopiuk left a comment

Choose a reason for hiding this comment

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

You missed setting angle to degrees in line 454 in simulation_widget.cpp

Also right now, ui doesn't allow to set angle higher than 99.999. It doesn't allow more than two digits before .

Signed-off-by: Michał Pełka <michal.pelka@robotec.ai>
@michalpelka michalpelka merged commit bdf4828 into master Aug 21, 2025
@jhanca-robotecai jhanca-robotecai deleted the mp/rviz2_panel branch August 29, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

@norbertprokopiuk norbertprokopiuk norbertprokopiuk approved these changes

@jhanca-robotecai jhanca-robotecai Awaiting requested review from jhanca-robotecai

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /