Move base publishing incorrect cmd_vel

asked 2016-10-31 12:44:11 -0500

mscott gravatar image

updated 2016-10-31 15:30:02 -0500

Hi everyone,

For research I use the MORSE simulator platform with ROS as middleware. Things have generally been working out well, but I seem to have run into problems controlling the robot autonomously. I am specifying a waypoint for the robot to fly to, and my hope is that the robot will path plan and fly to the position. Move_base was working very well for me when I was using a simple ATRV type robot, but I want to use it for a dynamically correct quadrotor. The quadrotor controller takes in a velocity and yaw command and then the controller takes care of the dynamics from there. Move_base should publish these velocity commands, which is why I think that it should work well with my setup.

The problem: when I use move_base the published velocity is very incorrect. cmd_vel is only publishing a yaw rate, but generally no linear velocities. Again, the setup used was very similar for a robot which received correct cmd_vel, so I'm struggling to understand why move_base is not publishing the correct velocities.

move_base launch file: <launch>

<!--param name="/use_sim_time" value="true" /-->
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
<remap from="scan" to="/base_scan" />
<!--remap from="scan2" to="camera/scan" /-->
<remap from="odom_frame" to="odom" />
<param name="xmin" value="-60.0"/>
<param name="ymin" value="-60.0"/>
<param name="xmax" value="60.0"/>
<param name="ymax" value="60.0"/>
<param name="delta" value="0.05"/>
<param name="maxUrange" value="120.0"/>

<node name="amcl" pkg="amcl" type="amcl">
<remap from="/scan" to="/base_scan" />
<remap from="/scan2" to="/camera/scan" />

<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">

<remap from="odom" to="odom" />
<remap from="map" to="/map" />
<remap from="cmd_vel" to="cmd_vel" />

<!--param name="conservative_reset_dist" value="10.0" /-->
<!--param name="save_pose_rate" value="10" /-->
<!--param name="footprint_padding" value="0.01" /-->
<param name="controller_frequency" value="15.0" />
<!--param name="controller_patience" value="8.0" /-->
<!--param name="planner_frequency" value="6.0" /-->
<!--param name="oscillation_distance" value="0.1" /-->
<!--param name="heading_lookahead" value="2.0" /-->
<param name="heading_scoring_timestep" value="2.0" />

<rosparam file="$(find morse_2dnav)/morse_move_base/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find morse_2dnav)/morse_move_base/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find morse_2dnav)/morse_move_base/local_costmap_params.yaml" command="load" />
<rosparam file="$(find morse_2dnav)/morse_move_base/global_costmap_params.yaml" command="load" />
<rosparam file="$(find morse_2dnav)/morse_move_base/base_local_planner_params.yaml" command="load" />
<!--param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" /-->
<!--rosparam file="$(find morse_2dnav)/morse_move_base/dwa_planner_ros.yaml" command="load" /-->




obstacle_range: 10.0 
raytrace_range: 4.0 
clearing: false 
transform_tolerance: 10.0 
footprint: [[0.35, 0.35], [-0.35, 0.35], [-0.35, -0.35], [0.35, -0.35]] 
#robot_radius: 0.25 
inflation_radius: 0.55 

observation_sources: laser_scan_sensor camera_sensor
#observation_sources: laser_scan_sensor
#observation_sources: camera_sensor

laser_scan_sensor: {sensor_frame: base_laser_link, data_type: LaserScan, topic: base_scan, marking: true, clearing: true}

base_local_planner params:

  max_vel_x: 3.0
  #min_vel_x: 0.1 
  #max_vel_theta: 1.0 
  #min_in_place_vel_theta: 1.0 

  acc_lim_theta: 5.0 
  #acc_lim_x: 0.5 
  #acc_lim_y: 0.5

  heading_scoring: true 
  heading_scoring_timestep: 15.0 
  holonomic_robot: false
  meter_scoring ...
edit retag flag offensive close merge delete


I'm not sure, but is the nav stack even capable of being used in non-2D contexts?

gvdhoorn gravatar imagegvdhoorn ( 2016-10-31 13:06:28 -0500 )edit

Yeah I probably should have specified that in my question. Move_base does only work for 2D navigation, but I think that's ok for my system since the input to the controller is 2D. I just need the navigation portion to be in 2D... but I suppose there could be a problem with the odometry.

mscott gravatar imagemscott ( 2016-10-31 15:09:50 -0500 )edit