User Tools

Site Tools


build_your_own

This is an old revision of the document!


Build the Software

Preparations

Linux

You need any 64-Bit Linux Version (VM or standalone).

Credentials of the Beagle Bone Blue

  • You can login as “root:toor” or as “debian:temppwd”.

Start your Beagle Bone Blue

  • Connect the micro USB with the PC.
  • It takes about 15 seconds until the Beagle Bone Blue is powered up and another 15 seconds until a network adapter is shown on your host pc. Open a Terminal and check if this network is already available.
$ ifconfig 
  • Connect via ssh to your Beagle Bone Blue
$ ssh debian@192.168.7.2
  • Defaultpassword is “temppwd”

Login

The first time you do this you will get a security alert in the console - type “yes” and hit enter. Then enter the password “temppwd” and confirm with enter. Don't be alarmed if the console does not response while you type your password.

Build the EEDURO software

Clone the git repository from EEDURO. Go into the delta folder and run the clone.sh script. This will clone all the necessary repositories to build and run the delta application. The library for the roboticscape must be compiled manually. Though the library is already on the target, we must also have it on the host, in order to be able to link an application. At the time of writing, the BeagleBone Blue Boards are shipped with an image that has the robotics cape library version 0.3.4 installed. Therefore, it is highly recommended to use this version. The bbblue-eeros wrapper library was implemented to work with the robotics cape library v0.3.4. Newer version were not tested yet. When using the clone.sh script, the right version is checked out per default and no additional step is needed.

To compile the library, change into:

$ cd robotics_cape_installer/libraries

and edit the Makefile therein. Change the following to lines from

CC		:= gcc
LINKER		:= gcc

to

CC		:= arm-linux-gnueabihf-gcc-4.9
LINKER		:= arm-linux-gnueabihf-gcc-4.9

This change is necessary because the library must be compiled with the cross compiler.

Now, the cross tool chain is installed on the host machine with the following command.

$ sudo apt-get install g++-4.9-arm-linux-gnueabihf

Then, the roboticscape library is compiled using make.

$ make

Change back into your project directory and start the compilation of EEROS, the hardware wrapper library, and the delta application with

$ ./make.sh

Finally, load the executable onto the target (see notes below if you are doing this on a brand new board) with

$ ./deploy.sh

The default password on the BeagleBone Blue Board is “temppwd”. Edit the deploy.txt file to define which files are downloaded.

Notes

When the BeagleBone Blue Board is used the first time (never used with EEROS before or a brand new BeagleBone Blue / Image), some initial setup steps are needed. The script deploy.sh will copy the executable and libraries to /opt/eeros. Therefore, this folder must be present on the target or the copy fails. To create the folder, execute the following on the BeagleBone:

debian@beaglebone:$ sudo mkdir /opt/eeros
debian@beaglebone:$ sudo chown debian:debian /opt/eeros/

Also, some links must be created. The system must find the eeros libraries to load them. The following symbolic links are needed:

debian@beaglebone:$ cd /usr/lib/
debian@beaglebone:$ sudo ln -s /opt/eeros/lib/libbbblueeeros.so.1.0.0.0 libbbblueeeros.so.1.0.0.0
debian@beaglebone:$ sudo ln -s libbbblueeeros.so.1.0.0.0 libbbblueeeros.so
debian@beaglebone:$ sudo ln -s /opt/eeros/lib/libeeros.so.1.0.0.30 libeeros.so.1.0.0.30
debian@beaglebone:$ sudo ln -s libeeros.so.1.0.0.30 libeeros.so

Make sure the version information (….so.1.0.0.0) is not outdated! This can be checked by browsing the BeagleBoneBlue/install-armhf/lib/ folder.

Start the EEDURO application

Before starting the EEDURO application plug in the 12V DC power supply or the Li-Po battery, otherwise the motors won't run.
First put the TCP in the lower position. SSH onto the BealgeBone and run

debian@beaglebone:$ rc_test_motors -m 1 -d 1

This should pull the TCP into the direction of the motor and raise it a little. Check this for all 3 motors.

debian@beaglebone:$ rc_test_motors -m 2 -d 1
debian@beaglebone:$ rc_test_motors -m 3 -d 1

If a motor turns in the opposite direction, change the + and - wire from the motor (there will be a solution where you can change the sign in the HwConfigBBBlue.json, but not for now).

Also you have to check the direction of the encoder. Once again, lower your TCP and run

