move base node only publishing 0's linear and angular values on /cmd _vel topic
I am using the navigation stack and when running the code my robot does not move (but sometimes it does start publishing on the cmdvel topic) and then I did a rostopic echo on the cmdvel 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 /movebasesimple/goal topics and publishing /initial2d and /goal2d 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 /cmdvel (works) the encoder ticks are published to a node that calculates the encodor ticks to odometry (works) and then published to the robotposeekf package to get a pose estimate (works)I also tried running the rqtgraph 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
screenshot of local costmap in rviz
baselocalplanner_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
costmapcommonparams.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
subscribe_to_updates: false
obstacle_layer:
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true}
inflation_layer:
inflation_radius: 0.2
globalcostmapparams.yaml
global_costmap:
global_frame: odom
update_frequency: 30.0
publish_frequency: 30.0
transform_tolerance: 0.2
resolution: 0.1
localcostmapparams.yaml
local_costmap:
update_frequency: 30.0
publish_frequency: 30.0
transform_tolerance: 0.2
static_map: false
rolling_window: true
resolution: 0.1
inflation_radius: 0.1
width: 1.0
height: 1.0
plugins:
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
obstacle_layer:
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true}
Asked by bribri123 on 2022-01-23 19:39:05 UTC
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.
Asked by cst0 on 2022-01-24 00:05:10 UTC
I added so more detail if you need more detail just ask
Asked by bribri123 on 2022-01-24 01:00:59 UTC
Can you please post your code to see if something is missing
Asked by osilva on 2022-01-24 09:25:29 UTC
(the code I used is not mine so the credits go to https://automaticaddison.com)
https://automaticaddison.com/how-to-publish-wheel-odometry-information-over-ros/ (encoder ticks to odometry) https://automaticaddison.com/how-to-create-an-initial-pose-and-goal-publisher-in-ros/ (subscribes to initial pose and 2d nav goal) https://automaticaddison.com/how-to-control-a-robots-velocity-remotely-using-ros/ (arduino code for publishing encoder ticks and listening to /cmd_vel)
Asked by bribri123 on 2022-01-24 19:42:39 UTC
Could you please your format your code snippets properly? You can do that by selecting the code snippets and pressing
Ctrl + K
.Asked by skpro19 on 2022-02-03 11:50:59 UTC
Could you also add a
Rviz
screenshot of thelocal costmap
?Asked by skpro19 on 2022-02-03 11:53:09 UTC
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
Asked by skpro19 on 2022-02-03 11:57:43 UTC
Could you also put a screenshot of your
tf
tree? You can do that by runningrosrun tf view_frames
followed byevince frames.pdf
.Asked by skpro19 on 2022-02-03 11:58:59 UTC
How should I display the local costmap in Rviz should I add Gridcells and select the local costmap topic
Asked by bribri123 on 2022-02-03 20:55:47 UTC
Ignore that. I don't think you are using a LiDAR.
Asked by skpro19 on 2022-02-04 01:39:10 UTC
Actually I am using A RPLIDAR A1 this may be connected but i'm getting this error
Asked by bribri123 on 2022-02-06 15:06:47 UTC
@bribri123 add
Maps
and select thelocal_costmap
topic.Asked by skpro19 on 2022-02-06 15:12:24 UTC
should I add amcl configuration
Asked by bribri123 on 2022-02-08 19:05:16 UTC
@bribri123 that's not an error.
Asked by skpro19 on 2022-02-23 10:59:54 UTC
Did you localize your bot in the map by using the
initialpose
button inRviz
before giving the goal?I might be wrong here but looking at the
Rviz
, it seems as if the bot might be in collision (with the walls). You might want to update theRviz
screenshot with the robot footprint.Also, it's weird that
/move_base/feedback/goal
is not being published whereas/move_base/feedback/status
is. You might want to check that again.Asked by skpro19 on 2022-02-23 11:08:09 UTC