From c8903cc798563b4a3c16e913f55966b5decc1270 Mon Sep 17 00:00:00 2001 From: Bernd Gassmann Date: Thu, 16 May 2024 15:44:44 +0200 Subject: [PATCH] Adapt to new naming --- ros2_demo/ros2_demo/ros2_demo.py | 8 +++--- ros2_demo/rviz/ros2_demo.rviz | 42 ++++++++++++++++---------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/ros2_demo/ros2_demo/ros2_demo.py b/ros2_demo/ros2_demo/ros2_demo.py index 93095a4..6068b71 100644 --- a/ros2_demo/ros2_demo/ros2_demo.py +++ b/ros2_demo/ros2_demo/ros2_demo.py @@ -78,8 +78,8 @@ def _setup_sensors(self, vehicle, sensors_config): self.get_logger().info("Spawning sensor: {}".format(sensor)) bp = self._blueprint_library.filter(sensor.get("type"))[0] - bp.set_attribute("ros_name", sensor.get("id")) - bp.set_attribute("role_name", sensor.get("id")) +# bp.set_attribute("ros_name", sensor.get("id")) +# bp.set_attribute("role_name", sensor.get("id")) for key, value in sensor.get("attributes", {}).items(): bp.set_attribute(str(key), str(value)) @@ -104,7 +104,7 @@ def _setup_sensors(self, vehicle, sensors_config): ) ) - sensors[-1].enable_for_ros() +# sensors[-1].enable_for_ros() return sensors @@ -169,7 +169,7 @@ def main(args=None): # Check ROS time if abs(node.get_clock().now().nanoseconds * 1e-9 - snapshot.timestamp.elapsed_seconds) > 0.0001: - node.get_logger().warn("The clock is not synchronized") + node.get_logger().warn("The clock is not synchronized; ros-time ({}) python-time ({}) ".format(node.get_clock().now().nanoseconds, snapshot.timestamp.elapsed_seconds)) total_frames += 1 diff --git a/ros2_demo/rviz/ros2_demo.rviz b/ros2_demo/rviz/ros2_demo.rviz index 1ddbbfe..aab20ee 100644 --- a/ros2_demo/rviz/ros2_demo.rviz +++ b/ros2_demo/rviz/ros2_demo.rviz @@ -122,8 +122,8 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable - Value: /carla/hero/rgb/image + Reliability Policy: Best Effort + Value: /carla/vehicles/hero/sensors/rgb/front/image Value: true - Class: rviz_default_plugins/Image Enabled: true @@ -136,8 +136,8 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable - Value: /carla/hero/depth/image + Reliability Policy: Best Effort + Value: /carla/vehicles/hero/sensors/depth/front/image Value: true - Class: rviz_default_plugins/Image Enabled: true @@ -150,8 +150,8 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable - Value: /carla/hero/dvs/image + Reliability Policy: Best Effort + Value: /carla/vehicles/hero/sensors/dvs/front/image Value: true - Class: rviz_default_plugins/Image Enabled: true @@ -164,8 +164,8 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable - Value: /carla/hero/instance_segmentation/image + Reliability Policy: Best Effort + Value: /carla/vehicles/hero/sensors/instance_segmentation/front/image Value: true - Class: rviz_default_plugins/Image Enabled: true @@ -178,8 +178,8 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable - Value: /carla/hero/semantic_segmentation/cityscapes/image + Reliability Policy: Best Effort + Value: /carla/vehicles/hero/sensors/semantic_segmentation/front/image Value: true - Class: rviz_default_plugins/Image Enabled: true @@ -192,8 +192,8 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable - Value: /carla/hero/optical_flow/image + Reliability Policy: Best Effort + Value: /carla/vehicles/hero/sensors/optical_flow/front/image Value: true Enabled: true Name: Cameras @@ -227,8 +227,8 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable - Value: /carla/hero/lidar + Reliability Policy: Best Effort + Value: /carla/vehicles/hero/sensors/lidar/front Use Fixed Frame: true Use rainbow: true Value: true @@ -260,8 +260,8 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable - Value: /carla/hero/semantic_lidar + Reliability Policy: Best Effort + Value: /carla/vehicles/hero/sensors/semantic_lidar/front Use Fixed Frame: true Use rainbow: true Value: false @@ -297,8 +297,8 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable - Value: /carla/hero/radar_front + Reliability Policy: Best Effort + Value: /carla/vehicles/hero/sensors/radar/default Use Fixed Frame: true Use rainbow: true Value: true @@ -323,14 +323,14 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable + Reliability Policy: Best Effort Value: /initialpose - Class: rviz_default_plugins/SetGoal Topic: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable + Reliability Policy: Best Effort Value: /goal_pose - Class: rviz_default_plugins/PublishPoint Single click: true @@ -338,7 +338,7 @@ Visualization Manager: Depth: 5 Durability Policy: Volatile History Policy: Keep Last - Reliability Policy: Reliable + Reliability Policy: Best Effort Value: /clicked_point Transformation: Current: