robot not moving using move_base package [closed]

asked 2016-01-14 12:44:01 -0500

ngoldfarb gravatar image

Hello,

I am trying to understand how to use the the naviagation stack. I want to use the move_base package. I have been reading this . But I am still not sure how it works. I know that it should be pretty simple and I am just missing something. I think that my problem is that the velocity and odom commands are not talking to the right topics or something along those lines. It comes up in Rviz and Gazebo fine and I can control it with a joystick. But when I try to set a nav_goal in Rviz the robot does not move. Can someone help me understand what I am doing wrong? I have look through a couple of example of other robots but I still cannot figure out my mistake.

I have this in my .urdf.xacro to control the robot.

    <gazebo>
  <plugin name="object_controller" filename="libgazebo_ros_planar_move.so">
    <commandTopic>cmd_vel</commandTopic>
    <odometryTopic>odom</odometryTopic>
    <odometryFrame>odom</odometryFrame>
    <odometryRate>20.0</odometryRate>
    <robotBaseFrame>base_footprint</robotBaseFrame>
  </plugin>
</gazebo>

These are my config files:

local_costmap_params.yaml

local_costmap:
  global_frame: odom
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: true
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05

global_costmap_params.yaml

global_costmap:
  global_frame: odom
  robot_base_frame: base_link
  update_frequency: 5.0
  static_map: true

base_local_planner_params.yaml

TrajectoryPlannerROS:
  max_vel_x: 0.45
  min_vel_x: 0.1
  max_vel_theta: 1.0
  min_in_place_vel_theta: 0.4

  acc_lim_theta: 3.2
  acc_lim_x: 2.5
  acc_lim_y: 2.5

  holonomic_robot: true

and my Launch file

<launch>
  <!-- roslaunch arguments -->
  <arg name="paused" default="false"/>
  <arg name="debug" default="false"/>
  <arg name="gui" default="true"/>

  <!-- We resume the logic in empty_world.launch, changing only the name of 
    the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="worlds/empty.world" />
    <arg name="paused" value="$(arg paused)" />
    <arg name="debug" value="$(arg debug)" />
    <arg name="gui" value="$(arg gui)" />
    <arg name="use_sim_time" value="true" />
    <arg name="headless" value="false" />
  </include>

  <!-- urdf xml robot description loaded on the Parameter Server-->
  <param name="robot_description" command="$(find xacro)/xacro.py '$(find omni_shot)/urdf/omnishot_nav.urdf.xacro'" />

  <!-- push robot_description to factory and spawn robot in gazebo -->
  <node name="omni_spawn" pkg="gazebo_ros" type="spawn_model" output="screen" 
    args="-urdf -param robot_description -model omnishot" />


    <!--Load joint controller configurations from YAML file to parameter server -->
     <node name="rviz" pkg="rviz" type="rviz" required="true" />
  <rosparam file="$(find omni_shot)/config/config_nav.yaml" command="load" />


    <!-- load the controllers -->
  <node name="controller_spawner" pkg="controller_manager" type="spawner" output="screen"  args="joint_state_controller" />


  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher">
      <param name="publish_frequency" value="50"/> <!-- Hz -->
  </node>

  <node name="talker" pkg="omni_shot" type="test_simple_path.py"/>


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

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

  </node>

</launch>
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2017-02-15 20:49:30.315750

Comments

I used this package a few months ago but I don't remember well how it works. In the global costmap, the global frame can be "map" (different from the odom frame).

F.Brosseau gravatar imageF.Brosseau ( 2016-01-15 01:46:59 -0500 )edit

publish the result of a rostopic list to verify which topics are being published/subscribed in your framework.

Procópio gravatar imageProcópio ( 2016-01-18 02:57:02 -0500 )edit