Revision d82702d2 src/server/controller.cpp
src/server/controller.cpp | ||
---|---|---|
106 | 106 |
// |
107 | 107 |
double roll = joint_interface->get_ts_position(JointInterface::ID_NECK_ROLL).get_interpolated_value(relative_target_timestamp); |
108 | 108 |
|
109 |
//substract offsets: |
|
110 |
pan -= relative.pan_offset; |
|
111 |
tilt -= relative.tilt_offset; |
|
112 |
roll -= relative.roll_offset; |
|
113 |
|
|
109 | 114 |
//build up absolute target: |
110 | 115 |
absolute_gaze.gaze_type = GazeState::GAZETYPE_ABSOLUTE; |
111 | 116 |
absolute_gaze.pan = pan + relative.pan; |
... | ... | |
117 | 122 |
//ros::Time past = now - ros::Duration(5.0); |
118 | 123 |
//listener.waitForTransform("/turtle2", now,J "/turtle1", past, "/world", ros::Duration(1.0)); |
119 | 124 |
//listener.lookupTransform("/turtle2", now, "/turtle1", past, "/world", transform); |
120 |
|
|
125 |
absolute_gaze.dump(); |
|
121 | 126 |
return absolute_gaze; |
122 | 127 |
} |
123 | 128 |
|
... | ... | |
131 | 136 |
void Controller::set_gaze_target(GazeState new_gaze_target){ |
132 | 137 |
if (!activated){ |
133 | 138 |
//not yet initialized, ignore incoming targets |
134 |
printf("not activated\n"); |
|
135 | 139 |
return; |
136 | 140 |
} |
137 | 141 |
|
Also available in: Unified diff