turtlebot3_simulations icon indicating copy to clipboard operation
turtlebot3_simulations copied to clipboard

Unable get amcl_pose datas when I wanted to simulate with multirobot.

Open AaronWaxson opened this issue 3 years ago • 1 comments

I want to simulate with multi turtlebot3s to check my algorithm. But when I wanted to launch multi turtlebot3 with amcl, I failed. I couldn't get lasers' datas. multi_turtlebot3.launch Screenshot from 2021-04-24 19-18-49 Screenshot from 2021-04-24 19-18-46 Screenshot from 2021-04-24 19-18-36

my_amcl.launch:

<!-- AMCL -->
<node pkg="amcl" type="amcl" name="amcl">
	<param name="min_particles"             value="500"/>
	<param name="max_particles"             value="3000"/>
	<param name="kld_err"                   value="0.02"/>
	<param name="update_min_d"              value="0.20"/>
	<param name="update_min_a"              value="0.20"/>
	<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="3.5"/>
	<param name="laser_max_beams"           value="180"/>
	<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="2.0"/>
	<param name="laser_model_type"          value="likelihood_field"/>

	<param name="odom_model_type"           value="diff"/>
	<param name="odom_alpha1"               value="0.1"/>
	<param name="odom_alpha2"               value="0.1"/>
	<param name="odom_alpha3"               value="0.1"/>
	<param name="odom_alpha4"               value="0.1"/>

	<param name="odom_frame_id"             value="$(arg ns)/odom"/>
	<param name="base_frame_id"             value="$(arg ns)/base_footprint"/>

</node>

When I launch the file, I got the message like these: log file: /home/aaron/.ros/log/427a48f2-a4da-11eb-91c3-65637e2cf421/tb3_1-spawn_urdf-9*.log Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame wheel_left_link at time 0.660000 according to authority unknown_publisher at line [ WARN] [1619254292.831645910, 0.661000000]: TF_REPEATED_DATA ignoring data with redundant timestamp for frame wheel_left_link at time 0.660000 according to authority unknown_publisher 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp [ WARN] [1619254293.285058609, 1.094000000]: TF_REPEATED_DATA ignoring data with redundant timestamp for frame wheel_left_link at time 1.093000 according to authority unknown_publisher

How should I do to can get the robots' sensors' datas right? Is tf's problem? And I noticed rqt_graph's difference between launch single robot and multi robots. single: single multi: rosgraph I searched a lot in the internet but still couldn't find a way to fix that, please help. THANKS!!!!!

AaronWaxson avatar Apr 24 '21 09:04 AaronWaxson

Hi @AaronWaxson I'm sorry about delayed response on this. There's an example of loading multiple TurtleBot3 for SLAM as below. Have you tried the example? https://emanual.robotis.com/docs/en/platform/turtlebot3/basic_examples/#load-multiple-turtlebot3s

When loading multiple robots, each robot will have identical TF, topics, nodes, etc, therefore, you should separate them with different namespaces.

ROBOTIS-Will avatar Jun 14 '21 23:06 ROBOTIS-Will