move base node only publishing 0's linear and angular values on /cmd _vel topic

asked 2022-01-23 18:39:05 -0600

bribri123 gravatar image

updated 2022-02-09 21:11:19 -0600

I am using the navigation stack and when running the code my robot does not move (but sometimes it does start publishing on the cmd_vel topic) and then I did a rostopic echo on the cmd_vel topic and noticed it was only publishing 0's I have told it to move sending a command via the 2D nav goal in Rviz, and I have a node subscribing to the /initialpose and /move_base_simple/goal topics and publishing /initial_2d and /goal_2d which I have confirmed work , for odometry i do not use an imu only motor encodors which are running on my Arduino in that publishes encoder ticks (I have checked and this works to) also on the Arduino it subscribes to /cmd_vel (works) the encoder ticks are published to a node that calculates the encodor ticks to odometry (works) and then published to the robot_pose_ekf package to get a pose estimate (works)I also tried running the rqt_graph and everything seemed normal also I am using a RPlidar A1 (Works) I was wondering If I should add an IMU because I tried a test for my odometry, recommended on the navagation troubleshooting guide and when trying the tests it recommended my odometry was poor and I was wondering if the bad odometry was the cause. also I have not configured the robot footprint and just used some values that were not configured for my robot and just went along with this because I don't khow how to measure these or what to meausure btw: I am not using a simulation, thank you for your help

Getting this warning:

[ WARN] [1644177008.699891513]: Map update loop missed its desired rate of 30.0000Hz... the loop actually took 0.0341 seconds

results from rostopic echo /cmd_vel

linear: 
  x: 0.0
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
---
linear: 
  x: 0.0
  y: 0.0
  z: 0.0
angular: 
  x: 0.0
  y: 0.0
  z: 0.0
---

results from rostopic echo /move_base/feedback/goal

WARNING: topic [/move_base/feedback/goal] does not appear to be published yet

results from rostopic echo /move_base/feedback/status

    goal_id: 
      stamp: 
        secs: 1644178269
        nsecs: 471130979
      id: "/move_base-7-1644178269.471130979"
    status: 1
    text: 

"This goal has been accepted by the simple action server"
---

result from rostopic echo /move_base/feedback/result

WARNING: topic [/move_base/feedback/result] does not appear to be published yet

screenshot of the tf tree

image description

screenshot of local costmap in rviz image description

base_local_planner_params.yaml

TrajectoryPlannerROS:

  max_vel_x: 0.60

  min_vel_x: 0.30

  #max_vel_theta: 0.05

  #min_vel_theta: -0.05

  #min_in_place_vel_theta: 0.05



  #acc_lim_theta: 0.07

  #acc_lim_x: 0.40

  #acc_lim_Y: 0.40

holonomic_robot: false

costmap_common_params.yaml

obstacle_range: 0.5

raytrace_range: 0.5

footprint: [[-0.14, -0.14], [-0.14, 0.14], [0.14, 0.14], [0.14, -0.14]]

map_topic: /map

subscribe_to_updates: true

global_frame: odom

robot_base_frame: base_link

update_frequency: 30.0

publish_frequency: 30.0

rolling_window: false



plugins:

  - {name: static_layer, type: "costmap_2d::StaticLayer"}

  - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}

  - {name: inflation_layer, type: "costmap_2d::InflationLayer"}



static_layer:

  map_topic: /map ...
(more)
edit retag flag offensive close merge delete

Comments

The robot shouldn't move until you've told it to move, and you haven't mentioned what your interaction with the robot looks like here. As far as I can tell this is the robot behaving as expected. You'll have to provide more detail if you'd like a more detailed answer.

cst0 gravatar image cst0  ( 2022-01-23 23:05:10 -0600 )edit

I added so more detail if you need more detail just ask

bribri123 gravatar image bribri123  ( 2022-01-24 00:00:59 -0600 )edit

Can you please post your code to see if something is missing

osilva gravatar image osilva  ( 2022-01-24 08:25:29 -0600 )edit

(the code I used is not mine so the credits go to https://automaticaddison.com)

https://automaticaddison.com/how-to-p... (encoder ticks to odometry) https://automaticaddison.com/how-to-c... (subscribes to initial pose and 2d nav goal) https://automaticaddison.com/how-to-c... (arduino code for publishing encoder ticks and listening to /cmd_vel)

bribri123 gravatar image bribri123  ( 2022-01-24 18:42:39 -0600 )edit

Could you please your format your code snippets properly? You can do that by selecting the code snippets and pressing Ctrl + K.

skpro19 gravatar image skpro19  ( 2022-02-03 10:50:59 -0600 )edit

Could you also add a Rviz screenshot of the local costmap?

skpro19 gravatar image skpro19  ( 2022-02-03 10:53:09 -0600 )edit

Could you also add the terminal outputs for the following commands after sending a 2DNavGoal

  • rostopic echo /cmd_vel
  • rostopic echo /move_base/feedback/goal
  • rostopic echo /move_base/feedback/status
  • rostopic echo /move_base/feedback/result
skpro19 gravatar image skpro19  ( 2022-02-03 10:57:43 -0600 )edit

Could you also put a screenshot of your tf tree? You can do that by running rosrun tf view_frames followed by evince frames.pdf.

skpro19 gravatar image skpro19  ( 2022-02-03 10:58:59 -0600 )edit