Adventures with Ubuntu MATE/ROS Melodic on GoPiGo3

Hi All,

If any of you plan to follow the “Installing the RPLidar Lidar Sensor on the Raspberry Pi” DI Project which according to the author should eventually result in “a series of articles to make getting started with ROS and robotics more accessible.” The author is building this series to bring ROS to the GoPiGo3.

Since I have the RPLidar A1M8 used in the DI Project, I decided to give the tutorial instructions a try.

So I installed the 18.04 version of Ubuntu MATE. I then proceeded to try and install ROS Kinetic on Ubuntu using these instructions. However there was no joy as I kept getting “Unable to find ros kinetic desktop full” messages no matter what I tried.

A little research on the IoT determined that there is no ROS Kinetic available for the MATE version of Ubuntu! However Melodic, the latest version of ROS, is available for Ubuntu MATE and can be installed as the full desktop package. Since the ROS Melodic full desktop package is quite large, I recommend using a 64GB micro SD card, but remember you must reformat the micro SD card to FAT32 from exFAT before installing Ubuntu MATE.

More to come.

Regards,
Tom C

1 Like

To install Ubuntu MATE 18.04 on a Rpi 3B+ I followed these instructions.

Unlike the installation of the Raspbian For Robots the Ubuntu installation will require using a keyboard, display and mouse.

Once you have burned the Ubuntu MATE image to your micro SD card, insert it into your Rpi 3B+ and apply power. When the Ubuntu OS has booted up, follow the on screen instructions until you have just the desktop displayed.

Now you have to setup Ubuntu to be able to ssh into the Ubuntu OS. Follow these instructions to install and enable the openssh server, but do not start the server as you need to generate new host keys before starting openssh. To generate new host keys run the following: “sudo /usr/bin/ssh-keygen -A”. Then start openssh by running “systemctl start ssh;”.

You are going to have to know the IP address of your Rpi3B+ which you can do by viewing your WiFi router’s DHCP list.

Once you know your Rpi 3B+ IP address, then you can use Putty or a similar app to ssh into the Ubuntu OS.

Then you are going to want to create a Virtual Network Connection (VNC) with your Ubuntu OS. I followed these instructions to create and install tightvncserver on the Ubuntu MATE. However I found that if you are going to want to use the ROS Visualizer (rviz) tightvncserver does not support Xserver or OpenGL which rviz requires.

I presently have the Tigervnc server working on my Ubuntu Mate OS and it definitely does support Xserver and OpenGL however it has the same problem as the tightvnc server in that it does not allow copy and paste into the Ubuntu Mate desktop terminal window so I will have to see how to correct that issue.

You will also have to install a VNC client on your PC/laptop. I am using RealVNC, but there are others.

Once you get your VNC client running you will probably find that you cannot copy and paste into your VNC client’s terminal emulator. Not to worry as you can use your ssh app to correct the problem.

In your ssh terminal window type the following: “sudo apt-get install autocutsel”.

Then type the following: “sudo vncserver -kill :1” followed by “sudo nano ~/.vnc/xstartup”. Add the following line under xrdb $HOME/.Xresources : autocutsel -fork then save the .vnc/startup file.

Run “vncserver” to restart the tightvnc server. I stop the vncserver using Putty when I am done using the VNC Client and restart it using Putty when I want to use the VNC client.

Now comes the ROS Melodic installation following these instructions and these additional instructions. I used the ROS Wiki instructions to install the ROS Melodic Desktop which includes rviz.

After ROS has installed, creat your ros catkin workspace:

  • $ mkdir -p ~/catkin_ws/src
  • $ cd ~/catkin_ws
  • $ catkin_make

More to come

Regards,
Tom C

1 Like

Be interested to see the:

load report (1, 5, 15 min load):
uptime

memory and swap usage:
free -m

when running either the turtlesim or the GoPiGo3 node with rviz.

@cyclicalobsessive,

Since I will not be running ROS on the GoPiGo3, I have a heat sink and a cooling fan on the my Rpi 3B+.

I feel that attempting to run ROS on the GoPiGo3 chassis is not as efficient as running Python robot control programs such as you have done.

I am following the linorobot hardware and software link that you provided in your “Pi3B Video Surveillance Performance On GoPiGo3” thread.

Eventually there will be Ubuntu and ROS software versions that will run on the Rpi 4B+ which is available with 1GB, 2GB, or 4GB of RAM and on a bigger robot chassis power consumption becomes a moot point as the chassis can carry bigger batteries like Li Ion.

