0
$\begingroup$

Rosanswers logo

Hey all,

Im quite new to ROS, did a lot of tutorial stuff lately and didn't find an answer in the answers database.

My program has 2 frames. A fixed "world" frame and a "ego" frame, that is moving within the fixed one. Rviz is set up with a .rviz config file. Now I wonna know, if it's possible to focus the camera on the moving frame and update camera every time the moving frame changes relatively to the fixed frame. If yes, do I have to modify my .rviz config file or my program?

I think these are the important lines of my .rviz config file:

Views:
Current:
  Class: rviz/Orbit
  Distance: 139.139
  Focal Point:
    X: -1.5004
    Y: 59.5032
    Z: -26.4407
  Name: Current View
  Near Clip Distance: 0.01
  Pitch: 0.839797
  Target Frame: <Fixed Frame>
  Value: Orbit (rviz)
  Yaw: 5.10348

edit Thanks for your answers so far. But It turned out i meant something different to what I explained ^^ I dont want to move things relative to the ego frame. I still want to target the world frame, but tell rviz to set the focal point according to the ego frame that is moving within the world frame.

I found the documentation of the rviz::VisualizationManager that controls the visualization of rviz:

For example, there's rviz::ViewController with a method lookAt(float x, float y, float z) or rviz::OrbitViewController with a method move(float x, float y, float z) that might work in this case, but I don't quite find a way to use these in my program.

Got any ideas on that?

Thanks in advance!

greetz Joey


Originally posted by JoeayMB on ROS Answers with karma: 1 on 2014-06-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think that what you want can be done setting the Target Frame to the "ego" frame, because now it's fixed.


Originally posted by Miquel Massot with karma: 1471 on 2014-06-12

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

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