VID_20250205_163259.mp4
Eye Display Module
- Round Display Module with M5Stamp C3 (pio env name:
stampc3) : https://www.switch-science.com/products/8098 - Round Display Module with M5Stamp S3 (pio env name:
stamps3) : https://www.switch-science.com/products/8971
First you have to install ROS and PlatformIO
pip install platformioAnd 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.bashVID_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.pyrosrun eye_display demo_move_eye.pyYou 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]If you want to control the device through I2C bus, please use following env.
stampc3-i2c-right: Stamp C3 device on right eyestampc3-i2c-left: Stamp C3 device on left eyestamps3-i2c-right: Stamp C3 device on right eyestamps3-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.
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