debian@beaglebone:$ rc_test_encoders 

on your target. When raising the TCP the encoder values should be positive. Change each negative encoder from

"scale": [ { "id" : "gear",
		"minIn": 	0, "maxIn": 1,
		"minOut":	0, "maxOut": 76 },
	   { "id" : "enc",
		"minIn": 	0, "maxIn": 6.283185307179586476925286766559,
		"minOut":	0, "maxOut": 4096},
	   { "id" : "fqd",
		"minIn":	0, "maxIn": 1,
		"minOut":	0, "maxOut": 4}
	 ],

to (changed sign in id:enc)

"scale": [ { "id" : "gear",
		"minIn": 	0, "maxIn": 1,
		"minOut":	0, "maxOut": 76 },
	   { "id" : "enc",
		"minIn": 	0, "maxIn": -6.283185307179586476925286766559,
		"minOut":	0, "maxOut": 4096},
	   { "id" : "fqd",
		"minIn":	0, "maxIn": 1,
		"minOut":	0, "maxOut": 4}
	 ],

Check the encoder and gear values and adjust them if necessary. After that you can run the EEDURO application.

debian@beaglebone:$ cd /opt/eeros/bin
debian@beaglebone:$ sudo ./delta -c HwConfigBBBlue.json

You'll find the software description of the EEDURO application here.

Playing with the Delta robot

After starting the EEDURO application of the Delta robot you'll get the following procedure:

  1. all motors move to the uppermost position
  2. short delay
  3. axis motors move to the homing position
  4. motor of the electromagnet gets homed → electromagnet should be centered

The intialization process is now finished and the green and blue LED light up. If you press the green button, the Delta starts it's normal operating mode. If you press the blue button 3 times, the robot will move to it's parking position and power down. When pressing the green and blue button, the calibration mode gets started.

In normal operating mode you can get control of the Delta robot. When sorting is finished, it will move the to home position and wait for 5 seconds. In this time you can move the mouse or press any mouse button to control it. By moving the mouse left/right or for-/backward you can move the TCP to this position. You can raise and lower the TCP by scrolling. By hitting the scroll wheel to the left or the right, the electromagnet will turn in this direction. By pressing the left mouse button you enable the electromagnet. Releasing will disable it. If you do not perform any action with the mouse for 2 seconds, the robot will start it's normal operating mode again.

Press the blue button to stop the Delta robot from it's normal operating mode. This will stop the current movement, raise the TCP and put it back to it's homing position. From there you can move on with the steps described two sections above.

In case of an emergency the red LED lights up. This happens when you push the red button. In this case you have to press the green button to move on. The Delta will perform it's homing and stays in it's homing position. From there you can move on with the steps described three sections above.

Calibrate the Delta robot

If you need to calibrate the positions of the blocks for the Delta robot follow this steps:

  1. The Delta robot has to be powered up and running
  2. If the Delta is not in it's homing position:
    1. Press the blue button to stop the normal operating mode
  3. Else:
    1. Press the green and blue button
  4. Remove all plates

You have to calibrate the Delta with each plate. Start with plate 0 → that means no plate is used, and position 0.

  1. Put the actual plate to the actual position and move the TCP to the center of this position.
  2. Hit the blue button.
  3. Move the TCP inside the gap of the current block only in x and y direction.
  4. Hit the blue button again.
  5. If the actual position is number 3 go to the next step. Else increment the position number and start again with step 1.
  6. If the actual plate is number 3 you are finished. Else use the plate with the next higher number and start again with step 1.

If you have calibrated all blocks on every position, put all blocks back and press the blue button. The Delta will move to it's homing position.

Run the application on startup

To run Delta application on startup just copy the start.sh from the bbblue-scipts folder on your target:

scp ./bbblue-scripts/start.sh debian@192.168.7.2:/opt/eeros/bin

and make sure that it's executable:

debian@beaglebone:$ sudo chmod +x /opt/eeros/bin/start.sh 

In the rc.local file on your target add the following line:

sudo screen -dmS delta /opt/eeros/bin/start.sh

This script will start the Delta application in a detached screen. To see the log output from the application just reattach to this screen session.

debian@beaglebone:$ sudo screen -r delta

If the Delta application terminates the BeagleBoneBlue will shutdown.

build_your_own.1556195349.txt.gz · Last modified: 2019/04/25 14:29 by graf