Problem when setting 2D Nav Goal [closed]
Hi,
I'm running ROS Kinetic
in Ubuntu 16.04.2 LTS on a Raspberry Pi 3.
My navigation stack is up and running and my robot is able to localize itself in a given map. I'm also able to drive around via a joystick (/input_joy/cmd_vel
-topic).
The next step is to drive around in rviz. I am able to set 2D Pose Estimates there, but whenever I'm trying to set a 2D Nav Goal, nothing is happening, except from the arrow and the path being visually displayed in rviz.
Unfortunately, when echoing the /cmd_vel
-topic, which is being published by move_base
, it always displays the following:
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: -1.0
As well I get the following error thrown until I kill move_base
:
Control loop missed its desired rate of 5.0000Hz... the loop actually took 0.4580 seconds
Since I don't get that error, before setting a 2D Nav Goal, I assume that there is either something wrong in one of my costmaps or move_base settings...
I appreciate all your help. Thanks in advance.
Nico
base_local_planner_params.yaml
TrajectoryPlannerROS:
max_vel_x: 0.19
min_vel_x: 0.095
max_vel_theta: 0.256
min_in_place_vel_theta: 0.192
acc_lim_theta: 3.2
acc_lim_x: 2.5
acc_lim_y: 2.5
holonomic_robot: true
meter_scoring: true
costmap_common_params.yaml
plugins:
- {name: static_map, type: "costmap_2d::StaticLayer"}
- {name: obstacles, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[0.05, 0.05], [0.05, -0.05],[0, -0.10]]
#robot_radius: 0.20
inflation_radius: 0.55
obstacles:
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true}
global_costmap_params.yaml
global_costmap:
global_frame: /map
robot_base_frame: base
update_frequency: 0.8
static_map: false
width: 5
height: 2
local_costmap_params.yaml
local_costmap:
global_frame: odom
robot_base_frame: base
update_frequency: 1.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 3.0
height: 3.0
resolution: 0.05
controller_frequency: 5.0
move_base.launch
<launch>
<master auto="start"/>
<node pkg="move_base" type="move_base" name="move_base" output="screen">
<rosparam file="/home/ubuntu/catkin_ws/src/project/launch/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="/home/ubuntu/catkin_ws/src/project/launch/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="/home/ubuntu/catkin_ws/src/project/launch/config/local_costmap_params.yaml" command="load" />
<rosparam file="/home/ubuntu/catkin_ws/src/project/launch/config/global_costmap_params.yaml" command="load" />
<rosparam file="/home/ubuntu/catkin_ws/src/project/launch/config/base_local_planner_params.yaml" command="load" />
</node>
</launch>
Please add the rosgraph. According to the /cmd_vel output your robot must drive clockwise, but you said your robots listens to /input_joy/cmd_vel, so its either /cmd_vel or /input_joy/cmd_vel.
I just added the rqt_graph... Thanks in advance
In global_costmap_params.yaml the static_map should be true.
Ok, I changed that, but still my problem stays the same...
In addition to the static_map for the global_costmap_params.yaml, also make sure that your robot IS holonomic and if it's not, set that to false in base_local_planner_params.yaml. I would guess that your robot is NOT holonomic, since holonomic robots are not that widespread with RPi implementations.
Also, try adding this
controller_frequency: 3.0
in base_local_planner_params.yaml.Thanks a lot, guys, the problem is solved... I got some bad values set in my
base_local_planner_params.yaml
-file, which didn't fit that robot.Thanks again.