Skip to content

Commit

Permalink
Adapt to new naming
Browse files Browse the repository at this point in the history
  • Loading branch information
berndgassmann committed May 16, 2024
1 parent 776e0e5 commit c8903cc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions ros2_demo/ros2_demo/ros2_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -104,7 +104,7 @@ def _setup_sensors(self, vehicle, sensors_config):
)
)

sensors[-1].enable_for_ros()
# sensors[-1].enable_for_ros()

return sensors

Expand Down Expand Up @@ -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

Expand Down
42 changes: 21 additions & 21 deletions ros2_demo/rviz/ros2_demo.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -323,22 +323,22 @@ 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
Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Reliability Policy: Best Effort
Value: /clicked_point
Transformation:
Current:
Expand Down

0 comments on commit c8903cc

Please sign in to comment.