Fejemis repository

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Teensy firmware)
(The GUI)
 
(11 intermediate revisions by one user not shown)
Line 2: Line 2:
  
 
== Software ==
 
== Software ==
 
NB! at this point in time, the software is under development, so don't expect too much.
 
  
 
The software is in an SVN (subversion) repository, SVN is maintained by Adobe.
 
The software is in an SVN (subversion) repository, SVN is maintained by Adobe.
 +
 +
=== ROS bridge ===
 +
 +
The ROS bridge is in a separate SVN repository
 +
 +
Make a checkout (open access) in the ROS2 workspace, i.e.
 +
 +
cd ~/fejemis_ws/src
 +
svn co svn://repos.gbar.dtu.dk/jcan/fejemis_bridge bridge
 +
 +
After this, the bridge could be built and run by:
 +
 +
cd ~/fejemis_ws/
 +
colcon build
 +
source install/setup.bash
 +
ros2 run bridge hw_bridge
 +
 +
=== Teensy firmware and support stuff ===
  
 
Make a checkout (open access)
 
Make a checkout (open access)
Line 15: Line 31:
 
  fejemis/
 
  fejemis/
 
     doc              # documents related to project
 
     doc              # documents related to project
    fejemis_bridge    # hardware abstraction node in PC to access settings and translate to ROS
 
 
     fejemis-brush    # EAGLE project with schematic for brush and front-wheel control
 
     fejemis-brush    # EAGLE project with schematic for brush and front-wheel control
 
     fejemis_drive    # Main firmware (Teensy 3.5 based) for wheel and power control
 
     fejemis_drive    # Main firmware (Teensy 3.5 based) for wheel and power control
 
     fejemis_front    # Firmware for brush and front wheel control (Teensy 3.2 based)
 
     fejemis_front    # Firmware for brush and front wheel control (Teensy 3.2 based)
 
     fejemis_gui      # QT-based graphical user interface for configuration and calibration of the firmware.
 
     fejemis_gui      # QT-based graphical user interface for configuration and calibration of the firmware.
 +
    3D-print
  
 
== Tool chain ==
 
== Tool chain ==
Line 33: Line 49:
 
  fejemis/fejemis_front/main.cpp
 
  fejemis/fejemis_front/main.cpp
  
The Makefile assumes that libraries are linked to the Makefile directory, e.g. from my arduino-1.8.15 installation:
+
The Makefile assumes that arduino and teensyduino are installed - see Makefile for base directory.
  
 
  fejemis
 
  fejemis
 
   fejemis_drive
 
   fejemis_drive
     build
+
     Makefile (compiled with 'make', not Arduino GUI.)
     libraries -> /home/jca/Downloads/arduino-1.8.15/hardware/teensy/avr/libraries/
+
     src (source files *.cpp and *.h)
     teensy3 -> /home/jca/Downloads/arduino-1.8.15/hardware/teensy/avr/cores/teensy3
+
  fejemis_front
     tools -> /home/jca/Downloads/arduino-1.8.15/hardware/tools/
+
     Makefile
     teensy -> tools/teensy  # firmware loader
+
     src (source files *cpp and *.h)
 
+
      
Using symbolic link commands like:
+
+
cd fejemis/fejemis_drive
+
ln -s /home/jca/Downloads/arduino-1.8.15/hardware/teensy/avr/libraries
+
ln -s /home/jca/Downloads/arduino-1.8.15/hardware/teensy/avr/cores/teensy3
+
ln -s /home/jca/Downloads/arduino-1.8.15/hardware/tools/
+
ln -s tools/teensy
+
 
+
after these links are in place, just run make
+
  
 +
cd ~/fejemis/fejemis_drive
 
  make -j6      (should make a fejemis_drive.hex file)
 
  make -j6      (should make a fejemis_drive.hex file)
  make upload    (with the drive Teensy available on USB as the only Teensy device)
