Revision e7717d32
client/python/hlrc_client/RobotGaze.py | ||
---|---|---|
45 | 45 |
type_s = "ABSOLUTE" |
46 | 46 |
else: |
47 | 47 |
type_s = "RELATIVE" |
48 |
return "RobotGaze = { PTR={%6.2f %6.2f %6.2f} vergence=%6.2f PT_offset={%6.2f %6.2f} [%s]}" \ |
|
49 |
% (self.pan, self.tilt, self.roll, self.vergence, self.pan_offset, self.tilt_offset, type_s) |
|
48 |
return "RobotGaze = { PTR={%6.2f %6.2f %6.2f} vergence=%6.2f PT_offset={%6.2f %6.2f} [%s, ts=%s]}" \ |
|
49 |
% (self.pan, self.tilt, self.roll, self.vergence, self.pan_offset, self.tilt_offset, type_s, self.timestamp) |
client/python/hlrc_client/__init__.py | ||
---|---|---|
4 | 4 |
from RobotGaze import RobotGaze |
5 | 5 |
from RobotAnimation import RobotAnimation |
6 | 6 |
from RobotMouth import RobotMouth |
7 |
from RobotTimestamp import RobotTimestamp |
server/include/ROS/GazeCallbackWrapperROS.h | ||
---|---|---|
46 | 46 |
feedback.result = 1; |
47 | 47 |
|
48 | 48 |
hlrc_server::gazetargetGoalConstPtr request = goal; |
49 |
//printf("> incoming gaze (p=%3.1f t=%3.1f r=%3.1f / v=%3.1f)\n", request->pan, request->tilt, request->roll, request->vergence); |
|
49 |
printf("> incoming gaze (p=%3.1f t=%3.1f r=%3.1f / v=%3.1f) [%s ts=%f]\n", |
|
50 |
request->pan, |
|
51 |
request->tilt, |
|
52 |
request->roll, |
|
53 |
request->vergence, |
|
54 |
request->gaze_type==hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE?"ABSOLUTE":"RELATIVE", |
|
55 |
request->gaze_timestamp.toSec() |
|
56 |
); |
|
50 | 57 |
|
51 | 58 |
humotion::GazeState gaze_state; |
52 | 59 |
|
server/src/Arbiter.cpp | ||
---|---|---|
254 | 254 |
//add offset values from user: |
255 | 255 |
gaze_state.pan_offset += requested_gaze_state.pan_offset; |
256 | 256 |
gaze_state.tilt_offset += requested_gaze_state.tilt_offset; |
257 |
|
|
258 | 257 |
} |
259 | 258 |
|
260 | 259 |
void Arbiter::override_by_emotion(){ |
... | ... | |
301 | 300 |
} |
302 | 301 |
|
303 | 302 |
humotion::GazeState Arbiter::get_gaze_state(){ |
303 |
//gaze_state.dump(); |
|
304 | 304 |
return gaze_state; |
305 | 305 |
} |
306 | 306 |
|
Also available in: Unified diff