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="costmap_pub_freq" value="1.0" />
</node>

<node pkg="hector_exploration_node" type="exploration_planner_node" name="hector_exploration_node" output="screen">
</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]
]

#transform_tolerance: 0.5
global_frame: /map
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 ...

edit retag close merge delete

Sort by » oldest newest most voted

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

more

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.

( 2015-05-04 13:44:25 -0500 )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?

( 2015-07-26 21:25:07 -0500 )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?

( 2020-07-20 00:30:29 -0500 )edit