Hands on ROS: Chapter 9 more on navigation

I’m starting a new thread since the first part of the discussion on Chapter 9 got a little long (and a bit off topic). That original thread is here.

LaserScan issue solved!

When I was showing the RVIZ for my AMCL navigation, if you look close there’s an error on the LaserScan

If you expand it the error message is an unhelpful “unknown reason for transform failure”. I’d have to set the global frame to /base_frame for the scan lines to show up. I checked my transforms - I did have a valid tf between /map - /odom - /base_frame, so that wasn’t the issue. (Side note - I had to sudo apt install ros-melodic-tf2-tools so that I could use rosrun tf2_tools view_frames.py. I did this on my laptop so that the pdf generated would be there where I could see it).

I found this post in ROS answers: https://answers.ros.org/question/10284/rviz-tf-error-unknown-reason-for-transform-failure/ plus others that had similar comments about the message timing. The most helpful part was user AlexM posted this link to his pull request on how to fix this:

Looks like this hasn’t been fixed yet. Looking at the files that had been downloaded onto the robot I went to ~/catkin_ws/src/ydlidar/src/ydlidar_node.cpp. I was able to change the two lines suggested in the pull request:

        scan_msg.scan_time = 1/_frequency;
        scan_msg.time_increment = 1/((float)samp_rate*1000);

Then on the terminal I made sure I was in the ~/catkin_ws directory and ran catkin_make. That actually worked (I’m always a little intimidated compiling C++ programs; on occasion in the past I had to delete the /build and /dev directories to get things to compile correctly. Fortunately I didn’t have to for this).

Now I can see the LaserScan indicators when the global_frame is set to /map.

I do get some other little caution messages when I run my launch files - I’ll be working through those as I try to improve Finmark’s navigation.



I have now created my very first GitHub pull requests to both the book’s and the ros-gopigo3 repositories (the latter seems more up to date by a little) so that this can be fixed for GoPiGo3 users even if the original ydlidar files haven’t been fixed.


All Right!! Way to go!! Big Bowl of :ice_cream: for you tonight.

1 Like

It was actually a :beer:, but same idea :slight_smile:


Better choice: Try Kvass.

If you have an international store that caters to Eastern European tastes, the probably sell kvass. Okroshka kvass, (soup kvass), is good as it’s not too sweet.

The best kvass I have had ANYWHERE comes from Canada. All-Star bakery in Toronto makes genuine fermented bread kvass from expired bread they had to take back unsold. International markets often, (sometimes), sell it and it’s NOT cheap at about $4-$5 per two-liter bottle - but it’s worth every penny.

I have has a number of Russian friends visit us in the US and I always get some for them. Every time, without exception, they say it’s better than a cold beer and almost good enough to get them off vodka.

Be careful. This is genuine, “live”, (the yeast is still active), kvass so the bottle pressures can be significantly greater than Champagne/et. al., and must be opened very carefully and slowly the first time if you don’t want to redecorate your kitchen in “early Slavic soft drink”.

It should be refrigerated, especially before first-opening.

The kvass brand “Nikola” is actually a play on words: “не кола” meaning “not cola” and the brand is spelled “некола” for copyright and trademark purposes.


I’ve wanted to. Supposedly the very first beers brewed in the world were from fermented bread (as opposed to malted grain). I don’t recall seeing it at our local international food store, but then again I wasn’t searching for it.

I love going to Toronto. Sadly Google says that All-Stars Bakery is permanently closed. That’s sad - it’s been quite a few years since I’ve been and this would have been a great excuse.

That’s hilarious.

1 Like

Total bummer. Seriously a bummer. I would have had cases of it shipped here if I could.


1 Like