Robotics StackExchange | Archived questions

Move base publishing incorrect cmd_vel

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. Movebase 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. Movebase should publish these velocity commands, which is why I think that it should work well with my setup.

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

move_base launch file:

<!--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>

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




<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" /-->

</node>

commoncostmapparams:

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} 

baselocalplanner params:

TrajectoryPlannerROS: 
  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: true 

  yaw_goal_tolerance: 0.5 
  xy_goal_tolerance: 0.5 
  sim_period: 5.0 
  dwa: false
  vx_samples: 30 
  vtheta_samples: 30

I'm wondering if my setup is somehow incorrect? I was thinking that move_base might not be acceptable for my setup, but I really just need the velocities and recovery behaviors for my robot.

Thanks in advance!

EDIT: Move_base only works for 2D robots. I think that should be okay for my robot though... it only needs linear velocities and yaw and will calculate the pitch and roll based on other parameters. The navigation is only really occurring in a 2D setting as the robot will not be changing altitude.

Asked by mscott on 2016-10-31 12:44:11 UTC

Comments

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

Asked by gvdhoorn on 2016-10-31 13:06:28 UTC

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.

Asked by mscott on 2016-10-31 15:09:50 UTC

Answers