-
Notifications
You must be signed in to change notification settings - Fork 161
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
New ros_gz_interface_demos package #705
base: ros2
Are you sure you want to change the base?
Conversation
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
…ables Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
1dc6fe3
to
5f4b4fd
Compare
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.
Thank you for openning the PR, I have some comments. Feel free to ask any questions.
Linters are failing https://github.com/gazebosim/ros_gz/actions/runs/13887944210/job/38874261436?pr=705
cmake_minimum_required(VERSION 3.8) | ||
project(ros_gz_interface_demos) | ||
|
||
# Default to C++14 |
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.
# Default to C++14 | |
# Default to C++17 |
|
||
# Default to C++14 | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 14) |
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.
set(CMAKE_CXX_STANDARD 14) | |
set(CMAKE_CXX_STANDARD 17) |
@@ -0,0 +1,68 @@ | |||
cmake_minimum_required(VERSION 3.8) |
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.
cmake_minimum_required(VERSION 3.8) | |
cmake_minimum_required(VERSION 3.20) |
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
find_package(ros_gz_interfaces REQUIRED) | ||
find_package(geometry_msgs REQUIRED) | ||
find_package(builtin_interfaces REQUIRED) |
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.
alphabetical order
rclcpp | ||
ros_gz_interfaces | ||
geometry_msgs | ||
builtin_interfaces |
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.
alphabetical order
ros_gz_interface_demos/package.xml
Outdated
<name>ros_gz_interface_demos</name> | ||
<version>0.1.0</version> | ||
<description>C++ package for managing Gazebo entities through ROS 2</description> | ||
<maintainer email="khaledgabr77@email.com">Khaled Gabr</maintainer> |
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.
you can add the tag <author>
and please add me as a mantainer too
<maintainer email="khaledgabr77@email.com">Khaled Gabr</maintainer> | |
<maintainer email="khaledgabr77@email.com">Khaled Gabr</maintainer> | |
<maintainer email="alejandro@openrobotics.org">Alejandro Hernandez</maintainer> | |
<author email="khaledgabr77@email.com">Khaled Gabr</author> |
@@ -0,0 +1,145 @@ | |||
#include <memory> |
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.
add License
return 1; | ||
} | ||
|
||
// Parse command line arguments |
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.
you are parsing cmd manually, maybe you want to check or use cli11
https://github.com/ros/rosdistro/blob/master/rosdep/base.yaml#L614, it's already available in rosdistro.
Same in other executables
@@ -0,0 +1,251 @@ | |||
#include <memory> |
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.
Add License
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
Signed-off-by: khaledgabr77 <khaledgabr77@gmail.com>
53206ed
to
55c3f2c
Compare
🎉 New feature
Summary
This PR adds a new package
ros_gz_interface_demos
which provides utilities for managing Gazebo entities through ROS 2. The package includes three primary functionalities:These utilities provide a complete solution for programmatically manipulating simulation entities, which is useful for testing, creating dynamic environments, and integrating with other ROS 2 systems.
Test it
Note: This PR depends on #380. Please ensure that PR has been merged before testing this functionality.
To test this new feature:
Build the package:
colcon build --packages-select ros_gz_interface_demos source install/setup.bash
Launch Gazebo:
gz sim ~/ros_gz_ws/src/ros_gz/ros_gz_interface_demos/worlds/default.sdf
Run the ROS-Gazebo bridge for entity creation:
Spawn an entity:
Similarly, you can test
set_entity_pose
anddelete_entity
with their respective bridge services.Checklist
codecheck
passed (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-by
messages.