Ask Your Question
1

cost-map parameters and gmapping with youbot

asked 2014-06-25 02:34:04 -0500

Hamid gravatar image

Hi everyone. I'm having a hard time with simulating the SLAM algorithms using KUKA YOUBOT and ROS GAZEBO and RVIZ.

At the first, following the tutorial and modifying it in according to use it on the YOUBOT I was able to move the robot around in the GAZEBO and see the map in the rviz, however the output map was an empty image but still I could see it in the RVIZ.

Afterward I messed up with tf and costmaps trying to have an output map... It didn't work and I couldn't bring it in the previous condition.. I changed TF tree and costmaps parameters.
this is the frames tree:

PDF: docs.google.com/file/d/0B_IPYGaJlxxtRnBjX2wzQjJFT2M/edit (Link Text) Image: docs.google.com/file/d/0B_IPYGaJlxxtUl95dVdoZTd1WEk/edit (Link Text)

and then after I messed up with costs-map parameters. afterward I have Cost-maps as following texts:

Common Parameters:

> map_type: costmap transform_tolerance:
> 0.2 obstacle_range: 2.5 raytrace_range: 3.0 inflation_radius:
> 0.25
> 
> observation_sources: base_scan
> 
> base_scan: {sensor_frame:
> base_laser_front_link,
>             data_type: LaserScan,
>             topic: /base_scan,
>             expected_update_rate: 0.0,
>             observation_persistence: 0.0,
>             marking: true,
>             clearing: true,
>             min_obstacle_height: -0.10,
>             max_obstacle_height: 2.0}

Global parameters #Independent settings for the planner's costmap

global_costmap:
    publish_voxel_map: true
    global_frame: /map
    robot_base_frame: base_link
    update_frequency: 5.0
    publish_frequency: 2.0
    static_map: false
    rolling_window: true

And the Local one: #Independent settings for the local costmap local_costmap: publish_voxel_map: true global_frame: /odom robot_base_frame: base_link update_frequency: 5.0 publish_frequency: 2.0 static_map: false rolling_window: true width: 10.0 height: 10.0 resolution: 0.5 origin_x: 0.0 origin_y: 0.0

Move_Base Parameters:

footprint: [[0.26, 0.18],
            [0.26, 0.014],
            [0.31, 0.014],
            [0.31, -0.014],
            [0.26, -0.014],
            [0.26, -0.18],
            [-0.27, -0.18],
            [-0.27, 0.18]]

controller_frequency: 10.0
controller_patience: 15.0
clearing_radius: 0.25
footprint_padding: 0.03

Base local planner parameters:

# Robot Configuration Parameters
TrajectoryPlannerROS:
    acc_lim_x: 1.25
    acc_lim_y: 1.25
    acc_lim_th: 1.6
    max_vel_x: 0.5
    min_vel_x: 0.1
    max_rotational_vel: 1.2
    min_in_place_rotational_vel: 0.1
    escape_vel: -0.1
    holonomic_robot: true

    # Goal Tolerance Parameters
    xy_goal_tolerance: 0.1
    yaw_goal_tolerance: 0.1

    # Forward Simulation Parameters
    sim_time: 1.7
    sim_granularity: 0.025
    vx_samples: 3
    vtheta_samples: 6

    # Trajectory Scoring Parameters
    goal_distance_bias: 0.8
    path_distance_bias: 0.6
    occdist_scale: 0.01
    heading_lookahead: 0.325
    dwa: false

    # Oscillation Prevention Parameters
    oscillation_reset_dist: 0.01

AMCL : <node pkg="tf" type="static_transform_publisher" name="basefootprint_to_odom" args="0.0 0.0 0.0 0 0 0.0 /odom /base_footprint 100"/> <node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0.0 0.0 0.0 0 0 0.0 /map /odom 1"/>

<node pkg="amcl" type="amcl" name="amcl">
  <remap from="scan" to="base_scan"/>

  <param name="odom_model_type" value="omni"/>
  <param name="odom_alpha5" value="0.1"/>
  <param name="transform_tolerance" value="0.2" />
  <param name="gui_publish_rate" value="1.0"/>
  <param name="laser_max_beams" value="30"/>
  <param name="min_particles" value="500"/>
  <param name="max_particles" value="5000"/>
  <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 ...
(more)
edit retag flag offensive close merge delete

Comments

Error log say tf has some problem. use these commands to see your tf $ rosrun tf view_frames $ evince frames.pdf

bvbdort gravatar imagebvbdort ( 2014-06-27 09:23:40 -0500 )edit

Thanks @bvbdort for reply... but I've already done that... docs.google.com/file/d/0B_IPYGaJlxxtRnBjX2wzQjJFT2M/edit (Link Text) Image: docs.google.com/file/d/0B_IPYGaJlxxtUl95dVdoZTd1WEk/edit this is frames... It seems to me that it's ok.

Hamid gravatar imageHamid ( 2014-06-29 10:58:58 -0500 )edit

http://docs.google.com/file/d/0B_IPYGaJlxxtRnBjX2wzQjJFT2M/edit http://docs.google.com/file/d/0B_IPYGaJlxxtUl95dVdoZTd1WEk/edit

Hamid gravatar imageHamid ( 2014-06-29 11:00:14 -0500 )edit

change map to odom frequecy rate to 50hz and are you using bag file ?

bvbdort gravatar imagebvbdort ( 2014-06-29 13:52:55 -0500 )edit

@bvbdort How can I do it? no I'm not using any bag file

Hamid gravatar imageHamid ( 2014-06-30 01:19:12 -0500 )edit

As you can see from the field "most recent transform" , tf timestamps are very old see , did you try by changing map to odom frequency ?

bvbdort gravatar imagebvbdort ( 2014-06-30 01:56:47 -0500 )edit

To be honest I still don't understand... how to do that? I mean where exactly defines it?.. probably I didn't change it before.. because I don't know how should I do... is it a parameters in costs maps?

Hamid gravatar imageHamid ( 2014-06-30 09:49:59 -0500 )edit

In AMCL update these and try <node pkg="tf" type="static_transform_publisher" name="basefootprint_to_odom" args="0.0 0.0 0.0 0 0 0.0 /odom /base_footprint 20"/> <node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0.0 0.0 0.0 0 0 0.0 /map /odom 20"/>

bvbdort gravatar imagebvbdort ( 2014-06-30 13:45:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-09-14 17:03:58 -0500

kwiesz91 gravatar image

Your error is because you are publishing the static transform map_to_odom. The (map -> odom) transformation is what the SLAM or Localization algorithm (e.g. gmapping or amcl, respectively) is in charge of outputting. (map -> odom) is the transform that corrects the drift in your odometry.

Typical transform setup of a mobile robot:

  • (base_link -> base_scan): Static transform that relates the scanner's frame to the robot's center of rotation (it's the scanner's pose in the base_link's frame).
  • (odom -> base_link): Broadcast by your Odometry node; it's the pose of the robot if just using odometry and is subject to drift over time (typical odometry comes from wheel encoders).
  • (map -> odom): Broadcast by SLAM/Localization node, which takes in the output of the odometry node and sensor readings to improve the accuracy of the robot's pose.

It would appear you have a lot of reading to do on transforms. Have you went through relevant tutorials yet? TF tutorials are here, and this is more info on how frames and transforms are typically used on mobile robots.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-06-25 02:34:04 -0500

Seen: 1,464 times

Last updated: Sep 14 '15