Robot installation: Difference between revisions
No edit summary |
|||
Line 12: | Line 12: | ||
openssh-server | openssh-server | ||
git | git | ||
python-pip | |||
sudo apt install ntp ntpdate openssh-server git | sudo apt install ntp ntpdate openssh-server git python-pip | ||
Install ros-melodic-desktop-full, follow instructions in: http://wiki.ros.org/melodic/Installation/Ubuntu | |||
up to section 2. Tutorials. | |||
=== NTP === | === NTP === | ||
Line 49: | Line 54: | ||
=== flexbot code === | === flexbot code === | ||
Git repository | Git repository is installed by | ||
cd | |||
git clone https://repos.gbar.dtu.dk/git/jcan/flexbot.git flexbot | |||
=== MAV link === | |||
Generate MAV link code (between ROS and Teensy controllers) | |||
Install tk dialogs and controls and start generator | |||
pip install future | |||
cd ~/flexbot/code/MAVLink/Generator | |||
python mavgenerate.py | |||
And follow the instructions here http://rsewiki.elektro.dtu.dk/index.php/Mavlink#Generating_C-headers_.26_Python_file | |||
=== Teensy code compile === | |||
Install Arduino and Teensyduino as described in [[Software installation]] section "Toolchain installation" and "Teensy loader and udev rules" | |||
and make tool links in teensy code directory (arduino version numbers and directory could be different): | |||
cd ~/flexbot/code/teensy_v2/ | |||
ln -s ~/arduino-1.8.7/hardware/tools . | |||
ln -s ~/arduino-1.8.7/hardware/teensy/avr/cores/teensy3 . | |||
ln -s ~/arduino-1.8.7/hardware/teensy/avr/libraries libteensy | |||
ln -s tools/teensy . | |||
The teensy code is compiled using a Makefile and not the arduino IDE, so: | |||
cd ~/flexbot/code/teensy_v2/ | |||
mv teensy3/main.cpp teensy3/main.cpp.not | |||
make | |||
And to upload to teensy processor connected to this robot | |||
make upload (NB! only works if there is one Teensy connected) | |||
=== ROS for flexbot === | |||
Make a ROS workspace for flexbot (from http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment) | |||
cd | |||
mkdir -p flexbot_ws/src | |||
cd flexbot_sw | |||
catkin_make | |||
Link the flexbot code into the src directory | |||
cd src | |||
ln -s ~/flexbot/code/base_node_ros | |||
cd .. | |||
catkin_make |
Revision as of 17:39, 9 November 2018
Installation of software on the robot
Linux
Start with a freash ubuntu 18.04 desktop full.
Packages to install
Install:
ntp ntpdate openssh-server git python-pip sudo apt install ntp ntpdate openssh-server git python-pip
Install ros-melodic-desktop-full, follow instructions in: http://wiki.ros.org/melodic/Installation/Ubuntu up to section 2. Tutorials.
NTP
Network time protocold, to keep clock in sync. At DTU most clock sources are blocked, the clock source need to be configured.
At DTU, edit /etc/ntp.conf, add ntp.ait.du.dk to server pool
... # Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board # on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for # more information. pool ntp.ait.dtu.dk ...
Sync time
ntpdate -u ntp.ait.dtu.dk
Should work in and around DTU - see also NTP howto for more details.
Boot in terminal mode
To boot in terminal mode. uncomment this line in /etc/default/grub
... # Uncomment to disable graphical terminal (grub-pc only) GRUB_TERMINAL=console ...
Start graphics using "startx" after this change, if you need.
flexbot code
Git repository is installed by
cd git clone https://repos.gbar.dtu.dk/git/jcan/flexbot.git flexbot
MAV link
Generate MAV link code (between ROS and Teensy controllers)
Install tk dialogs and controls and start generator
pip install future cd ~/flexbot/code/MAVLink/Generator python mavgenerate.py
And follow the instructions here http://rsewiki.elektro.dtu.dk/index.php/Mavlink#Generating_C-headers_.26_Python_file
Teensy code compile
Install Arduino and Teensyduino as described in Software installation section "Toolchain installation" and "Teensy loader and udev rules"
and make tool links in teensy code directory (arduino version numbers and directory could be different):
cd ~/flexbot/code/teensy_v2/ ln -s ~/arduino-1.8.7/hardware/tools . ln -s ~/arduino-1.8.7/hardware/teensy/avr/cores/teensy3 . ln -s ~/arduino-1.8.7/hardware/teensy/avr/libraries libteensy ln -s tools/teensy .
The teensy code is compiled using a Makefile and not the arduino IDE, so:
cd ~/flexbot/code/teensy_v2/ mv teensy3/main.cpp teensy3/main.cpp.not make
And to upload to teensy processor connected to this robot
make upload (NB! only works if there is one Teensy connected)
ROS for flexbot
Make a ROS workspace for flexbot (from http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment)
cd mkdir -p flexbot_ws/src cd flexbot_sw catkin_make
Link the flexbot code into the src directory
cd src ln -s ~/flexbot/code/base_node_ros cd .. catkin_make