Trying to get our robot navigating
Hello, there:
My partner and I are trying to get an autonomous robot which is based on 2 Rpis that comunicate via ethernet. The robot has 4 wheels, 4 electric motors and 2 motor controllers (Roboclaw 2x15A) and is rectangle-shaped. We have implemented a little supervisor that switches between teloperated mode and autonomous mode. We also have a little RTC in order to get both rpis synchronized through chronyd server (we had some issues about the timestamp so we got this fixed like that). This was just for introducing you for what comes now.
The thing is: when having everything fired up (nodes, etc) our move_base node shows this message:
WARN /move_base [/tmp/binarydeb/ros-melodic-costmap-2d-1.16.7/src/costmap_2d_ros.cpp:101(Costmap2DROS::Costmap2DROS)] [topics: /rosout, /cmd_vel, /move_base/current_goal, /move_base/goal] Timed out waiting for transform from base_link to world to become available before running costmap, tf error: Lookup would require extrapolation into the past. Requested time 1630430254.744803905 but the earliest data is at time 1630437446.981132030, when looking up transform from frame [base_link] to frame [world]. canTransform returned after 0.10104 timeout was 0.1.
We have the following configuration of the navigation stack:
Common costmap params yaml
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-17, -22], [17, -22], [17,25], [-17,25]]
inflation_radius: 0.60
IMPORTANT: we have no laser or imus. Just a camera and odometry source (motors).
Global costmap yaml
global_costmap:
global_frame: world
robot_base_frame: base_link
update_frequency: 5.0
static_map: true
Local costmap yaml
local_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: true
rolling_window: false
width: 6.0
height: 6.0
resolution: 0.05
Base local planner params yaml
TrajectoryPlannerROS:
max_vel_x: 2
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: false
Map yaml
image: /home/ubuntu/catkin_ws/src/robot_navigation/map_2.pgm
resolution: 0.012270416
origin: [11.019, 0.12270416, 0.0]
occupied_thresh: 0.85
free_thresh: 0.15
negate: 0
Map image (i can´t upload images since I haven´t got enough points). In the system is a .pgm file. Tf tree and node graph.
And last but not least, here are the launch and yamls of robot_localization package and move_base:
Robot_localization launch file
<launch>
<!--Robot location-->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true">
<rosparam command="load" file="$(find robot_localization)/params/ekf_robot.yaml" />
<rosparam param="initial_state">[10.0, 0.0, 0.0,
0.0, 0.0, 1.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0]</rosparam>
</node>
</launch>
Robot_localization yaml
frequency: 30
silent_tf_failure: false
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false
debug_out_file: /path/to/debug/file.txt
publish_tf: true
publish_acceleration: false
map_frame: world # Defaults to "map" if unspecified
odom_frame: odom # Defaults to "odom" if unspecified
base_link_frame: base_link # Defaults to "base_link" if unspecified
world_frame: world # Defaults to the value of odom_frame if unspecified
odom0: /odom ...
Checking TF tree may help you discover something. TF tree can be created with
rosrun tf view_frames
with all nodes up. ( ref http://wiki.ros.org/tf#view_frames )Already posted the TF tree between map yaml and robot localization launch.
I'm sorry. I overlooked it.