Skip to content

Commit 5377c1d

Browse files
authored
Merge pull request #524 from ayaha-n/eye_display
2 parents e3b0f2e + 221720d commit 5377c1d

File tree

11 files changed

+98
-26
lines changed

11 files changed

+98
-26
lines changed

eye_display/data/denden_pupil.png

1.64 KB
Loading
980 Bytes
Loading
845 Bytes
Loading
927 Bytes
Loading

eye_display/data/denden_tear.jpeg

6.38 KB
Loading
11.4 KB
Loading
11.9 KB
Loading

eye_display/include/eye.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ void EyeManager::load_eye_images()
186186
const char *path_jpg_reflex = current_eye_asset.path_reflex.c_str();
187187
const char *path_jpg_upperlid = current_eye_asset.path_upperlid.c_str();
188188

189+
lcd.setRotation(current_eye_asset.direction);
190+
189191
if (path_jpg_outline != NULL) {
190192
sprite_outline.fillScreen(TFT_WHITE);
191193
if (not draw_image_file(sprite_outline, path_jpg_outline)) {

eye_display/include/ros_lib.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ void setup_asset(EyeManager& eye)
5757
nh.spinOnce();
5858
delay(1000);
5959
}
60+
delay(500); // wait 0.5 sec before reading asset
61+
nh.loginfo("Setup eye asset");
6062

6163
bool mode_right;
6264
int direction = 1;

eye_display/launch/denden.launch

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
11
<launch>
2-
<arg name="port" />
3-
<arg name="baud" default="57600" />
4-
<arg name="mode_right" default="true" />
5-
<arg name="direction" default="1" />
2+
<arg name="port" />
3+
<arg name="baud" default="57600" />
4+
<arg name="mode_right" default="true" />
5+
<arg name="direction" default="0" />
6+
<arg name="debug" default="false"/>
67

7-
<node
8-
pkg="rosserial_python"
9-
type="serial_node.py"
10-
name="eye_display"
11-
output="screen"
12-
>
13-
<rosparam subst_value="true">
14-
port: $(arg port)
15-
baud: $(arg baud)
16-
mode_right: $(arg mode_right)
17-
direction: $(arg direction)
18-
eye_asset_names: [normal, blink, surprised, sleepy, angry, sad, heart]
19-
normal_eye_asset: '{path_iris: "", path_pupil:"", path_reflex: "", path_upperlid: "", upperlid_position: [9]}'
20-
blink_eye_asset: '{path_iris: "", path_pupil:"", path_reflex: "", path_upperlid: "", upperlid_position: [9, 9, 130, 130, 9, 9]}'
21-
surprised_eye_asset: '{path_iris: "", path_pupil:"", path_reflex: "", path_upperlid: "", upperlid_position: [9, 9, 9, 9, 130, 130, 9, 9, 9, 9, 130, 9, 9, 130, 9, 9]}'
22-
sleepy_eye_asset: '{path_iris: "", path_pupil:"", path_reflex: "", path_upperlid: "", upperlid_position: [60, 60, 70, 130, 130, 130, 70, 60, 60, 60]}'
23-
angry_eye_asset: '{path_iris: "", path_pupil:"", path_reflex: "", path_upperlid: "", upperlid_position: [120]}'
24-
sad_eye_asset: '{path_iris: "", path_pupil:"", path_reflex: "", path_upperlid: "", upperlid_position: [130]}'
25-
happy_eye_asset: '{path_iris: "", path_pupil:"", path_reflex: "", path_upperlid: "", upperlid_position: [130]}'
26-
heart_eye_asset: '{path_iris: "", path_pupil:"", path_reflex: "", path_upperlid: "", upperlid_position: [130]}'
27-
</rosparam>
28-
</node>
8+
<include file="$(find eye_display)/launch/demo.launch" >
9+
<arg name="eye_asset_file" value="$(find eye_display)/launch/denden.yaml" />
10+
<arg name="port" value="$(arg port)" />
11+
<arg name="baud" value="$(arg baud)" />
12+
<arg name="mode_right" value="$(arg mode_right)" />
13+
<arg name="direction" value="$(arg direction)" />
14+
<arg name="debug" value="$(arg debug)" />
15+
</include>
2916
</launch>

0 commit comments

Comments
 (0)