Pioneer 3dx is starting changing position when ros_base_local_planner and amcl are launched.
Hi ! I have a really big problem with rosbaselocal planner configuration. When I launch the move_base.launch file and launch 'AMCL' node the module stars to jumping between couple position on the mp in the RVIZ but in gazebo is stable. Below I included my rqt_graph and tfframesview
In my opinion everything looks quite good. Below I've attached my launch file for starting the whole simulation with pioneer in it:
<launch>
<!-- these are the arguments you can pass this launch file, for example paused:=true -->
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find gazebo_worlds)/worlds/Factory_World.world"/>
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="headless" value="$(arg headless)"/>
</include>
<!-- No namespace here as we will share this description.
Access with slash at the beginning -->
<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description"
command="$(find xacro)/xacro.py '$(find pioneer_description)/urdf/pioneer3dx.xacro'" />
<!-- BEGIN PIONEER 1-->
<include file="$(find pioneer_description)/launch/one_pioneer.launch" >
<arg name="init_pose" value="-x 0 -y -55 -z 0" />
</include>
<param name="/use_sim_time" value="true"/>
<!-- Run the map server -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find gazebo_worlds)/maps/FactoryWorld.yaml" >
<param name="frame_id" value="/map" />
</node>
<param name="robot_description"
command="$(find xacro)/xacro.py '$(find pioneer_description)/urdf/pioneer3dx.xacro'" />
<!-- Show in Rviz -->
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find pioneer_description)/launch/pioneer.rviz"/>
</launch>
here I attached the amcl launch file:
<launch>
<node pkg="amcl" type="amcl" name="amcl" output="screen">
<param name="use_map_topic" value="true"/>
<!-- 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="12.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="base_frame_id" value="/base_link"/>
<param name="odom_frame_id" value="/odom"/>
<param name="global_frame_id" value="/map"/>
<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="/base_scan"/-->
<remap from="static_map" to="/static_map" />
<remap from="map" to="/map" />
</node>
</launch>
Below I attached the logs from starting the amcl node:
... logging to /home/wasiel13/.ros/log/d8dbce92-2cfd-11e6-b354-0cd292ad4094/roslaunch-wasiel13-5712.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://wasiel13:43959/
SUMMARY
========
PARAMETERS
* /amcl/base_frame_id: /base_link
* /amcl/global_frame_id: /map
* /amcl/gui_publish_rate: 10.0
* /amcl/kld_err: 0.05
* /amcl/kld_z: 0.99
* /amcl/laser_lambda_short: 0.1
* /amcl/laser_likelihood_max_dist: 2.0
* /amcl/laser_max_beams: 60
* /amcl/laser_max_range: 12.0
* /amcl/laser_model_type: likelihood_field
* /amcl/laser_sigma_hit: 0.2
* /amcl/laser_z_hit: 0.5
* /amcl/laser_z_max: 0.05
* /amcl/laser_z_rand: 0.5
* /amcl/laser_z_short: 0.05
* /amcl/max_particles: 2000
* /amcl/min_particles: 500
* /amcl/odom_alpha1: 0.2
* /amcl/odom_alpha2: 0.2
* /amcl/odom_alpha3: 0.2
* /amcl/odom_alpha4: 0.2
* /amcl/odom_alpha5: 0.1
* /amcl/odom_frame_id: /odom
* /amcl/odom_model_type: diff
* /amcl/recovery_alpha_fast: 0.0
* /amcl/recovery_alpha_slow: 0.0
* /amcl/resample_interval: 1
* /amcl/transform_tolerance: 1.0
* /amcl/update_min_a: 0.2
* /amcl/update_min_d: 0.25
* /amcl/use_map_topic: True
* /rosdistro: indigo
* /rosversion: 1.11.19
NODES
At the end I launch the move_base.launch file:
<launch>
<param name="/initial_pose_x" value="0" />
<param name="/initial_pose_y" value="-55" />
<param name="/initial_pose_a" value="0)" />
<arg name="robot_name" value="pioneer_1" />
<!--include file="$(find pioneer_3dx_2dnav)/launch/pioneer_3dx_2dnav_amcl.launch"-->
<!--arg name="tf_name" value="$(arg robot_name)"/-->
<!--/include-->
<!-- Assert fixed transform between map and odom (perfect localisation) -->
<node pkg="tf" type="static_transform_publisher" name="map_odom_broadcaster" args="0 0 0 0 0 0 1 /map /odom 100" output="screen"/>
<!-- END: Use with multi-pioneer simulation -->
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find pioneer_3dx_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find pioneer_3dx_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find pioneer_3dx_2dnav)/local_costmap_params.yaml" command="load" />
<rosparam file="$(find pioneer_3dx_2dnav)/global_costmap_params.yaml" command="load" />
<rosparam file="$(find pioneer_3dx_2dnav)/base_local_planner_params.yaml" command="load" />
<remap from="map" to="/map" />
</node>
<!--include file="$(find pioneer_ros)/launch/pioneer_controller.launch"/-->
</launch>
And below logs from launching move_base.launch:
... logging to /home/wasiel13/.ros/log/d8dbce92-2cfd-11e6-b354-0cd292ad4094/roslaunch-wasiel13-6122.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://wasiel13:45669/
SUMMARY
========
PARAMETERS
* /initial_pose_a: 0)
* /initial_pose_x: 0
* /initial_pose_y: -55
* /move_base/TrajectoryPlannerROS/acc_lim_theta: 3.2
* /move_base/TrajectoryPlannerROS/acc_lim_x: 2.5
* /move_base/TrajectoryPlannerROS/acc_lim_y: 2.5
* /move_base/TrajectoryPlannerROS/escape_vel: -0.2
* /move_base/TrajectoryPlannerROS/gdist_scale: 1.0
* /move_base/TrajectoryPlannerROS/heading_lookahead: 0.325
* /move_base/TrajectoryPlannerROS/holonomic_robot: False
* /move_base/TrajectoryPlannerROS/max_vel_theta: 1.0
* /move_base/TrajectoryPlannerROS/max_vel_x: 0.5
* /move_base/TrajectoryPlannerROS/meter_scoring: True
* /move_base/TrajectoryPlannerROS/min_in_place_vel_theta: 0.4
* /move_base/TrajectoryPlannerROS/min_vel_theta: -1.0
* /move_base/TrajectoryPlannerROS/min_vel_x: 0.0
* /move_base/TrajectoryPlannerROS/pdist_scale: 0.8
* /move_base/TrajectoryPlannerROS/sim_time: 1.7
* /move_base/TrajectoryPlannerROS/xy_goal_tolerance: 0.25
* /move_base/global_costmap/cost_scaling_factor: 5.0
* /move_base/global_costmap/footprint: [[0.2, 0.2], [0.2...
* /move_base/global_costmap/global_frame: /map
* /move_base/global_costmap/inflation_radius: 1.5
* /move_base/global_costmap/laser_scan_sensor/clearing: True
* /move_base/global_costmap/laser_scan_sensor/data_type: LaserScan
* /move_base/global_costmap/laser_scan_sensor/expected_update_rate: 0.3
* /move_base/global_costmap/laser_scan_sensor/marking: True
* /move_base/global_costmap/laser_scan_sensor/sensor_frame: hokuyo_link
* /move_base/global_costmap/laser_scan_sensor/topic: scan
* /move_base/global_costmap/observation_sources: laser_scan_sensor
* /move_base/global_costmap/obstacle_range: 2.5
* /move_base/global_costmap/publish_frequency: 1.0
* /move_base/global_costmap/raytrace_range: 3.0
* /move_base/global_costmap/robot_base_frame: base_link
* /move_base/global_costmap/static_map: True
* /move_base/global_costmap/transform_tolerance: 0.6
* /move_base/global_costmap/update_frequency: 5.0
* /move_base/local_costmap/cost_scaling_factor: 2.0
* /move_base/local_costmap/footprint: [[0.2, 0.2], [0.2...
* /move_base/local_costmap/global_frame: /odom
* /move_base/local_costmap/height: 1.5
* /move_base/local_costmap/inflation_radius: 1.5
* /move_base/local_costmap/laser_scan_sensor/clearing: True
* /move_base/local_costmap/laser_scan_sensor/data_type: LaserScan
* /move_base/local_costmap/laser_scan_sensor/expected_update_rate: 0.3
* /move_base/local_costmap/laser_scan_sensor/marking: True
* /move_base/local_costmap/laser_scan_sensor/sensor_frame: hokuyo_link
* /move_base/local_costmap/laser_scan_sensor/topic: scan
* /move_base/local_costmap/observation_sources: laser_scan_sensor
* /move_base/local_costmap/obstacle_range: 2.5
* /move_base/local_costmap/publish_cost_grid: True
* /move_base/local_costmap/publish_frequency: 2.0
* /move_base/local_costmap/raytrace_range: 3.0
* /move_base/local_costmap/resolution: 0.05
* /move_base/local_costmap/robot_base_frame: base_link
* /move_base/local_costmap/rolling_window: True
* /move_base/local_costmap/static_map: False
* /move_base/local_costmap/transform_tolerance: 0.6
* /move_base/local_costmap/update_frequency: 5.0
* /move_base/local_costmap/width: 1.5
* /rosdistro: indigo
* /rosversion: 1.11.19
NODES
/
map_odom_broadcaster (tf/static_transform_publisher)
move_base (move_base/move_base)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[map_odom_broadcaster-1]: started with pid [6140]
process[move_base-2]: started with pid [6141]
[ INFO] [1465338536.747346916, 1141.964000000]: Loading from pre-hydro parameter style
[ INFO] [1465338536.886055070, 1141.983000000]: Using plugin "static_layer"
[ INFO] [1465338537.199380461, 1142.032000000]: Requesting the map...
[ INFO] [1465338537.870436894, 1142.160000000]: Resizing costmap to 4000 X 4000 at 0.050000 m/pix
[ INFO] [1465338538.263378800, 1142.232000000]: Received a 4000 X 4000 map at 0.050000 m/pix
[ INFO] [1465338538.276843246, 1142.232000000]: Using plugin "obstacle_layer"
[ INFO] [1465338538.312650459, 1142.234000000]: Subscribed to Topics: laser_scan_sensor
[ INFO] [1465338538.437448155, 1142.247000000]: Using plugin "inflation_layer"
[ INFO] [1465338540.130721048, 1142.463000000]: Loading from pre-hydro parameter style
[ INFO] [1465338540.273190015, 1142.471000000]: Using plugin "obstacle_layer"
[ WARN] [1465338540.378793311, 1142.489000000]: Map update loop missed its desired rate of 5.0000Hz... the loop actually took 0.2150 seconds
[ INFO] [1465338540.558829527, 1142.512000000]: Subscribed to Topics: laser_scan_sensor
[ INFO] [1465338540.668099673, 1142.519000000]: Using plugin "inflation_layer"
[ INFO] [1465338541.288712550, 1142.606000000]: Created local_planner base_local_planner/TrajectoryPlannerROS
[ INFO] [1465338541.346774972, 1142.613000000]: Sim period is set to 0.05
[ WARN] [1465338541.891773627, 1142.674000000]: The scan observation buffer has not been updated for 0.44 seconds, and it should be updated every 0.30 seconds.
[ INFO] [1465338542.480809021, 1142.786000000]: Recovery behavior will clear layer obstacles
[ INFO] [1465338542.720759655, 1142.812000000]: Recovery behavior will clear layer obstacles
[ INFO] [1465338543.095704390, 1142.856000000]: odom received!
As you can see I get two WARNINGS:
[ WARN] [1465338540.378793311, 1142.489000000]: Map update loop missed its desired rate of 5.0000Hz... the loop actually took 0.2150 seconds
[ WARN] [1465338541.891773627, 1142.674000000]: The scan observation buffer has not been updated for 0.44 seconds, and it should be updated every 0.30 seconds.
This warning could have effect on the robot behaviour? I can see particle clound in the rviz, odometry seems OK, but when I enable TF view in RVIZ I can see that the map coordinates are ok i the place 0,0,0 but the odom coordinates are far away from the robot operatin area.
Robots i jumping between the 0,0 position and position set in gazebo...Of coure when i run the move base the path planner is able to define corret path but robot is turining in all direction and it is unable to reach the goal position.
Could you please tell me how to fix this problem? I've provided all steps according to tutorial How to set up rosbaselocal planner. Maybe I sent the initial_position coordinates to amcl wrong way? But then why the odom coordinates when I enable tf view in RVIZ are out of the map?
Asked by M_wasiel13 on 2016-06-07 17:44:53 UTC
Comments
Also I'm not able to set initial position in RVIZ by using 2d pose estimate button.The postion of particle cloaud is changing the odomotery is changing but the robot is still jumping.
Asked by M_wasiel13 on 2016-06-07 17:49:12 UTC