0
$\begingroup$

Rosanswers logo

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/w4tuocrf1py6ffp/Screenshot%20from%202014-09-19%2016%3A54%3A22.png)

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 it doesn't seem to work (maybe need a remap from a topic...).

Edit 2 : I still don't manage to solve this issue. Maybe I could give the exploration path generated by Hector_Exploration node to give it to a local planer ? Do you have an idea to do that ?!

Thanks for your help or suggestions !


Originally posted by jeremy33 on ROS Answers with karma: 38 on 2014-09-19

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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 ;)


Originally posted by jeremy33 with karma: 38 on 2014-09-25

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by sobot on 2015-05-04:
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.

Comment by RS on 2015-07-26:
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?

Comment by jjbecomespheh on 2020-07-20:
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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.