Notes on installing Ubuntu 18.04.2 with ROS melodic and robotcontrol pre-installed for Beaglebone Blue

432 views
Skip to first unread message

Louis L. Whitcomb

unread,
Apr 19, 2019, 10:21:30 AM4/19/19
to beagl...@googlegroups.com
Colleagues,

In case it is useful to anyone, below are my notes on installing
Robert Nelson's Ubuntu 18.04.2 image with ROS melodic and the robot
control library (aka librobotcontrol) pre-installed on the Beaglebone
Blue (BBBL). This is full binary installation of Ubuntu, ROS melodic,
and the Beaglebone robotcontrol library; you do not need to do source
installs.

Best Regards,

-LLW

========

2019-04-16 LLW Notes

1. Download the 793Mb compressed image entitled
"bone-ubuntu-18.04.2-ros-iot-armhf-2019-03-03-6gb.img.xz" from Robert's
site here:

https://rcn-ee.net/rootfs/bb.org/testing/2019-03-03/bionic-ros-iot/bone-ubuntu-18.04.2-ros-iot-armhf-2019-03-03-6gb.img.xz


2. Burn and verify the image onto a micro-SD card with Etcher, which you
can download here: https://www.balena.io/etcher
You do not need to decompress
ubuntu-18.04.2-ros-iot-armhf-2019-03-03-6gb.img.xz, Etcher will
decompress it on-the-fly.

3. Install the micro-sd card in the Beaglebone Blue and power it up,
with its micro-USB connected to your Linux PC's USB. After a few
minutes your PC should establish itself as a DHCP client to the
Beaglebone with these addresses:

Your PC: 192.168.6.1 and 192.168.7.1
BBBL: 192.168.6.2 and 192.168.7.2

4. Log into your BBBL with the command

ssh bea...@192.168.6.2

say "yes" to add the BBBL to the list of known hosts, and when
prompted enter the password "temppwd".

5. Check that you can run roscore.

6. Check rc_test_drivers. If you see the folowing errors on the
pru-rproc and the ADC...

beagle@beaglebone:~$ rc_test_drivers

Kernel: 4.19.25-ti-rt-r12
BeagleBoard.org ROS Image 2019-03-03
Debian: buster/sid

PASSED: gpio 0
PASSED: gpio 1
PASSED: gpio 2
PASSED: gpio 3
PASSED: pwm0
PASSED: pwm1
PASSED: pwm2
PASSED: eqep0
PASSED: eqep1
PASSED: eqep2
ERROR: pru-rproc driver not loaded
PASSED: uart1
PASSED: uart2
PASSED: uart4
PASSED: uart5
PASSED: i2c1
PASSED: i2c2
PASSED: spi
PASSED: LED
ERROR: ADC iio driver not loaded

Currently running on a:
MODEL_BB_BLUE
Robot Control library Version:
1.0.4

....which Robert kindly identified, at least in my case, as being due an
obsolete version of a boot loader on the eMMC flash on-board the BBBL
(see https://groups.google.com/forum/#!topic/beagleboard/hFPwF6FB-6c for
details), and he provided the solution:

-------- Forwarded Message --------
Subject: Re: [beagleboard] Beaglebone Blue Ubuntu 18.04.2 problem with
robotcontrol
Date: Sun, 14 Apr 2019 19:38:53 -0500
From: Robert Nelson <robert...@gmail.com>
To: Beagle Board <beagl...@googlegroups.com>
CC: Louis Whitcomb <l...@jhu.edu>


> eeprom:[A335BNLTBLA21717EL003552]
> model:[TI_AM335x_BeagleBone_Blue]
> dogtag:[BeagleBoard.org ROS Image 2019-03-03]
> bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot
> 2018.09-00002-g08ae12f051]:[location: dd MBR]
> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot
> 2017.05-rc1-00002-g35aecb]:[location: dd MBR]
Bootloader installed on the eMMC is too old and breaking things..

Just run:

sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=10

and reboot.

Regards,
--
Robert Nelson
https://rcn-ee.com/

-----------------------

7. Zero out the eMMC if needed and reboot as instructed, and run
rc_test_drivers again, you should see the ADC now passes but the PRU
still fails

beagle@beaglebone:~$ rc_test_drivers

Kernel: 4.19.25-ti-rt-r12
BeagleBoard.org ROS Image 2019-03-03
Debian: buster/sid

PASSED: gpio 0
PASSED: gpio 1
PASSED: gpio 2
PASSED: gpio 3
PASSED: pwm0
PASSED: pwm1
PASSED: pwm2
PASSED: eqep0
PASSED: eqep1
PASSED: eqep2
ERROR: pru-rproc driver not loaded
PASSED: uart1
PASSED: uart2
PASSED: uart4
PASSED: uart5
PASSED: i2c1
PASSED: i2c2
PASSED: spi
PASSED: LED
PASSED: ADC iio

