Problems in Rosject of ROS Navigation

I am doing the rosject of ROS Navigation in 5 days. But I come with some problems. When I do the third part, a.k.a the path planning part, it says to create many yaml-file to offer parameters for move_base package. Here come the problems:
In the course book, it points out especially that when we set parameters for global costmap, in noetic distribution, frames should be set without ‘/’, for example:

global_frame: /map # NOT VALID IN NOETIC
global_frame: map # VALID IN NOETIC

but when I copy the original code into rosject workspace, it goes error as:

[WARN] : global_costmap: Parameter "plugins" not provided, loading pre-Hydro parameters
[WARN] : local_costmap: Parameter "plugins" not provided, loading pre-Hydro parameters

but when I add ‘/’ ahead of ‘map’(for global map) and ‘odom’(for local map), it goes correctly:

[ INFO] [1668011233.297911972, 700.454000000]: global_costmap: Using plugin "inflation_layer"
[ INFO] [1668011234.284148657, 700.873000000]: local_costmap: Using plugin "obstacle_layer"
[ INFO] [1668011234.284148657, 700.873000000]: local_costmap: Using plugin "obstacle_layer"
[ INFO] [1668011234.650939230, 701.014000000]: local_costmap: Using plugin "inflation_layer"

so what actually should we do? add the ‘/’ or not?

Even though the loginfo is telling that the plugins are correctly used, I still cannot get a valid costmap in Rviz.
when I choose the topic as ‘/move_base/local_costmap/costmap’,
this is ‘local costmap’ in color scheme of ‘map’

this is ‘local costmap’ in color scheme of ‘costmap’

but when I choose the topic as ‘/map’, it is correct:

I have correctly done the steps before this part, including providing map and amcl launching, but still cannot send goals with ‘2d Nav Goal’ tool. When I use it to give a goal, nothing happens.
the terminal shows this message:

[ WARN] [1668015443.600002824, 3163.874000000]: The robot's start positionis off the global costmap. Planning will always fail, are you sure the robot has been properly localized?

This seems strange, because I just set the goal inside the map and beside the turtlebot.
All the parameters for configuration of ‘move_node’ are copied from course book.
I doubt that this map provided in this rosject is too small, but the scale of turtlebot and the map are both unknown. I am not sure if this is the resaon for the problem.

I found solution on my own.
This one is still wired. Afterwards I re-start several times, and the problem of ‘/’ just vanished…
I forgot to set ‘ns’ in corresponding rosparam-loading.

<rosparam file="$(find my_turtlebot_path_planning)/config/local_costmap_params.yaml" command="load" />


<rosparam file="$(find my_turtlebot_path_planning)/config/local_costmap_params.yaml" command="load" ns="local_costmap"/>

This stupid error result in that I cannot get valid costmap, both global one and local one.
It is true that this map is too small. So the default value of many parameters are not suitable. For example, ‘obstacle_range’ of ‘obstacle_laser’ layer in ‘costmap_commen_params.yaml’ has default value 2.5, which is too big for this case. This cause that every obstacle or egdes are too ‘dangerous’ for turtlebot to approach, as a result, turtlebot is left not too much space too move freely. So as to the ‘inflation_radious’ of ‘inflation’ layer.
Set these values smaller, and the costmap will more broad for turtlebot to move.
There is another problem, which is also caused by the fact that this map is too small. The default value of step in local planner is relatively big, so when a goal and a plan from global planner are given, turtlebot may only need 2-3 step to reach the goal. But if the planned path from global planner is too cursive, and the step of local planner is too large, the turtlebot will stuck at corners of planned path or something else, which result in failure of recovery behaviours. Hence, set the ‘sim_time’ of ‘DWAPlannerROS’ in ‘dwa_local_planner_params.yaml’.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.