In the meantime I intend to fully explore the GoPiGo3 software environment in parallel with my Ubuntu/ROS adventures.

Regards,
Tom C

Wow, there’s a posit asking for a ROS-Troll debate!

I am not a ROS fan-boy, but do spend a lot of time thinking about single platform vs. distributed platform limitations and advantages.

In its simplest form, running ROS on a mobile sensor platform adds only a message layer, and eliminates all analysis and decision code, so it could be considered “more efficient” by some measures.

Getting philosophical, running a non-real-time OS (Raspbian Linux) is not the “most efficient” either, but I love the extensive feature set offered by Dexter Industries packaging of Raspbian For Robots. (I would have liked stronger attention to the audio channel though - it is a minefield.)

1 Like

@cyclicalobsessive,

Some good observations well taken!

As I have mentioned before, I am a System Engineer and hate reinventing the wheel if I can leverage off of and improve on what others have done to meet my robotic needs.

I only plan to take this thread to point of getting a successful Ubuntu Mate/ROS Melodic combination up and running on a Rpi 3B+ as Ubuntu Mate/ROS Melodic are really not germane to the GoPiGo2/R4R operating environment at the moment.

Regards,
Tom C

I’m rooting for you!

@cyclicalobsessive,

The only problem I have encountered with this Ubuntu Mate 18.04/ROS Melodic combination is that I cannot copy and paste into any of VNC desktop windows include Mate Terminal. I have tried two different VNC Viewers (RealVNC and TigerVNC) and they both exhibit the same issue. I have also tried a number of different VNC servers (tightvnc, x11vnc, tigervnc, etc) on the Ubuntu Mate and either they allowed copy and past on the VNC Viewer desktop windows, but did not support the ROS Visualizer (rviz) and vice versa.

Right now I am using either RealVNC or TigerVNC as Viewer Clients and Tigervnc server as the server on the Ubuntu Mate OS. This combination has allowed me to run the RPLidar on the Rpi 3B+ (as setup in this DI Project link) and actually launch rviz to view a 2D real time display of the RPLidar scanning my dinning room.

As for the linorobot project, you linked to above, the main issue is that some of the present linorobot ROS packages are not supported by ROS Melodic and only by ROS Kinetic and there still are some minor issues. However the linorobot project does not require the ROS Kinetic desktop as it does not use the ROS Visualizer (rviz).

The fallback is to run Ubuntu Mate 16.0.4 and ROS Kinetic-Base (ROS Kinetic will not install on Ubuntu Mate 18.0.4) which to me is retrogressing, but that is the only way to get my larger than GoPiGo3 chassis running. ROS Kinetic-Base is readily available, but Ubuntu Mate 16.0.4 is tough to come by and I had to really search around on the IoT to locate an image copy.

Update: Turns out that the Ubuntu Mate 16.0.4 I downloaded will not boot on my Rpi 3B+. But not to worry as linorobot has created a modified linorobot installer app that ignores the two missing packages in ROS Melodic, which can be built from the source and installed later, after the linorobot installation has completed.

Regards,
Tom C

Screen shots please! This sounds very cool.

@cyclicalobsessive,

The ROS Visularizer display looked just like the one in the DI RPLidar Project, mentioned above, except that the scanner outline was that of my dinning room. While it was scanning, if someone walked by the scanner, you could see the dot outline ripple along as the person walked by.

I will get an actual screen shot the next time that I setup the RPLidar.

Regards,
Tom C

Looks like I am on the same path as you… Ubuntu MATE/ROS Melodic on GoPiGo3 with a RPLidar. Plan on a couple motion sensors, a short range TOF. I have two camera choices… I have a NoIR pi cam on now… Have a pixy2 waiting its turn. So far melodic has been a pain… as well as my lack of ROS knowledge in general. but that is why I got the kit in the first place. Going to be following your progress, Do you have your project documented elsewhere?

1 Like

@smashukikz,

Until DI steps up with more “how to articles” like this one, I doubt that I will move this thread forward until then.

Presently I am working with the Lino Robot Project here.

I feel that the GoPiGo3 chassis is physically too small to build a robot that can accomplish meaningful tasks. Don’t get me wrong, the GoPiGo3 chassis is great for creating and debugging programs, but they will need to be exported to a more robust chassis for real world activities.

Comments?

Regards,
TCIII