0
$\begingroup$

Rosanswers logo

Environment

  • Ubuntu 16.04
  • ROS Kinetic

Issues

  1. I notice that the camera in rviz in ThirdPersonFollower mode doesn't seem to align correctly. As can be seen in the figures below, I set focal point to 0; 0; 0, yaw to 0, and pitch to 0. But the camera doesn't align correctly. Am I missing anything here?

  2. 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:

image description image description image description


Originally posted by ignite on ROS Answers with karma: 77 on 2019-11-25

Post score: 0


Original comments

Comment by Weasfas on 2019-11-25:
Hi @ignite

  1. It will always depends on the values you assigned to the Fixed Frame field in the Global options and the Target Frame field on the view options. Looking at the pictures you are visualizing in two different frames: camera_init and aft_mapped.
  2. Dealing with TFs extracted from a rosbag is always a bit of a mess. I would recommend you to ensure you have a proper TF tree and then to record your rosbag with /tf /tf_static and /clock topics to see if it a problem of the TF or the time at witch they are recorded.

Comment by ignite on 2019-11-25:
@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 the Target Frame? Because according to this, it is said that the ThirdPersonFollower will maintain a constant viewing angle towards the Target Frame.

Comment by Weasfas on 2019-11-26:
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, the Target 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 a Fixed Frame as frame1 you can place the Target 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

Comment by ignite on 2019-11-26:
@Weasfas Thanks! I think I misunderstood the ThirdPersonFollower view typeThe document says that n ThirdPersonFollower, the camera will turn if the Target Frame yaws.

Comment by ignite on 2019-11-26:
@Weasfas I think I have found the solution from this post. I need to set both Fixed Frame and Target Frame to the same frame.

Comment by Weasfas on 2019-11-26:
@ignite

Well, Glad you found a solution =)!

P.D. If you do not mind I will add here your comment as the answer.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

As @ignite noted:

I think I have found the solution from this post. I need to set both Fixed Frame and Target Frame to the same frame.


Originally posted by Weasfas with karma: 1695 on 2019-11-26

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.