80601
March 11, 2023, 1:29am
1
the 2d nav goal is not working neither the initial pose i do not know what is wrong but i keep getting those messages
my launch file for amcl node
<launch>
<include file = '$(find my_turtlebot_mapping)/launch/provide_map.launch' />
<node pkg = 'move_base' name = 'move_base' type = 'move_base' output = 'screen' />
<rosparam file = '$(find my_robot)/maps/my_map.yaml' command = 'load' />
<arg name="use_map_topic" default="true"/>
<arg name="scan_topic" default="scan" />
<node pkg="amcl" type="amcl" name="amcl">
<param name="use_map_topic" value="$(arg use_map_topic)"/>
<!-- Publish scans from best pose at a max of 10 Hz -->
<param name="odom_model_type" value="diff"/>
<param name="odom_alpha5" value="0.1"/>
<param name="gui_publish_rate" value="10.0"/>
<param name="laser_max_beams" value="60"/>
<param name="laser_max_range" value="1.0"/>
<param name="min_particles" value="500"/>
<param name="max_particles" value="2000"/>
<param name="kld_err" value="0.05"/>
<param name="kld_z" value="0.99"/>
<param name="odom_alpha1" value="0.2"/>
<param name="odom_alpha2" value="0.2"/>
<!-- translation std dev, m -->
<param name="odom_alpha3" value="0.2"/>
<param name="odom_alpha4" value="0.2"/>
<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_model_type" value="likelihood_field"/>
<!-- <param name="laser_model_type" value="beam"/> -->
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="update_min_d" value="0.25"/>
<param name="update_min_a" value="0.2"/>
<param name="odom_frame_id" value="odom"/>
<param name="resample_interval" value="1"/>
<!-- Increase tolerance because the computer can get quite busy -->
<param name="transform_tolerance" value="1.0"/>
<param name="recovery_alpha_slow" value="0.0"/>
<param name="recovery_alpha_fast" value="0.0"/>
<remap from="scan" to="$(arg scan_topic)"/>
</node>
</launch>
my rqt graph
Hi @80601 ,
You must set initial robot pose before starting to move the robot.
You can set the robot’s initial pose in two ways:
Using Rviz: 2D Pose Estimate button
Using Launch file with AMCL parameters.
You cannot perform 2D Nav Goal unless your robot is localized properly.
From your launch file contents, I see that you have not set any initial pose for your robot. You can do that by adding the following lines into your AMCL launch file:
<param name="initial_pose_x" value="0.0"/>
<param name="initial_pose_y" value="0.0"/>
<param name="initial_pose_a" value="0.0"/>
<param name="initial_cov_xx" value="0.5*0.5"/>
<param name="initial_cov_yy" value="0.5*0.5"/>
<param name="initial_cov_aa" value="(3.141592654/12)*(3.141592654/12)"/>
Make sure you properly indent the above lines in the launch file.
Also, choose a smaller resolution for your map. Your m/pix value seems to be high. You need to change the delta
value in your slam_gmapping
launch file to a smaller value.
Always localize your robot before sending the goal pose.
Follow the above steps, that should fix your problem. Let me know if you still have issues.
Regards,
Girish
80601
March 11, 2023, 1:34pm
3
i reduced the resolution to 0.025 and delta to 0.3
i also included the parameters you just mentioned but the same error persist
also the pose estimate is not working
<launch>
<include file = '$(find my_turtlebot_mapping)/launch/provide_map.launch' />
<node pkg = 'move_base' name = 'move_base' type = 'move_base' output = 'screen' />
<rosparam file = '$(find my_robot)/maps/my_map.yaml' command = 'load' />
<arg name="use_map_topic" default="true"/>
<arg name="scan_topic" default="scan" />
<node pkg="amcl" type="amcl" name="amcl">
<param name="use_map_topic" value="$(arg use_map_topic)"/>
<!-- Publish scans from best pose at a max of 10 Hz -->
<param name="odom_model_type" value="diff"/>
<param name="odom_alpha5" value="0.1"/>
<param name="gui_publish_rate" value="10.0"/>
<param name="laser_max_beams" value="60"/>
<param name="laser_max_range" value="1.0"/>
<param name="min_particles" value="500"/>
<param name="max_particles" value="2000"/>
<param name="kld_err" value="0.05"/>
<param name="kld_z" value="0.99"/>
<param name="odom_alpha1" value="0.2"/>
<param name="odom_alpha2" value="0.2"/>
<!-- translation std dev, m -->
<param name="odom_alpha3" value="0.2"/>
<param name="odom_alpha4" value="0.2"/>
<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_model_type" value="likelihood_field"/>
<!-- <param name="laser_model_type" value="beam"/> -->
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="update_min_d" value="0.25"/>
<param name="update_min_a" value="0.2"/>
<param name="odom_frame_id" value="odom"/>
<param name="resample_interval" value="1"/>
<param name="initial_pose_x" value="0.0"/>
<param name="initial_pose_y" value="0.0"/>
<param name="initial_pose_a" value="0.0"/>
<param name="initial_cov_xx" value="0.5*0.5"/>
<param name="initial_cov_yy" value="0.5*0.5"/>
<param name="initial_cov_aa" value="(3.141592654/12)*(3.141592654/12)"/>
<!-- Increase tolerance because the computer can get quite busy -->
<param name="transform_tolerance" value="1.0"/>
<param name="recovery_alpha_slow" value="0.0"/>
<param name="recovery_alpha_fast" value="0.0"/>
<remap from="scan" to="$(arg scan_topic)"/>
</node>
</launch>
Hi @80601 ,
I believe the values for resolution
and delta
should be the same since both of them refer to map’s resolution in meters/pixel. So, set these values the same.
Are you providing the map with map_server
? And is your AMCL node also running?
I think you can ignore the TF_REPEATED_DATA
warning.
– Girish
80601
March 11, 2023, 7:32pm
5
yes i provide the map using map_server and the amcl is running i wish i can ignore the warning but the nav goal and pose estimate are not working and keep me from completing the project