Skip to content

sketch and resources to build up micro computers for cabot.

License

Notifications You must be signed in to change notification settings

CMU-cabot/cabot-arduino-di

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT

CaBot Arduino DI (Directional Indicator)

Usage

cabot-drivers$ docker compose run --rm driver bash
$ source install/setup.bash
$ ros2 run cabot_serial cabot_serial_node --ros-args -p port:=/dev/ttyESP32 [other parameters]

parameters

  • run_imu_calibration : bool Run IMU calibration if this flag is set
  • calibration_params : int[22]
    • BNO055 calibration parameter. Follow instruction when you not specify this parameter.
  • touch_params : [touch_base (int), touch_threshold (int), release_threshold (int)]
    • Touch threshold parameters
    • touch_base - base value when you don't touch the touch sensor
    • touch_threshold - if the value is below touch_base - touch_threshold then changes to touch state
    • release_threshold - After transitioning to touch state, the value bigger than touch_base - release_threshold then changes to release state

Serial Connection

  • It used to use rosserial for serial connection with ROS1
  • ROS2 offers micro ROS, but it does not fit to our board, so we implemented custom serial communication
    • see CaBotHandle.cpp/hpp for the details

Pre-requisites

Hardware

One example of hardware components

Software (docker, arduino-ide)

  host $ docker-compose build
  host $ docker-compose run arduino
docker $ ./build.sh -m <mode> all      # build and upload (with -b esp32:esp32:esp32 -p /dev/ttyESP32 -m <mode>)
                                       # you can set board by ARDUINO_BOARD, and port by ARDUINO_PORT environment variables
                                       # mode should be specified (ACE/I1/M1/M2)
                                       # ex.
                                       # ./build.sh -m M2 all

or use arduino-cli
docker $ arduino-cli compile -b esp32:esp32:esp32 --build-property compiler.cpp.extra_flags=-D<mode> .  # mode should be specified (ACE/I1/M1/M2)
                                                                                                        # ex:
                                                                                                        # arduino-cli compile -b esp32:esp32:esp32 --build-property compiler.cpp.extra_flags=-DM2 .

docker $ arduino-cli upload -b esp32:esp32:esp32 -p /dev/ttyESP32 .
  • change -b <board type> -p <port> for your environment
  • linux is required to upload built sketch (Windows/Mac docker container does not support)

Components description

  • The Cabot's handle has three main features namely, touch sensor, push buttons (four of them), and vibrators (three of them).
  • The touch sensor is used for giving user feedback to the robot while it is moving, to ensure that the robot moves along with the user without getting lost.
  • The three vibrators are useful for giving alerts to the user in response to obstacles encountered in the front and on the sides of the robot while it is moving. They also provide alerts/ warnings to the user about upcoming left turns and right turns.
  • The four push butons are useful for giving manual input signals to the robot, to command it to move in preferred directions (forward, backward, left turn, and right turn).
  • The touch sensor is usually connected to a conductive material like copper film, or copper plate.

About

sketch and resources to build up micro computers for cabot.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.9%
  • Shell 2.2%
  • Dockerfile 0.9%