Skip to content

Commit

Permalink
Fixed gz_bridges after may humble sync (#48)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <[email protected]>
  • Loading branch information
delihus authored Jun 4, 2024
1 parent 234c6ae commit a9e2223
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 29 deletions.
8 changes: 4 additions & 4 deletions config/gz_kinova_remappings.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
- topic_name: <robot_namespace><device_namespace>/wrist_mounted_camera/camera_info
- topic_name: /<robot_namespace>/<device_namespace>/wrist_mounted_camera/camera_info
ros_type_name: sensor_msgs/msg/CameraInfo
gz_type_name: ignition.msgs.CameraInfo
lazy: true

- topic_name: <robot_namespace><device_namespace>/wrist_mounted_camera/image
- topic_name: /<robot_namespace>/<device_namespace>/wrist_mounted_camera/image
ros_type_name: sensor_msgs/msg/Image
gz_type_name: ignition.msgs.Image
lazy: true

- topic_name: <robot_namespace><device_namespace>/wrist_mounted_camera/depth_image
- topic_name: /<robot_namespace>/<device_namespace>/wrist_mounted_camera/depth_image
ros_type_name: sensor_msgs/msg/Image
gz_type_name: ignition.msgs.Image
lazy: true

- ros_topic_name: <robot_namespace><device_namespace>/wrist_mounted_camera/points
- ros_topic_name: /<robot_namespace>/<device_namespace>/wrist_mounted_camera/points
ros_type_name: sensor_msgs/msg/PointCloud2
gz_type_name: ignition.msgs.PointCloudPacked
lazy: true
46 changes: 25 additions & 21 deletions config/gz_orbbec_astra_remappings.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
---
# https://github.com/orbbec/OrbbecSDK_ROS2#all-available-topics
- topic_name: <robot_namespace><device_namespace>/<camera_name>/color/camera_info
ros_type_name: sensor_msgs/msg/CameraInfo
gz_type_name: ignition.msgs.CameraInfo
lazy: true
- ros_topic_name: <robot_namespace><device_namespace>/<camera_name>/color/camera_info
gz_topic_name: <robot_namespace><device_namespace>/color/camera_info
ros_type_name: sensor_msgs/msg/CameraInfo
gz_type_name: ignition.msgs.CameraInfo
lazy: true

- topic_name: <robot_namespace><device_namespace>/<camera_name>/color/image_raw
ros_type_name: sensor_msgs/msg/Image
gz_type_name: ignition.msgs.Image
lazy: true
- ros_topic_name: <robot_namespace><device_namespace>/<camera_name>/color/image_raw
gz_topic_name: <robot_namespace><device_namespace>/color/image_raw
ros_type_name: sensor_msgs/msg/Image
gz_type_name: ignition.msgs.Image
lazy: true

- topic_name: <robot_namespace><device_namespace>/<camera_name>/depth/camera_info
ros_type_name: sensor_msgs/msg/CameraInfo
gz_type_name: ignition.msgs.CameraInfo
lazy: true
- ros_topic_name: <robot_namespace><device_namespace>/<camera_name>/depth/camera_info
gz_topic_name: <robot_namespace><device_namespace>/depth/camera_info
ros_type_name: sensor_msgs/msg/CameraInfo
gz_type_name: ignition.msgs.CameraInfo
lazy: true

- topic_name: <robot_namespace><device_namespace>/<camera_name>/depth/image_raw
ros_type_name: sensor_msgs/msg/Image
gz_type_name: ignition.msgs.Image
lazy: true
- ros_topic_name: <robot_namespace><device_namespace>/<camera_name>/depth/image_raw
gz_topic_name: <robot_namespace><device_namespace>/depth/image_raw
ros_type_name: sensor_msgs/msg/Image
gz_type_name: ignition.msgs.Image
lazy: true

- ros_topic_name: <robot_namespace><device_namespace>/<camera_name>/depth/points
gz_topic_name: <robot_namespace><device_namespace>/<camera_name>/depth/image_raw/points
ros_type_name: sensor_msgs/msg/PointCloud2
gz_type_name: ignition.msgs.PointCloudPacked
lazy: true
- ros_topic_name: <robot_namespace><device_namespace>/<camera_name>/depth/points
gz_ros_topic_name: <robot_namespace><device_namespace>/depth/image_raw/points
ros_type_name: sensor_msgs/msg/PointCloud2
gz_type_name: ignition.msgs.PointCloudPacked
lazy: true
2 changes: 1 addition & 1 deletion launch/gz_components.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_launch_description(name: str, package: str, namespace: str, component: y
device_namespace = get_value(component, "device_namespace")
robot_namespace = namespace

if "ur3" not in name and "kinova" not in name and "robotiq" not in name:
if "ur" not in name and "kinova" not in name and "robotiq" not in name:
if len(robot_namespace) and robot_namespace[0] != "/":
robot_namespace = "/" + robot_namespace
if len(device_namespace) and device_namespace[0] != "/":
Expand Down
6 changes: 5 additions & 1 deletion urdf/components.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
namespace="${robot_namespace}"
device_namespace="${device_namespace}"
kinova_type="gen3"
dof="6"
Expand All @@ -171,6 +172,7 @@
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
namespace="${robot_namespace}"
device_namespace="${device_namespace}"
kinova_type="gen3"
dof="6"
Expand All @@ -179,7 +181,6 @@
/>
</xacro:if>


<xacro:if value="${type == 'MAN06'}">
<xacro:include
filename="$(find ros_components_description)/urdf/kinova.urdf.xacro"
Expand All @@ -190,6 +191,7 @@
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
namespace="${robot_namespace}"
device_namespace="${device_namespace}"
kinova_type="gen3"
dof="7"
Expand All @@ -208,6 +210,7 @@
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
namespace="${robot_namespace}"
kinova_type="gen3"
dof="7"
gripper="robotiq_2f_85"
Expand All @@ -224,6 +227,7 @@
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
namespace="${robot_namespace}"
device_namespace="${device_namespace}"
robotiq_type="2f_85"
/>
Expand Down
5 changes: 4 additions & 1 deletion urdf/kinova.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,11 @@
<always_on>1</always_on>
<update_rate>${camera_fps}</update_rate>
<visualize>true</visualize>
<topic>${ns}wrist_mounted_camera</topic>
<topic>${ns}${device_namespace}/wrist_mounted_camera</topic>
<enable_metrics>false</enable_metrics>
<ros>
<namespace>${ns}${device_namespace}</namespace>
</ros>
</sensor>
</gazebo>

Expand Down
2 changes: 1 addition & 1 deletion urdf/orbbec_astra.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<far>8.0</far>
</clip>
<ros>
<namespace>${ns}</namespace>
<namespace>${ns}${device_namespace}</namespace>
</ros>
</sensor>

Expand Down

0 comments on commit a9e2223

Please sign in to comment.