ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Problem with Hector Navigation

asked 2014-09-19 04:01:34 -0600

jeremy33 gravatar image

updated 2014-09-23 22:28:53 -0600

Hello everyone,

I am working on a robot (turtlebot) to make autonomous navigation in an unknown environment with some extra skills (objet recognition, object localization, ...).

The robot is equipped with a Hokuyo UTM-30LX and a Asus XtionPRO. On the Turtlebot there is a small laptop (Ubuntu 12.04, ROS Hydro) to get the data from the sensors (scan from the lidar and images from the camera) and to receive the cmd_velocity to move the robot. Another computer (Ubuntu 12.04, Ros Groovy) is used to process all this data and for example to calculate the path of the robot. For the map&localization I'm using Hector SLAM. For the navigation, I'm using Hector Navigation Stack (hector_costmap, hector_exploration_node, hector_ecploration_controller). Here is my launchfile for the navigation part:

<launch>
<node pkg="hector_costmap" type="hector_costmap" name="hector_costmap" output="screen" respawn="false">
    <!-- Frame names -->
    <param name="cost_map_topic" value="cost_map" />
    <param name="map_frame_id" value="map" />
    <param name="local_transform_frame_id" value="base_footprint" />
    <param name="elevation_map_topic" value="elevation_map_local" />
    <param name="grid_map_topic" value="scanmatcher_map" />
    <param name="sys_msg_topic" value="syscommand" />
    <param name="cloud_topic" value="openni/depth/points" />

    <!-- Costmap parameters -->
    <param name="use_elevation_map" value="false" />
    <param name="use_grid_map" value="true" />
    <param name="use_cloud_map" value="false" />

    <param name="initial_free_cells_radius" value="0.3" />
    <param name="update_radius" value="1.0"/>
    <param name="costmap_pub_freq" value="1.0" />
</node>

<node pkg="hector_exploration_node" type="exploration_planner_node" name="hector_exploration_node" output="screen">
    <rosparam file="$(find hector_exploration_node)/config/costmap.yaml" command="load" />
</node>

<node pkg="hector_exploration_controller" type="simple_exploration_controller" name="hector_exploration_controller" output="screen" respawn="true">
    <remap from="/cmd_vel" to="/mobile_base/commands/velocity"/>
</node>
</launch>

And here is the costmap config file:

global_costmap:
    map_type: costmap
    track_unknown_space: true
    unknown_cost_value: 255
    obstacle_range: 2.5
    raytrace_range: 3.0
    footprint: [[0.15, 0.0],
              [0.15, 0.15],
              [0.0, 0.17],
              [-0.15, 0.15],
              [-0.15,0.0],
              [-0.15,-0.15],
              [0.0, -0.17],
              [0.15, -0.15]
              ]
    inflation_radius: 0.50

    #transform_tolerance: 0.5
    inscribed_radius: 0.3
    circumscribed_radius: 0.32
    global_frame: /map
    robot_base_frame: /base_link
    update_frequency: 0.5
    publish_frequency: 0.1
    static_map: true
    rolling_window: false
    cost_scaling_factor: 10.0

It seems to work well, Hector packages find frontiers, can calculate the path. The velocity command is well sent to the robot, but this latter is like a drunk robot ! It is making circles and don't follow the path.... (see Figure: https://www.dropbox.com/s/w4tuocrf1py... )

I'm sure it's because I miss something or put bad parameters. Do you have any idea ?

Thank you for your help ! :)

Edit : I make new tests and the robot still have the same behaviour: turning on itself. I noticed that the robot stops for a short moment when a new path was calculated and it still turn on itself. It's like if the robot can't be on the exact location of the path and turns to try being on the path... Is there any parameters to give it more tolerance ? Moreover I just use the cmd_velocity generated by the hector_exploration_controller, is it enough ? I saw that there is also the hector_path_follower but ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-09-25 07:32:43 -0600

jeremy33 gravatar image

I found a solution ! Hector Exploration Controller is calling the Hector Path Follower node. In this node there is some parameter like tolerance_trans or tolerance_rot. Changing the default parameters from 0.1 and 0.2 to 0.3 for both, the robot is not turning on itself anymore. Moreover, the acceleration and the stop was very strong. So I decrease the k_trans and the k_rot for the gain in translation and rotation and it's now smoother.

I hope it will help someone else trying to use the solutions provided by Hector Team ;)

edit flag offensive delete link more

Comments

hello Jeremy, i faced the exact same problem with my Turtlebot. went on with ur solution and did not help me, i have a URG-04LX lidar and a Kobuki base and it keeps turning and turning at the same spot. do u mind to share your full Launch files so i can compare? im really stuck! thank you.

sobot gravatar image sobot  ( 2015-05-04 13:44:25 -0600 )edit

I tried reducing the max linear velocity and K_trans, k_rot as well as tolerance parameters. However the robot drives very fast forward and does not avoid obstacles at all.It drives straight and does not even avoid obstacles! Could you comment on possible causes?

RS gravatar image RS  ( 2015-07-26 21:25:07 -0600 )edit

Hi @jeremy33 , I have adjusted parameters like tolerance_trans, tolerance_rot, k_trans and k_rot the path following motion has been improved but the motion is still far from ideal where the robot shuffles linearly and takes a long time to turn and follow the path properly. May I ask if you have any solution on this?

jjbecomespheh gravatar image jjbecomespheh  ( 2020-07-20 00:30:29 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2014-09-19 04:01:34 -0600

Seen: 2,537 times

Last updated: Sep 25 '14