forked from gazebosim/ros_gz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gazebosim:ros2' into pr-ros2-material_color
- Loading branch information
Showing
29 changed files
with
480 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<!-- TODO: Make this a metapackage, see | ||
https://github.com/ros2/ros2/issues/408 --> | ||
<name>ros_gz</name> | ||
<version>0.246.0</version> | ||
<version>1.0.0</version> | ||
<description>Meta-package containing interfaces for using ROS 2 with <a href="https://gazebosim.org">Gazebo</a> simulation.</description> | ||
<maintainer email="[email protected]">Aditya Pande</maintainer> | ||
<maintainer email="[email protected]">Alejandro Hernandez</maintainer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,22 @@ | |
Changelog for package ros_gz_bridge | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
1.0.0 (2024-04-24) | ||
------------------ | ||
* Use gz_vendor packages (`#531 <https://github.com/gazebosim/ros_gz/issues/531>`_) | ||
* Added conversion for Detection3D and Detection3DArray (`#523 <https://github.com/gazebosim/ros_gz/issues/523>`_) (`#525 <https://github.com/gazebosim/ros_gz/issues/525>`_) | ||
Co-authored-by: wittenator <[email protected]> | ||
* [Backport rolling] Add ROS namespaces to GZ topics (`#517 <https://github.com/gazebosim/ros_gz/issues/517>`_) | ||
Co-authored-by: Krzysztof Wojciechowski <[email protected]> | ||
* ign to gz (`#519 <https://github.com/gazebosim/ros_gz/issues/519>`_) | ||
* Correctly export ros_gz_bridge for downstream targets (`#503 <https://github.com/gazebosim/ros_gz/issues/503>`_) | ||
* Add a virtual destructor to suppress compiler warning (`#502 <https://github.com/gazebosim/ros_gz/issues/502>`_) | ||
* Add conversion for geometry_msgs/msg/TwistStamped <-> gz.msgs.Twist (`#468 <https://github.com/gazebosim/ros_gz/issues/468>`_) | ||
* Added messages for 2D Bounding Boxes to ros_gz_bridge (`#458 <https://github.com/gazebosim/ros_gz/issues/458>`_) (`#466 <https://github.com/gazebosim/ros_gz/issues/466>`_) | ||
Co-authored-by: Alejandro Hernandez Cordero <[email protected]> | ||
* populate imu covariances when converting (`#375 <https://github.com/gazebosim/ros_gz/issues/375>`_) | ||
* Contributors: Addisu Z. Taddese, Alejandro Hernández Cordero, El Jawad Alaa, Michael Carroll | ||
|
||
0.246.0 (2023-08-31) | ||
-------------------- | ||
* Add harmonic CI (`#447 <https://github.com/gazebosim/ros_gz/issues/447>`_) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,7 +69,8 @@ The following message types can be bridged for topics: | |
| trajectory_msgs/msg/JointTrajectory | gz.msgs.JointTrajectory | | ||
| vision_msgs/msg/Detection2D | gz.msgs.AnnotatedAxisAligned2DBox | | ||
| vision_msgs/msg/Detection2DArray | gz.msgs.AnnotatedAxisAligned2DBox_V | | ||
|
||
| vision_msgs/msg/Detection3D | gz::msgs::AnnotatedOriented3DBox | | ||
| vision_msgs/msg/Detection3DArray | gz::msgs::AnnotatedOriented3DBox_V | | ||
|
||
And the following for services: | ||
|
||
|
@@ -102,7 +103,7 @@ Now we start the ROS listener. | |
``` | ||
# Shell B: | ||
. /opt/ros/galactic/setup.bash | ||
. /opt/ros/rolling/setup.bash | ||
ros2 topic echo /chatter | ||
``` | ||
|
@@ -134,7 +135,7 @@ Now we start the ROS talker. | |
``` | ||
# Shell C: | ||
. /opt/ros/galactic/setup.bash | ||
. /opt/ros/rolling/setup.bash | ||
ros2 topic pub /chatter std_msgs/msg/String "data: 'Hi'" --once | ||
``` | ||
|
@@ -172,7 +173,7 @@ Now we start the ROS GUI: | |
``` | ||
# Shell C: | ||
. /opt/ros/galactic/setup.bash | ||
. /opt/ros/rolling/setup.bash | ||
ros2 run rqt_image_view rqt_image_view /rgbd_camera/image | ||
``` | ||
|
@@ -290,9 +291,43 @@ To run the bridge node with the above configuration: | |
ros2 run ros_gz_bridge parameter_bridge --ros-args -p config_file:=$WORKSPACE/ros_gz/ros_gz_bridge/test/config/full.yaml | ||
``` | ||
## Example 6: Using ROS namespace with the Bridge | ||
When spawning multiple robots inside the same ROS environment, it is convenient to use namespaces to avoid overlapping topic names. | ||
There are three main types of namespaces: relative, global (`/`) and private (`~/`). For more information, refer to ROS documentation. | ||
Namespaces are applied to Gazebo topic both when specified as `topic_name` as well as `gz_topic_name`. | ||
By default, the Bridge will not apply ROS namespace on the Gazebo topics. To enable this feature, use parameter `expand_gz_topic_names`. | ||
Let's test our topic with namespace: | ||
```bash | ||
# Shell A: | ||
. ~/bridge_ws/install/setup.bash | ||
ros2 run ros_gz_bridge parameter_bridge chatter@std_msgs/msg/[email protected] \ | ||
--ros-args -p expand_gz_topic_names:=true -r __ns:=/demo | ||
``` | ||
Now we start the Gazebo Transport listener. | ||
```bash | ||
# Shell B: | ||
gz topic -e -t /demo/chatter | ||
``` | ||
Now we start the ROS talker. | ||
```bash | ||
# Shell C: | ||
. /opt/ros/rolling/setup.bash | ||
ros2 topic pub /demo/chatter std_msgs/msg/String "data: 'Hi from inside of a namespace'" --once | ||
``` | ||
By changing `chatter` to `/chatter` or `~/chatter` you can obtain different results. | ||
## API | ||
ROS 2 Parameters: | ||
* `subscription_heartbeat` - Period at which the node checks for new subscribers for lazy bridges. | ||
* `config_file` - YAML file to be loaded as the bridge configuration | ||
* `expand_gz_topic_names` - Enable or disable ROS namespace applied on GZ topics. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>ros_gz_bridge</name> | ||
<version>0.246.0</version> | ||
<version>1.0.0</version> | ||
<description>Bridge communication between ROS and Gazebo Transport</description> | ||
<maintainer email="[email protected]">Aditya Pande</maintainer> | ||
<maintainer email="[email protected]">Alejandro Hernandez</maintainer> | ||
|
@@ -31,12 +31,8 @@ | |
<depend>yaml_cpp_vendor</depend> | ||
<depend>vision_msgs</depend> | ||
|
||
<!-- Garden (default) --> | ||
<depend condition="$GZ_VERSION == '' or $GZ_VERSION == garden">gz-msgs9</depend> | ||
<depend condition="$GZ_VERSION == '' or $GZ_VERSION == garden">gz-transport12</depend> | ||
<!-- Harmonic --> | ||
<depend condition="$GZ_VERSION == harmonic">gz-msgs10</depend> | ||
<depend condition="$GZ_VERSION == harmonic">gz-transport13</depend> | ||
<depend>gz_msgs_vendor</depend> | ||
<depend>gz_transport_vendor</depend> | ||
|
||
<test_depend>ament_cmake_gtest</test_depend> | ||
<test_depend>ament_lint_auto</test_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.