+
  make upload    (with the Teensy available on USB as the only Teensy device)
  
=== The bridge ===
+
Same method for fejemis_front.
  
The bridge is a normal C++ application.
+
==== TY commander ====
  
cd fejemis/fejemis_bridge
+
An alternative to the teensy firmware loader, the TY commander is fine and can handle more than one Teensy, and includes a serial console (eliminating the need for Putty)
mkdir build
+
 
cd build
+
See https://github.com/Koromix/tytools
cmake ..
+
make
+
  
 
=== The GUI ===
 
=== The GUI ===
  
 
The graphical user interface is QT and Python-based and requires the QT tool-chain and Python3 to be installed.
 
The graphical user interface is QT and Python-based and requires the QT tool-chain and Python3 to be installed.
A small number of Python packedes are needed too:
+
 
 +
The interface is best with a direct connection to one of the Teensy processors directly using USB.
 +
 
 +
A small number of Python packages are needed too:
  
 
  > pip install pyqt5
 
  > pip install pyqt5
 
  > pip install pyqtgraph
 
  > pip install pyqtgraph
 
  > pip install pyserial
 
  > pip install pyserial
 +
 +
Run with
 +
 +
cd fejemis/fejemis_gui
 +
python3 fejemis_gui.py

Latest revision as of 15:01, 13 November 2023

Back to fejemis

Contents

[edit] Software

The software is in an SVN (subversion) repository, SVN is maintained by Adobe.

[edit] ROS bridge

The ROS bridge is in a separate SVN repository

Make a checkout (open access) in the ROS2 workspace, i.e.

cd ~/fejemis_ws/src
svn co svn://repos.gbar.dtu.dk/jcan/fejemis_bridge bridge

After this, the bridge could be built and run by:

cd ~/fejemis_ws/
colcon build
source install/setup.bash
ros2 run bridge hw_bridge

[edit] Teensy firmware and support stuff

Make a checkout (open access)

svn co svn://repos.gbar.dtu.dk/jcan/fejemis

This will extract a directory structure like this

fejemis/
   doc               # documents related to project
   fejemis-brush     # EAGLE project with schematic for brush and front-wheel control
   fejemis_drive     # Main firmware (Teensy 3.5 based) for wheel and power control
   fejemis_front     # Firmware for brush and front wheel control (Teensy 3.2 based)
   fejemis_gui       # QT-based graphical user interface for configuration and calibration of the firmware.
   3D-print

[edit] Tool chain

[edit] Teensy firmware

The teensy based firmware builds on Arduino library with the Teensyduino extension. The compilation is Makefile based (rather than using the Arduino tool). But arduino tool can be used too, if the main C++ file is renamed to .ino. The main files are:

fejemis/fejemis_drive/udrive.cpp
fejemis/fejemis_front/main.cpp

The Makefile assumes that arduino and teensyduino are installed - see Makefile for base directory.

fejemis
  fejemis_drive
    Makefile (compiled with 'make', not Arduino GUI.)
    src (source files *.cpp and *.h)
  fejemis_front
    Makefile
    src (source files *cpp and *.h)
    
cd ~/fejemis/fejemis_drive
make -j6       (should make a fejemis_drive.hex file)
make upload    (with the Teensy available on USB as the only Teensy device)

Same method for fejemis_front.

[edit] TY commander

An alternative to the teensy firmware loader, the TY commander is fine and can handle more than one Teensy, and includes a serial console (eliminating the need for Putty)

See https://github.com/Koromix/tytools

[edit] The GUI

The graphical user interface is QT and Python-based and requires the QT tool-chain and Python3 to be installed.

The interface is best with a direct connection to one of the Teensy processors directly using USB.

A small number of Python packages are needed too:

> pip install pyqt5
> pip install pyqtgraph
> pip install pyserial

Run with

cd fejemis/fejemis_gui
python3 fejemis_gui.py
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox