Robobot B: Difference between revisions

From Rsewiki
 
(62 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page is is for development nodes and user description of the simplified version of Robobot
Robobot is a robot platform for innovative applications, especially the annual DTU Robocup competition.


=Robobot B description=
=Robobot=
 
This section is intended for users.


[[File:robobot-in-blocks-2024.png | 600px]]
[[File:robobot-in-blocks-2024.png | 600px]]
[[File:robobot-design-2024.png | 400px]]
[[File:robobot-rev_8_frog.jpg | 400px]]


==Overview==
==Overview==


* [[Robobot architecture]] module description
This section is intended for users.
* Hardware
* Electronics
* Software on Raspberry
* [[Raspberry Pi directory structure for Robobot]]
 
==Development notes==
 
This section is for development notes.
 
==Software installation Raspberry Pi==
 
 
* [[Robobot install on Raspberry]]
 
 
===User and network (WiFi)===
 
Connect to DTU Wifi
 
* use NTP (network time protocol) with DTU network (require ntp and ntpdate packages)
* connect to DTU network without showing secret password
 
Instructions here [[Network setup]]
 
===Enable autostart===
 
====Display of IP====
 
Start app to display IP on Regbot display, log CPU temperature and synchronize hostname
 
Make an on-rebbot script in the home directory
 
cp ~/svn/robobot/setup/on_reboot.bash ~/
 
This file is something like:
 
#!/bin/bash
# script to start applications after a reboot
#
# run the app to show IP of raspberry on the Teensy display.
mkdir -p /home/local/svn/log
cd /home/local/svn/log
# save the last reboot date
echo "Rebooted" >> rebootinfo.txt
date >> rebootinfo.txt
../robobot/ip_disp/build/ip_disp &
# save PID for debugging
echo "ip_disp started with PID:" >> rebootinfo.txt
pgrep -l ip_disp >> rebootinfo.txt
exit 0
 
Use crontab to run this script at reboot
 
crontab -e
 
If asked, select the preferred editor (suggesting nano).
 
Add this line at the end:
@reboot /home/local/on_reboot.bash
 
====Hostname update====
 
A script updates the Raspberry Pi hostname, with the name in ''~/svn/log/robotname''.
The script ''rename_host.bash'' is:
#!/bin/bash
hn=`hostname`
f="/home/local/svn/log/robotname"
if [ -f $f ];
then
  nn=`cat $f`
  yy= $(expr length $nn)
  if [ $yy -gt 2 ];
  then
    if [ $hn != $nn ];
    then
      hostnamectl set-hostname $nn
      # seems like /etc/hosts is not updated, but /etc/hostname is
      sed -i "s/$hn/$nn/g" /etc/hosts
    else
      echo Same hostname, all is fine.
    fi
  fi
else
  echo "File >" $f "< not found."
fi
 
The script needs to be run as root, it is therefore set to run as part of the boot process.
 
Create the script in /etc/init.d
 
sudo nano /etc/init.d/host_rename.sh
 
Enter the following lines into the new file
 
#!/bin/bash
bash /home/local/svn/robobot/setup/rename_host.bash
 
Make the file executable and add it to run-level 2 (before networking is started)
 
sudo chmod +x /etc/init.d/host_rename.sh
sudo ln -s /etc/init.d/host_rename.sh /etc/rc2.d/S99host_rename
 
The script is then executed when the Raspberry boots, and if the hostname does not match that of the Teensy, then the hostname is modified.
 


===Robobot base software===
* Getting started
** [[Robobot 1 | Power on]], start and shut down
** [[Robobot 2 | Network access]]
** [[Robobot 2b | Software update]]
** [[Robobot 3 | Camera view]]
** [[Robobot 4 | Python control]]
** [[Robobot 5 | Firmware tools]]
* System description
** [[Robobot architecture | System overview]] and top-level blocks description.
** [[Robobot MQTT-client]]
** [[Robobot webcam server]]
** [[Robobot teensy interface]]
** [[Robobot teensy firmware]]
** [[Robobot MQTT topics]]
** [[Robobot calibration]]
* Further details
** Start button to start mission, see first part of [[Enable autostart]]
** [[Robobot and MATLAB]] use of logfiles.
** [[Raspberry Pi directory structure for Robobot | Network access]], file share and directory structure.
** [[Robobot hardware]] items. Motors, sensors, plastic and screws.
** [[Robobot circuits]], PCB and circuit diagrams


To make the initial copy from the repository
==Developers notes==


cd
This section contains notes on robot installation.
cd svn
svn checkout svn://repos.gbar.dtu.dk/jcan/robobot


To update with a new version
* [[Robobot install on Raspberry]] including all needed packages.
* DTU network and time setup: [[Network setup]]
* [[Robobot base software installation]] like teensy_interface
* [[Enable autostart]] and IP display as well as on_reboot script.
* [[Servo supply issue]] Especially the small servo X9MG.


cd
Arduino firmware - one of these:
cd svn/robobot
* Installation of [[Arduino and Teensy libraries]] when using the Arduino IDE.
svn update
* Installation of [[Visual studio support | Visual Studio Code]] when working on a standard PC. There may be further help here [[Import code to Visual Studio]]
* installation of [[Arduino command line support | Command line support]] for use on the Raspberry Pi.


==Teensy==
Help and setup
* [[Help page Teensy_8]] from on-line command ''help''.
* [[Robobot processor]] initialise setup of Teensy (factory reset)
* [[Robobot Raspberry strange error]] Unexplained error (January 2026, Trixie image, not cloned).
* [[Robobot packing list]].
* [[Robobot logfile cleanup]].


Software tool chain installation
Simulator (webots)
* https://github.com/WildWillyRobots/DtuRobocupWebots.git is a simulator for the DTU Robocup track for the 2025 track. Created by Jonas Sølvhøj.


==Old Robobot pages==
Older pages


[[robobot]] an extension to Regbot with a raspberry pi for more extended missions, but uses mission code in Teensy, like Regbot.
* Old [[robobot]] instructions are mostly deprecated
* Some architecture notes [[Robobot Teensy interface]].
* [[Robobot software description | Software description]] and examples.

Latest revision as of 17:15, 1 February 2026

Robobot is a robot platform for innovative applications, especially the annual DTU Robocup competition.

Robobot

Overview

This section is intended for users.

Developers notes

This section contains notes on robot installation.

Arduino firmware - one of these:

Help and setup

Simulator (webots)

Older pages