Binding RViz' view camera position and orientation to tf frame
Hello,
I am working on head-tracking application and utilizing RViz for visualization. I have 3 coordinate frames connected as /world -> /base -> /head.
- /world - global frame
- /base - head-tracker frame (fixed to /world)
- /head - user's head frame in /base
The thing I am trying to achive is make user's head to be a 'camera' in 3D environment. Thus, I need to make /head frame to control RViz' viewport camera position and orientation. So far I managed only to bind /head frame position to the RViz camera by setting it to Target Frame. But frame orientation is ignored in this case.
Is there a way to control RViz camera orientation as well?
Thanks in advance,
Boris
UPDATE: Setting fixed frame to /world or /base does not help.
UPDATE 2:
$ rosrun tf tf_echo /world /base
At time 1342851117.156
- Translation: [0.000, 0.000, 0.500]
- Rotation: in Quaternion [0.500, 0.500, 0.500, 0.500]
in RPY [1.570, -0.000, 1.570]
// -- duplicating messages -- //
$ rosrun tf tf_echo /base /head
At time 1342851130.635
- Translation: [-0.183, 0.029, -0.722]
- Rotation: in Quaternion [0.010, 0.269, -0.049, 0.962]
in RPY [-0.008, 0.544, -0.104]
At time 1342851131.636
- Translation: [-0.176, 0.028, -0.732]
- Rotation: in Quaternion [0.037, 0.984, -0.176, 0.018]
in RPY [-2.789, 0.049, 3.075]
At time 1342851132.631
- Translation: [-0.181, 0.020, -0.745]
- Rotation: in Quaternion [0.041, 0.978, -0.201, 0.025]
in RPY [-2.739, 0.066, 3.072]
// -- and so on -- //
What type of view do you have rviz set to? Orbit? FPS? etc?
I tried both Orbit and FPS, does make a big difference. I can see how /head frame is rotating with respect to RViz camera plane. However I need opposite effect - /head frame has to be completely fixed to RViz camera frame.
I am confused about your intention. Do you want the head and camera to stay fixed in rviz and the world to rotate as the head does?
@joq: Yes, that's exactly what I need. Sorry for confusion.