Skip to content

k-okada/eye-display

 
 

Repository files navigation

Eye Display Module

PlatformIO Build Workflow Cakin Build and PlatformIO Build Workflow

VID_20250205_163259.mp4

Eye Display Module

Supported devices

  1. Round Display Module with M5Stamp C3 (pio env name: stampc3) : https://www.switch-science.com/products/8098
  2. Round Display Module with M5Stamp S3 (pio env name: stamps3) : https://www.switch-science.com/products/8971

How to use

Installation

First you have to install ROS and PlatformIO

pip install platformio

And then, you can build and upload the firmware to the device.

It is recommended to put this repo in a catkin workspace.

mkdir ~/catkin_ws/src
cd ~/catkin_ws
catkin init
cd ~/catkin_ws/src
git clone https://github.com/sktometometo/eye_display.git
rosdep install --from-paths . --ignore-src -y -r
catkin build eye_display
source ~/catkin_ws/devel/setup.bash

Simple demo

VID_20250205_163259.mp4

You can check basic functionalities with a demo firmware.

cd rosserial_version
pio run -e stampc3-ros
pio run -e stampc3-ros -t uploadfs --upload-port <port to device>
pio run -e stampc3-ros -t upload --upload-port <port to device>

Please replace stampc3 with stamps3 if you use type 2 device.

After building and uploading the firmware, you can control the device through ROS topic

roslaunch eye_display demo.launch port:=<port to device> mode_right:=<true or false>

Then you can control the device with the demo scripts.

rosrun eye_display pub_eye_status.py
rosrun eye_display demo_move_eye.py

You can also directly control pupil position by publish a message to "/serial_node/look_at" topic.

rostopic pub -1 /eye_display/look_at geometry_msgs/Point "{x: 40.0, y: -10.0, z: 0.0}"

You can control emotion expression with eye by publishing a message to "/eye_status" topic.

rostopic pub -1 /eye_display/eye_status std_msgs/String "data: 'happy'"

To get the list of emotional expression of the eyes, you can use following command.

$rosparam get eye_display/eye_asset/names
[normal, blink, surprised, sleepy, angry, sad, happy]

I2C version

If you want to control the device through I2C bus, please use following env.

  • stampc3-i2c-right: Stamp C3 device on right eye
  • stampc3-i2c-left: Stamp C3 device on left eye
  • stamps3-i2c-right: Stamp C3 device on right eye
  • stamps3-i2c-left: Stamp C3 device on left eye
roscd eye_display/sample_project
rosrun eye_display build.py ./sample.yaml --env <env name> --port <port to device>

Then you can control the device with I2C.

Description of direction

eye_display_direction

How to update image

eye_layer_structure

For Developers

How to update msg

Message headers in lib/ros_lib directory are automatically generated with make_libraries.py script in rosserial_arduino package.

And this repo provide easy way to update ros_lib as update_ros_lib.sh.

So if you want to update message definition in msg directory, please run the following command.

catkin build eye_display
source <path/to/catkin_ws>/devel/setup.bash
rosrun eye_display update_ros_lib.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 96.8%
  • Python 2.6%
  • Other 0.6%