Currently running on a:
MODEL_BB_BLUE
Robot Control library Version:
1.0.4


8. To get the PRU online you need to enable the uboot overlay for the
4.19 version of the linux kernel that we are using with this image of
Ubuntu 18.04.2, uncomment (remove the leading "#") line 41 of
/boot/uEnv.txt, i.e. change this

#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo

to this:

uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo

this file is a protected OS file, so you will need to prefix your usual
command-line text editor command with "sudo "
REBOOT, and the PRU should pass checks:

beagle@beaglebone:~$ rc_test_drivers

Kernel: 4.19.25-ti-rt-r12
BeagleBoard.org ROS Image 2019-03-03
Debian: buster/sid

PASSED: gpio 0
PASSED: gpio 1
PASSED: gpio 2
PASSED: gpio 3
PASSED: pwm0
PASSED: pwm1
PASSED: pwm2
PASSED: eqep0
PASSED: eqep1
PASSED: eqep2
PASSED: pru-rproc
PASSED: uart1
PASSED: uart2
PASSED: uart4
PASSED: uart5
PASSED: i2c1
PASSED: i2c2
PASSED: spi
PASSED: LED
PASSED: ADC iio

Currently running on a:
MODEL_BB_BLUE
Robot Control library Version:
1.0.4

8. Check the status of robotcontrol service with "systemctl status
robotcontrol" - this example shows no startup program is linked:

systemctl status robotcontrol
● robotcontrol.service - robotcontrol
Loaded: loaded (/lib/systemd/system/robotcontrol.service; enabled;
vendor preset: enabled)
Active: inactive (dead) since Tue 2019-04-16 22:42:46 UTC; 1min 55s ago
Process: 676 ExecStop=/usr/bin/rc_kill (code=exited, status=0/SUCCESS)
Process: 672 ExecStart=/etc/robotcontrol/link_to_startup_program
(code=exited, status=0/SUCCESS)
Process: 532 ExecStartPre=/usr/bin/rc_startup_routine (code=exited,
status=0/SUCCESS)
Main PID: 672 (code=exited, status=0/SUCCESS)

Apr 16 22:42:39 beaglebone systemd[1]: Starting robotcontrol...
Apr 16 22:42:42 beaglebone rc_startup_routine[532]: robotcontrol startup
routine complete
Apr 16 22:42:46 beaglebone systemd[1]: Started robotcontrol.
Apr 16 22:42:46 beaglebone systemd[672]: robotcontrol.service:
Executable /etc/robotcontrol/link_to_startup_program missing, skipping: No
Apr 16 22:42:46 beaglebone rc_kill[676]: No existing robot control
program is running.

9. You can change which program robotcontrol runs on boot with the
command "sudo dpkg-reconfigure librobotcontrol", and read the put put
and prompts.

10. Here is output of "systemctl status robotcontrol" when rc_blink is
set to automatically load upon boot:

beagle@beaglebone:~$ systemctl status robotcontrol
● robotcontrol.service - robotcontrol
Loaded: loaded (/lib/systemd/system/robotcontrol.service; enabled;
vendor preset: enabled)
Active: active (running) since Tue 2019-04-16 22:49:36 UTC; 57s ago
Process: 499 ExecStartPre=/usr/bin/rc_startup_routine (code=exited,
status=0/SUCCESS)
Main PID: 574 (link_to_startup)
Tasks: 3 (limit: 1024)
CGroup: /system.slice/robotcontrol.service
└─574 /etc/robotcontrol/link_to_startup_program

Apr 16 22:49:31 beaglebone systemd[1]: Starting robotcontrol...
Apr 16 22:49:32 beaglebone rc_startup_routine[499]: robotcontrol startup
routine complete
Apr 16 22:49:36 beaglebone systemd[1]: Started robotcontrol.


11. That is it. Read the manual here:
http://strawsondesign.com/docs/librobotcontrol/index.html

Note that the manual includes a nice project template for robot

12. To update or install additional ubuntu binary packages, including
additional ROS melodic packages, you will need to connect your BBBL to
the internet. The easiest way to do this is to connect via WiFi (read
the manual, #11 above), or connect a USB-Ethernet adapter to the BBBL's
USB host connection, and connect to a DHCP Ethernet router.


--
-------------------------------------------------------------
Louis L. Whitcomb, Ph.D.
Professor, Department of Mechanical Engineering
115 Hackerman Hall, 3400 N. Charles Street
Johns Hopkins University, Baltimore, MD, 21218-2681
l...@jhu.edu, 410-516-6724, https://dscl.lcsr.jhu.edu
-------------------------------------------------------------<




Reply all
Reply to author
Forward
0 new messages