Package Summary

Tags No category tags.
Version 0.2.0
License BSD Clause 3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/Ekumen-OS/andino.git
VCS Type git
VCS Version humble
Last Updated 2024-07-23
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The andino_firmware package

Additional Links

No additional links.

Maintainers

  • Franco Cipollone
  • Javier Balloffet

Authors

No additional authors.

andino_firmware

Firmware code to be run in the arduino microcontroller for proper control of the motors of the robot.

Connection

Check encoder_driver.h and motor_driver.h files to check the expected pins for the connection.

Installation

Arduino

In Arduino IDE, go to tools->Manage Libraries ... and install: - "Adafruit BNO055"

Verify and Upload andino_firmware.ino to your arduino board.

PlatformIO

  1. Install dependencies sudo apt-get install python3.10-venv
  2. Install platformio
curl -fsSL -o /tmp/get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python3 /tmp/get-platformio.py

  1. Add platformio to your $PATH:
echo "PATH=\"\$PATH:\$HOME/.platformio/penv/bin\"" >> $HOME/.bashrc
source $HOME/.bashrc

  1. Build and upload the firmware
    • If you're using an arduino uno pio run --target upload -e uno
    • If you're using an arduino nano pio run --target upload -e nanoatmega328

Description

Via serial connection (57600 baud) it is possible to interact with the microcontroller. The interface is described in the commands.h file. Here are the most used commands:

  • Get encoder values: 'e'
  • Set open-loop speed for the motors[pwm] 'o <left> <right>'
    • Example to move forward full speed: 'o 255 255'
    • Range [-255 -> 255]
  • Set closed-loop speed for the motors[ticks/sec] 'm <left> <right>'
    • Important!: See the Test it! section.
  • Set PID values: 'u <kp> <kd> <ki> <offset>'

Note: Remember the carriage return character at the end of the message.

Test it!

A serial port connection must be created at 57600 bauds. You can use the serial monitor from Arduino IDE for example.

  • Open loop verification:

    • Send o 255 255 to go full speed
    • Send o 0 0 to stop it.
  • Read the encoders

    • Send e to get the encoders values.
  • Get the ticks per revolution of your motor.

    • First set the encoders to zero, (reeboting with r).
    • Then rotate your motors as many revs you want,(say 10 for example) and then divide the encoder ticks per the number of revs. -> Then you get the ticks per revolution. Save this value, it is calibration for the control loop.
  • Closed loop verification

    • Send m <tps> <tps> where tps stands for ticks per second. For example if your motor-encoder system gets 700 ticks per revolution then sending m 700 700 will rotate both motors at 1 rev per sec. (~3.14rad/sec)
CHANGELOG

Changelog for package andino_firmware

0.2.0 (2024-07-19)

  • Camera info yaml (#231)
  • Improve Shell unit tests (#245)
  • fix minor typo in App class (#246)
  • Changes to add IMU to andino firmware (#215)
  • Add Shell class tests (#242)
  • Modify Shell class API to allow dependency injection (#221)
  • Add basic Platform IO instructions (#229)
  • Add serial stream interface and the Arduino implementation (#220)
  • Rename PID class (#218)
  • Rename init method from Shell class (#219)
  • Add PID class tests (#217)
  • Only send motor commands if pid is enabled (#222)
  • Add Encoder unit tests (#214)
  • Add Motor unit tests (#211)
  • Modify Encoder class API to allow dependency injection (#213)
  • Modify Motor class API to allow dependency injection (#210)
  • Add digital in interface (#212)
  • Add PWM output interface and the Arduino implementation (#209)
  • Add digital output interface and the Arduino implementation (#208)
  • Fix Arduino header file inclusion (#207)
  • Add basic setup for unit testing (#205)
  • Improve app loop (#197)
  • Improve command prompt parsing (#194)
  • Add Shell class (#193)
  • Supports Arduino Nano by providing a new Arduino configuration. (#195)
  • Fixes some compilation warnings. (#196)
  • Add command methods (#187)
  • Enable all compiler warnings (#186)
  • Add Hw struct (#177)
  • Add Constants struct (#176)
  • Add App class (#175)
  • Add main function (#173)
  • Fixes link to commands. (#178)
  • Add Encoder class (#172)
  • Contributors: Agustin Alba Chicar, Franco Cipollone, Gary Servin, Gonzo, Javier Balloffet, Jes

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

Deps Name
1 ament_cmake

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged andino_firmware at Robotics Stack Exchange