Robobot on Raspberry PI

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Start robobot_bridge)
 
(28 intermediate revisions by one user not shown)
Line 2: Line 2:
  
  
== Clean Raspberry Pi ==
+
== Get ROBOBOT and REGBOT source ==
  
This section contains the complete instructions for setting up a clean Raspberry Pi.
+
This is probably installed already, otherwise use
  
Click on the link below to go the instructions.
+
cd
 +
svn co svn://repos.gbar.dtu.dk/jcan/regbot
 +
ln -s regbot/mission
 +
ln -s regbot/robobot_bridge
 +
ln -s regbot/regbotgui
 +
svn co svn://repos.gbar.dtu.dk/jcan/regbot && ln -s regbot/mission && ln -s regbot/robobot_bridge && ln -s regbot/regbotgui
  
Raspberry [[Full installation instructions]] including opencv-3, but stop before "Mobotware".
+
==Update and compile==
 
+
== Windows tools ==
+
 
+
Use '''winscp''' (from https://winscp.net/eng/download.php?TB_iframe) to move files to and from the raspberry pi.
+
 
+
Use '''putty''' (from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) to get terminal access to the raspberry.
+
 
+
To connect to raspberry using a cable (from raspberry direct to a PC) requires that both has a manually set IP adress.
+
The Raspberry side is 192.168.0.2, and you should probably manually set the IP of your PC to the same local net, e.g. 192.168.0.100.
+
 
+
There is a windows executable client for configuration and setting up the REGBOT part of the ROBOBOT. This is found in 'regbot/qtgui/dist/regbot.exe' in the raspberry, and can be fetched using winscp.
+
 
+
==Update ROBOBOT source==
+
  
 
On the raspberry there is the following directories:
 
On the raspberry there is the following directories:
  
  $ cd ~/regbot
+
  $ cd
  ls
+
$ ls
 
   mission          Mission software skeleton that can also access the raspberry camera
 
   mission          Mission software skeleton that can also access the raspberry camera
   qtgui            Copy of the configuration gui (python files), and a windows executable in the 'dist' subdirectory
+
   regbotgui        Configuration GUI for REGBOT (python), a Windows executable can be found in course material.
   regbot           Firmware for the REGBOT part
+
   regbot/regbot    Firmware for the REGBOT part
 
   robobot_bridge  The connection software between the REGBOT, the small display, the remote control and the mission software
 
   robobot_bridge  The connection software between the REGBOT, the small display, the remote control and the mission software
  
Line 39: Line 31:
 
  cd mission
 
  cd mission
 
  svn up
 
  svn up
  cd ../qtgui
+
  cd ../regbotgui
 
  svn up
 
  svn up
 
  cd ../regbot
 
  cd ../regbot
Line 50: Line 42:
 
If there are updates, then they need a recompile (except qtgui).
 
If there are updates, then they need a recompile (except qtgui).
  
Mission and Robobot_bridge has a 'build' subdirectory with a Makefile, REGBOT has the Makefile in the base directort.
+
Mission and Robobot_bridge has a 'build' subdirectory with a Makefile, REGBOT has the Makefile in the base directory.
  
 
Type
 
Type
  cd ~/robobot_bridge/build
+
  cd ~/robobot_bridge
  make -j4
+
mkdir -p build         # make a build directory; -p accepts it may be there already
  cd ~/mission/build
+
cd build
  make -j4
+
cmake ..              # builds Makefile from CMakeLists.txt in parent directory ".."
to compile
+
  make -j3              # compile - using 3 CPU cores (not to overheat)
 +
  cd ~/mission           # to C++ version of mission control
 +
  mkdir -p build        # make a build directory; -p accepts it may be there already
 +
cd build
 +
cmake ..              # builds Makefile from CMakeLists.txt in parent directory ".."
 +
make -j3              # compile - using 3 CPU cores
  
If there is no makefile in the build directory, then make one first by
+
=== Start robobot_bridge ===
  
  cd build
+
The ROBOBOT bridge should start automatically to open the display (showing IP and battery voltage)
  cmake ..
+
and optionally also camera streaming (must be installed first)
 +
 
 +
  nano /etc/rc.local
 +
 
 +
add the following lines before 'exit 0' (close to the end)
 +
 
 +
  # DTU fix for time over blocked network
 +
htpdate -q www.linux.org www.freebsd.org
 +
# start ROBOBOT bridge
 +
cd /home/local/robobot_bridge/build && ./robobot_bridge -a &
 +
 
 +
Copy and 'shift-ctrl-v' will do
  
 
==REGBOT software==
 
==REGBOT software==
 +
 +
The REGBOT is programmed with Arduino (and Teensyduino) and require these tools to be installed to compile and install the firmware
 +
See the installation procedure description in [[Software_installation]].
  
 
The REGBOT software is in the ~/regbot/regbot directory
 
The REGBOT software is in the ~/regbot/regbot directory
  
To compile it for the REGBOT version 4 hardware with a Teensy 3.5 processor board, go to the '3.5' subdirectory
+
To compile it for the REGBOT version 4 hardware (red board) with a Teensy 3.5 processor board, go to the '3.5' subdirectory
  
 
  cd ~/regbot/regbot/3.5
 
  cd ~/regbot/regbot/3.5
 
  make -j4
 
  make -j4
  
If successfull a regbot.hex file is generated and should be uploaded to the REGBOT Teensy 3.5 processor.
+
If successful a regbot.hex file is generated and should be uploaded to the REGBOT Teensy 3.5 processor.
  
 
This can be done from a console with X-messages enabled.
 
This can be done from a console with X-messages enabled.
Line 81: Line 92:
 
if the robot is 'solvej'.
 
if the robot is 'solvej'.
  
NB! While programming all the pins on the processor is released, including the one maintaining power to the robot.
+
NB! While programming all the pins on the processor are released, including the one maintaining power to the robot.
 
This means that the '''red button on the board MUST be pressed''' during the MAKE UPLOAD command
 
This means that the '''red button on the board MUST be pressed''' during the MAKE UPLOAD command
  

Latest revision as of 13:57, 25 December 2021

Back to Robobot


Contents

[edit] Get ROBOBOT and REGBOT source

This is probably installed already, otherwise use

cd
svn co svn://repos.gbar.dtu.dk/jcan/regbot
ln -s regbot/mission
ln -s regbot/robobot_bridge
ln -s regbot/regbotgui
svn co svn://repos.gbar.dtu.dk/jcan/regbot && ln -s regbot/mission && ln -s regbot/robobot_bridge && ln -s regbot/regbotgui

[edit] Update and compile

On the raspberry there is the following directories:

$ cd
$ ls
  mission          Mission software skeleton that can also access the raspberry camera
  regbotgui        Configuration GUI for REGBOT (python), a Windows executable can be found in course material.
  regbot/regbot    Firmware for the REGBOT part
  robobot_bridge   The connection software between the REGBOT, the small display, the remote control and the mission software

[edit] Update

All these source directories are already connected to a SVN repository, but probably need update, by

cd 
cd mission
svn up
cd ../regbotgui
svn up
cd ../regbot
svn up
cd ../robobot_bridge
svn up

[edit] Compile

If there are updates, then they need a recompile (except qtgui).

Mission and Robobot_bridge has a 'build' subdirectory with a Makefile, REGBOT has the Makefile in the base directory.

Type

cd ~/robobot_bridge
mkdir -p build         # make a build directory; -p accepts it may be there already
cd build
cmake ..               # builds Makefile from CMakeLists.txt in parent directory ".."
make -j3               # compile - using 3 CPU cores (not to overheat)
cd ~/mission           # to C++ version of mission control
mkdir -p build         # make a build directory; -p accepts it may be there already
cd build
cmake ..               # builds Makefile from CMakeLists.txt in parent directory ".."
make -j3               # compile - using 3 CPU cores

[edit] Start robobot_bridge

The ROBOBOT bridge should start automatically to open the display (showing IP and battery voltage) and optionally also camera streaming (must be installed first)

nano /etc/rc.local

add the following lines before 'exit 0' (close to the end)

# DTU fix for time over blocked network
htpdate -q www.linux.org www.freebsd.org
# start ROBOBOT bridge
cd /home/local/robobot_bridge/build && ./robobot_bridge -a &

Copy and 'shift-ctrl-v' will do

[edit] REGBOT software

The REGBOT is programmed with Arduino (and Teensyduino) and require these tools to be installed to compile and install the firmware See the installation procedure description in Software_installation.

The REGBOT software is in the ~/regbot/regbot directory

To compile it for the REGBOT version 4 hardware (red board) with a Teensy 3.5 processor board, go to the '3.5' subdirectory

cd ~/regbot/regbot/3.5
make -j4

If successful a regbot.hex file is generated and should be uploaded to the REGBOT Teensy 3.5 processor.

This can be done from a console with X-messages enabled.

ssh -X local@solvej.local

if the robot is 'solvej'.

NB! While programming all the pins on the processor are released, including the one maintaining power to the robot. This means that the red button on the board MUST be pressed during the MAKE UPLOAD command

cd ~/regbot/regbot/3.5
make upload

See the regbot directory for more details.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox