AMCL works intermitently?
So I've been trying to get AMCL to work on my ad-hoc network using the amcl_demo.launch. I've tried and can successfully run AMCL every time I attempt it with a wired connection. With the ad-hoc network though, it fails a majority of the time resulting in
[ INFO] [#]: Subscribed to Topics: scan
[ INFO] [#]: Requesting the map...
[ INFO] [#]: Still waiting on map...
[ INFO] [#]: Still waiting on map...
[ WARN] [#]: You have set map parameters, but also requested to use the static map. Your parameters will be overwritten by those given by the map server
[ INFO] [#]: Received a 544 x 512 map at 0.050000 m/pix
[ WARN] [#]: Waiting on transform from /base_link to /map to become available before running costmap, tf error:
[ WARN] [#]: Waiting on transform from /base_link to /map to become available before running costmap, tf error:
[ WARN] [#]: Waiting on transform from /base_link to /map to become available before running costmap, tf error:
At first I thought this might be a bandwidth issue. But when I looked at the consumption it was ~1.5Mb/s for the peek. And when AMCL has successfully run on the ad-hoc network, there didn't seem to be much issues with sending it navigation goals and controlling it via teleoperation keyboard. I do remember there being lots of warnings and errors with the successful runs, but because it doesn't work that often, I can't replicate their messages to report them. What is possibly going wrong with my network or ROS, such that amcl_demo.launch works only on a rare occasion?
Upon further investigation with tf_monitor, I've noticed that I get a large delay in /base_footprint to /odom until the map is received. The delay is on the order of 20s. I also noticed that there are delays in the nodes /robot_pose_ekf and /robot_state_publisher that are more consistent across the runtime that are around 5s and 1s, respectively.
I also tried to pay attention to the CPU usage. At the beginning of running launch file, the CPU usage is around 90%, but once all the processes have begun, it tappers off.
When I run gmapping_demo.launch, I don't have nearly as many problems.
UPDATE: Just in retesting with a LAN connection, I've come across the same problem. It just doesn't occur that often.
Side Note: The TurtleBot does have an odd behavior not being able to move forward smoothly, whereas all other directions can move smoothly.