Rviz camera in ThirdPersonFollower view doesn't align correctly
Environment
- Ubuntu 16.04
- ROS Kinetic
Issues
I notice that the camera in
rviz
inThirdPersonFollower
mode doesn't seem to align correctly. As can be seen in the figures below, I set focal point to0; 0; 0
, yaw to0
, and pitch to0
. But the camera doesn't align correctly. Am I missing anything here?Also, when I play the rosbag file, the camera pose seems to change from frame to frame, which I don't know what possible reasons could be. Does anybody have this kind of behavior?
What could be the possible reasons of this? Is this a known bug?
Here is some of the screenshots:
Hi @ignite
Fixed Frame
field in the Global options and theTarget Frame
field on the view options. Looking at the pictures you are visualizing in two different frames:camera_init
andaft_mapped
./tf /tf_static
and/clock
topics to see if it a problem of the TF or the time at witch they are recorded.@Weasfas Thanks for your detailed comment. Please correct me if I am wrong. Regarding point #1, my understanding is that
Fixed Frame
is a frame that all objects in rviz is plotted "with respect to". So doesn't the camera type (and its settings) only depend on theTarget Frame
? Because according to this, it is said that theThirdPersonFollower
will maintain a constant viewing angle towards theTarget Frame
.As far as I know, the fixed frame tells rviz the relative coordinates of all plotted frames with respect to the
Fixed Frame
in the global setting. The thing is, theTarget Frame
in the view panel is more important because it is changing your local coordinates of the camera (E.g.: applying the coordinate offset). If you have aFixed Frame
as frame1 you can place theTarget Frame
with<Fixed Frame>
but if you change it to another, the offset will be applied and you will be not aligned with the frame you want.I performed some testing with a robot model in the
ThirdPersonFollower
view and as long as I use the proper coordinate frames the axis of the frame always plotted aligned. I am using your same set up: Ubuntu Xenial + Kinetic@Weasfas Thanks! I think I misunderstood the
ThirdPersonFollower
view typeThe document says that nThirdPersonFollower
, the camera will turn if theTarget Frame
yaws.@Weasfas I think I have found the solution from this post. I need to set both
Fixed Frame
andTarget Frame
to the same frame.@ignite
Well, Glad you found a solution =)!
P.D. If you do not mind I will add here your comment as the answer.