Я скромно использую ROS2 на Ubuntu 22.04 и nav2. У меня есть файл yaml файла параметров навигации, настроенный следующим образом с помощью монитора столкновений
collision_monitor:
ros__parameters:
use_sim_time: True
base_frame_id: "base_link"
odom_frame_id: "odom"
cmd_vel_in_topic: "cmd_vel_smoothed"
cmd_vel_out_topic: "cmd_vel_nav"
transform_tolerance: 0.2
source_timeout: 5.0
base_shift_correction: True
stop_pub_timeout: 2.0
# Polygons represent zone around the robot for "stop" and "slowdown" action types,
# and robot footprint for "approach" action type.
# Footprint could be "polygon" type with dynamically set footprint from footprint_topic
# or "circle" type with static footprint set by radius. "footprint_topic" parameter
# to be ignored in circular case.
polygons: [ "PolygonSlow", "FootprintApproach"]
PolygonSlow:
type: "polygon"
points: [0.6, 0.6, 0.6, -0.6, -0.6, -0.6, -0.6, 0.6]
action_type: "slowdown"
max_points: 3
slowdown_ratio: 0.9
visualize: True
polygon_pub_topic: "polygon_slowdown"
FootprintApproach:
type: "polygon"
action_type: "approach"
footprint_topic: "/local_costmap/footprint"
time_before_collision: 1.0
simulation_time_step: 0.1
max_points: 5
visualize: True
observation_sources: ["scan", "pointcloud"]
scan:
type: "scan"
topic: "/velodyne_points"
pointcloud:
type: "pointcloud"
topic: "/dept/color/points"
min_height: 0.1
max_height: 0.5
Затем хотелось бы включить узел мониторинга столкновений в мой файл nav2_navigation.launch.py. Насколько я понимаю, это должно быть в файле nav2_navigation.launch.py, а не в файле nav2_bringup.launch.py.
Итак, вот файл nav2_navigation.launch.py, в который включены части монитора столкновений.
Но все же в симуляции я не могу визуализировать полигоны монитора столкновений.
Любая помощь, как правильно реализовать узел монитора столкновений в скромном Nav2 ROS2?
п>
Я скромно использую ROS2 на Ubuntu 22.04 и nav2. У меня есть файл yaml файла параметров навигации, настроенный следующим образом с помощью монитора столкновений [code]collision_monitor: ros__parameters: use_sim_time: True base_frame_id: "base_link" odom_frame_id: "odom" cmd_vel_in_topic: "cmd_vel_smoothed" cmd_vel_out_topic: "cmd_vel_nav" transform_tolerance: 0.2 source_timeout: 5.0 base_shift_correction: True stop_pub_timeout: 2.0 # Polygons represent zone around the robot for "stop" and "slowdown" action types, # and robot footprint for "approach" action type. # Footprint could be "polygon" type with dynamically set footprint from footprint_topic # or "circle" type with static footprint set by radius. "footprint_topic" parameter # to be ignored in circular case. polygons: [ "PolygonSlow", "FootprintApproach"] PolygonSlow: type: "polygon" points: [0.6, 0.6, 0.6, -0.6, -0.6, -0.6, -0.6, 0.6] action_type: "slowdown" max_points: 3 slowdown_ratio: 0.9 visualize: True polygon_pub_topic: "polygon_slowdown" FootprintApproach: type: "polygon" action_type: "approach" footprint_topic: "/local_costmap/footprint" time_before_collision: 1.0 simulation_time_step: 0.1 max_points: 5 visualize: True observation_sources: ["scan", "pointcloud"] scan: type: "scan" topic: "/velodyne_points" pointcloud: type: "pointcloud" topic: "/dept/color/points" min_height: 0.1 max_height: 0.5 [/code] Затем хотелось бы включить узел мониторинга столкновений в мой файл nav2_navigation.launch.py. Насколько я понимаю, это должно быть в файле nav2_navigation.launch.py, а не в файле nav2_bringup.launch.py. Итак, вот файл nav2_navigation.launch.py, в который включены части монитора столкновений. [code]lifecycle_nodes = ['controller_server', 'smoother_server', 'planner_server', 'behavior_server', 'bt_navigator', 'waypoint_follower', 'collision_monitor'] ... load_nodes = GroupAction( condition=IfCondition(PythonExpression(['not ', use_composition])), actions=[ Node( package='nav2_controller', executable='controller_server', output='screen', respawn=use_respawn, respawn_delay=2.0, parameters=[configured_params], remappings=remappings), Node( package='nav2_collision_monitor', executable='collision_monitor', output='screen', emulate_tty=True, parameters=[configured_params]) ...
load_composable_nodes = LoadComposableNodes( condition=IfCondition(use_composition), target_container=container_name, composable_node_descriptions=[ ComposableNode( package='nav2_controller', plugin='nav2_controller::ControllerServer', name='controller_server', parameters=[configured_params], remappings=remappings), ComposableNode( package='nav2_collision_monitor', plugin='nav2_collision_monitor::CollisionMonitorNode', name='collision_monitor', parameters=[configured_params]), remappings=remappings), [/code] Но все же в симуляции я не могу визуализировать полигоны монитора столкновений. Любая помощь, как правильно реализовать узел монитора столкновений в скромном Nav2 ROS2? п>