ROS package for robot emotional expression.
EDIE is Emotional Design and Interactive Entertainment robot.
By Park JaeHun
- Ubuntu 18.04
- ROS melodic
- OpenCV 3.4.6
- jsoncpp
$ sudo apt-get install libjsoncpp-dev
- OpenCV
$ catkin_make
- Run emotion handler node
$ rosrun edie_emotion_handler edie_emotion_node
- Run display node
$ rosrun edie_display edie_display_node
$ rostopic pub /edie/emotion std_msgs/Int8 "data: 1"
$ cd EDIE_Emotion/edie_display/image/Emotions
$ mkdir NEW_EMOTION
- name format : "emotions_${id}.png"
- ex) emotions_0.png
$ vi EDIE_Emotion/edie_display/config/emotion_sequence.json
base_contents
: List of basic contents.- key : a~z
- value : digit|,|~
- ex) 1~4 : 1,2,3,4
- ex) 0,2~4,1 : 0,2,3,4,1
- ex)
"base_contents": {"a": "0", "b": "1~2"}
sequence
: Sequences created usingbase contents
- key : index increments from 0.
- value :
- key : "contents"
- value : a~z|R
- a~z values means base_content.
- R means reverse order sequnce.
ex) if
b : 1,2
thenbRb : 1,2,2,1
- key : "count"
- value : digit
- Set the number of times the contents are repeated.
ex) if
contents: "bRb", "count": 2
then1,2,2,1,1,2,2,1
- Set the number of times the contents are repeated.
ex) if
- key : "repeat"
- value : digit
- Set the number of times the elements of the content are repeated
ex) if
contents: "bRb", "repeat": 2
then1,1,2,2,2,2,1,1
- Set the number of times the elements of the content are repeated
ex) if
- ex) add new emotion sequence
- sequence info
"NEW_EMOTION": { "base_contents": { "a": "0", "b": "1~2" }, "sequence": { "0": { "contents": "a", "count": 1 }, "1": { "contents": "bRb", "count": 1 }, "2": { "contents": "a", "count": 5 } } }
- sequence :
0,1,2,2,1,0,0,0,0,0
- sequence info
- Add NEW_EMOTION
std::ostream& operator<<(std::ostream& os, EmotionState state) { switch(state) { case EmotionState::BLINK : os << "BLINK"; break; case EmotionState::FLINCH : os << "FLINCH"; break; case EmotionState::LAUGH : os << "LAUGH"; break; case EmotionState::LOOK_AROUND : os << "LOOK_AROUND"; break; case EmotionState::LOVE : os << "LOVE"; break; case EmotionState::BATTERYLOW : os << "BATTERYLOW"; break; + case EmotionState::NEW_EMOTION : os << "NEW_EMOTION"; break; default : os << "ERROR : " << static_cast<int>(state); break; } return os; }
- Add NEW_EMOTION & Increase COUNT
enum class EmotionState { BLINK, LAUGH, FLINCH, LOOK_AROUND, LOVE, BATTERYLOW, + NEW_EMOTION, - COUNT = 6 + COUNT = 7 };
Aei ROBOT : http://arobot4all.com/