Revision 62aeb8ce client/cpp/src/MiddlewareROS.cpp
| client/cpp/src/MiddlewareROS.cpp | ||
|---|---|---|
| 153 | 153 |
goal.tilt_offset = target.tilt_offset; |
| 154 | 154 |
goal.pan_offset = target.pan_offset; |
| 155 | 155 |
|
| 156 |
//timestamp: |
|
| 157 |
//ts = t.sec + t.nsec/1000000000.0; |
|
| 158 |
uint32_t sec = (uint32_t) target.timestamp; |
|
| 159 |
uint32_t nsec = (uint32_t)((target.timestamp - sec)*1000000000); |
|
| 160 |
goal.timestamp = ros::Time(sec, nsec); |
|
| 161 |
|
|
| 162 |
if (target.type == RobotGaze::ABSOLUTE){
|
|
| 163 |
goal.gaze_type = hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE; |
|
| 164 |
}else{
|
|
| 165 |
goal.gaze_type = hlrc_server::gazetargetGoal::GAZETARGET_RELATIVE; |
|
| 166 |
} |
|
| 167 |
|
|
| 156 | 168 |
//send |
| 157 | 169 |
gazetarget_ac->sendGoal(goal); |
| 158 | 170 |
|
Also available in: Unified diff