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

Problem when setting 2D Nav Goal [closed]

asked 2017-04-26 12:40:09 -0600

nico_b gravatar image

updated 2017-04-27 11:47:51 -0600

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>

rqt_graph

rqt_graph on imgur

edit retag flag offensive close merge delete

Comments

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.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2017-04-27 04:31:36 -0600 )edit

I just added the rqt_graph... Thanks in advance

nico_b gravatar image nico_b  ( 2017-04-27 05:28:18 -0600 )edit

In global_costmap_params.yaml the static_map should be true.

gstavrinos gravatar image gstavrinos  ( 2017-04-27 05:41:49 -0600 )edit

Ok, I changed that, but still my problem stays the same...

nico_b gravatar image nico_b  ( 2017-04-27 05:58:25 -0600 )edit

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.

gstavrinos gravatar image gstavrinos  ( 2017-04-27 06:11:29 -0600 )edit

Also, try adding this controller_frequency: 3.0 in base_local_planner_params.yaml.

gstavrinos gravatar image gstavrinos  ( 2017-04-27 06:14:38 -0600 )edit

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.

nico_b gravatar image nico_b  ( 2017-04-27 06:26:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-04-27 06:30:41 -0600

To sum up what was said in the comments for future readers, nico_b had to:

  1. Change holonomic_robot to false in base_local_planner_params.yaml.
  2. Lower the control frequency to 3Hz (due to RPi3's low computing power) in base_local_planner_params.yaml.
  3. Change static_map to true in global_costmap_params.yaml.
edit flag offensive delete link more

Comments

You can now close your question. Happy coding! :)

gstavrinos gravatar image gstavrinos  ( 2017-04-27 06:32:17 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-04-26 12:40:09 -0600

Seen: 1,384 times

Last updated: Apr 27 '17