tf problem of controlling multiple robots on the same map
hello everyone and good work.
I'm trying to control multiple robots on the same map but I get an error below:
[ WARN] [1690531803.231598299, 3348.259000000]: Timed out waiting for transform from agv2/base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.1 timeout was 0.1.
[ WARN] [1690531803.231598299, 3348.259000000]: Timed out waiting for transform from agv2/base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.1 timeout was 0.1.
Yes, that's exactly the error I got. so there is no broadcast like map and my robots don't connect to the map framework. ros_graph:
tf_tree:
launch_file:
<launch>
<!-- Arguments -->
<arg name="map_file" default="$(find agv_gazebo)/map/indoor.yaml"/>
<arg name="open_rviz" default="false"/>
<arg name="move_forward_only" default="false"/>
<arg name="first_agv" default="agv1"/>
<arg name="second_agv" default="agv2"/>
<arg name="initial_pose_x" default="-10.0"/>
<arg name="initial_pose_y" default="-2.7"/>
<arg name="initial_pose_a" default="1.57"/>
<!--param name="/use_sim_time" value="true"/-->
<group ns = "$(arg second_agv)">
<!-- Map server -->
<node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/>
<!-- Merging Lidar Data -->
<include file="$(find ira_laser_tools)/launch/laserscan_multi_merger2.launch"/>
<!-- AMCL -->
<node pkg="amcl" type="amcl" name="amcl" output="screen">
<param name="min_particles" value="500"/>
<param name="max_particles" value="5000"/>
<param name="kld_err" value="0.05"/>
<param name="update_min_d" value="0.15"/>
<param name="update_min_a" value="0.15"/>
<param name="resample_interval" value="1"/>
<param name="transform_tolerance" value="0.5"/>
<param name="recovery_alpha_slow" value="0.00"/>
<param name="recovery_alpha_fast" value="0.00"/>
<param name="initial_pose_x" value="$(arg initial_pose_x)"/>
<param name="initial_pose_y" value="$(arg initial_pose_y)"/>
<param name="initial_pose_a" value="$(arg initial_pose_a)"/>
<param name="gui_publish_rate" value="50.0"/>
<!--remap from="scan" to="scan"/-->
<param name="laser_max_range" value="20.0"/>
<param name="laser_max_beams" value="540"/>
<param name="laser_z_hit" value="0.5"/>
<param name="laser_z_short" value="0.05"/>
<param name="laser_z_max" value="0.05"/>
<param name="laser_z_rand" value="0.5"/>
<param name="laser_sigma_hit" value="0.2"/>
<param name="laser_lambda_short" value="0.1"/>
<param name="laser_likelihood_max_dist" value="5.0"/>
<param name="laser_model_type" value="likelihood_field"/>
<param name="odom_model_type" value="diff"/>
<param name="odom_alpha1" value="0.05"/>
<param name="odom_alpha2" value="0.05"/>
<param name="odom_alpha3" value="0.05"/>
<param name="odom_alpha4" value="0.05"/>
<param name="use_map_topic" value="true"/>
<param name="odom_frame_id" value="/$(arg second_agv)/odom"/>
<param name="base_frame_id" value="/$(arg second_agv)/base_footprint"/>
<param name="global_frame_id" value="/map"/>
</node>
<!-- move_base -->
<!-- Arguments -->
<!--arg name="cmd_vel_topic" default="/cmd_vel"/>
<arg name="odom_topic" default="odom"/-->
<!-- move_base -->
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS"/>
<rosparam file="$(find agv_gazebo)/param/multi_agv2_param/local_costmap_params.yaml" command="load"/>
<rosparam file="$(find agv_gazebo)/param/multi_agv2_param/global_costmap_params.yaml" command="load"/>
<rosparam file="$(find agv_gazebo)/param/multi_agv2_param/move_base_params.yaml" command="load"/>
<rosparam file="$(find agv_gazebo)/param/multi_agv2_param/dwa_local_planner_params.yaml" command="load"/>
<!--remap from="cmd_vel" to="$(arg cmd_vel_topic)"/>
<remap from="odom" to="$(arg odom_topic)"/-->
</node>
</group>
<!--node pkg="agv_gazebo" name="deneme" type="deneme" output="screen"/-->
<!-- RVIZ -->
<group if="$(arg open_rviz)">
<node pkg="rviz" type="rviz" name="rviz" required="true" args="-d $(find agv_gazebo)/rviz/navigation.rviz"/>
</group>
move_base param:
shutdown_costmaps: false
controller_frequency: 5.0
planner_patience: 5.0
controller_patience: 15.0
conservative_reset_dist: 3.0
planner_frequency: 5.0
oscillation_timeout: 0.0
oscillation_distance: 0.5
clearing_roation_allowed: true
globalcostmapframe:
global_costmap:
global_frame: map
robot_base_frame: agv1/base_footprint
update_frequency: 5.0
publish_frequency: 5.0
transform_tolerance: 0.5
static_map: true
rolling_window: false
track_unknown_space: true
footprint: [[-0.75,-0.43], [-0.75,0.43], [0.75,0.43], [0.75,-0.43]]
plugins:
- {name: static, type: "costmap_2d::StaticLayer"}
- {name: multibot_layer, type: "multibot_layer_namespace::MultibotLayer"}
- {name: sensor, type: "costmap_2d::ObstacleLayer"}
- {name: inflation, type: "costmap_2d::InflationLayer"}
static:
map_topic: /agv1/map
subscribe_to_updates: true
sensor:
observation_sources: scan1 scan2
scan1: {sensor_frame: agv1/base_scan1, data_type: LaserScan, topic: /agv1/scan1, marking: true, clearing: true,obstacle_range: 2.0, raytrace_range: 5.0}
scan2: {sensor_frame: agv1/base_scan2, data_type: LaserScan, topic: /agv1/scan2, marking: true, clearing: true,obstacle_range: 2.0, raytrace_range: 5.0}
inflation:
inflation_radius: 1
cost_scaling_factor: 8
localcostmapparam:
local_costmap:
footprint: [[-0.75,-0.43], [-0.75,0.43], [0.75,0.43], [0.75,-0.43]]
global_frame: map
robot_base_frame: agv1/base_footprint
static_map: false
rolling_window: true
update_frequency: 5.0
publish_frequency: 5.0
transform_tolerance: 0.5
width: 3
height: 3
# metre/hucre
resolution: 0.025
plugins:
- {name: multibot_layerer, type: "multibot_layer_namespace::MultibotLayer"}
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
- {name: inflation, type: "costmap_2d::InflationLayer"}
obstacle_layer:
observation_sources: scan1 scan2
scan1: {sensor_frame: agv1/base_scan1, data_type: LaserScan, topic: /agv1/scan1, marking: true, clearing: true,obstacle_range: 2.0, raytrace_range: 5.0}
scan2: {sensor_frame: agv1/base_scan2, data_type: LaserScan, topic: /agv1/scan2, marking: true, clearing: true,obstacle_range: 2.0, raytrace_range: 5.0}
inflation:
inflation_radius: 0.75
cost_scaling_factor: 4 # larger number = lower cost elevation
All my works are like this, I've been trying for 2 days, but I couldn't solve it, I would be very happy if you could help, thank you.
Asked by ali123 on 2023-07-28 03:43:41 UTC
Comments