rviz_animated_view_controller.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  *
29  * Author: Adam Leeper
30  */
31 
32 #ifndef RVIZ_ANIMATED_VIEW_CONTROLLER_H
33 #define RVIZ_ANIMATED_VIEW_CONTROLLER_H
34 
35 #include <boost/circular_buffer.hpp>
36 
37 #include <cv_bridge/cv_bridge.h>
38 
40 
41 #include "rviz/view_controller.h"
42 #include "rviz/view_manager.h"
43 #include "rviz/render_panel.h"
44 
45 #include <ros/subscriber.h>
46 #include <ros/ros.h>
47 
48 #include <geometry_msgs/Pose.h>
49 
50 #include <std_msgs/Bool.h>
51 #include <std_msgs/Duration.h>
52 
53 #include <view_controller_msgs/CameraMovement.h>
54 #include <view_controller_msgs/CameraPlacement.h>
55 #include <view_controller_msgs/CameraTrajectory.h>
56 
57 #include <OGRE/OgreRenderWindow.h>
58 #include <OGRE/OgreVector3.h>
59 #include <OGRE/OgreQuaternion.h>
60 
61 namespace rviz {
62  class SceneNode;
63  class Shape;
64  class BoolProperty;
65  class FloatProperty;
66  class VectorProperty;
67  class QuaternionProperty;
68  class TfFrameProperty;
69  class EditableEnumProperty;
70  class RosTopicProperty;
71 }
72 
74 {
75 
78 {
79 Q_OBJECT
80 public:
81 
82  enum { TRANSITION_LINEAR = 0,
84 
86  {
88 
89  OgreCameraMovement(const Ogre::Vector3& eye,
90  const Ogre::Vector3& focus,
91  const Ogre::Vector3& up,
93  const uint8_t interpolation_speed)
94  : eye(eye)
95  , focus(focus)
96  , up(up)
99  {
100  }
101 
102  Ogre::Vector3 eye;
103  Ogre::Vector3 focus;
104  Ogre::Vector3 up;
105 
108  };
109 
110  typedef boost::circular_buffer<OgreCameraMovement> BufferCamMovements;
111 
113  virtual ~AnimatedViewController();
114 
115  void initializePublishers();
116  void initializeSubscribers();
117 
122  virtual void onInitialize();
123 
127  virtual void onActivate();
128 
129 
131  void move_focus_and_eye( float x, float y, float z );
132 
134  void move_eye( float x, float y, float z );
135 
136 
139  void yaw_pitch_roll( float yaw, float pitch, float roll );
140 
141 
142  virtual void handleMouseEvent(rviz::ViewportMouseEvent& evt);
143 
145  void publishCameraPose();
146 
149  virtual void lookAt( const Ogre::Vector3& point );
150 
151 
153  void orbitCameraTo( const Ogre::Vector3& point);
154 
156  void moveEyeWithFocusTo( const Ogre::Vector3& point);
157 
159  virtual void reset();
160 
166  virtual void mimic( ViewController* source_view );
167 
175  virtual void transitionFrom( ViewController* previous_view );
176 
177 
178 protected Q_SLOTS:
184  virtual void updateAttachedFrame();
185 
187  virtual void onDistancePropertyChanged();
188 
190  virtual void onFocusPropertyChanged();
191 
193  virtual void onEyePropertyChanged();
194 
196  virtual void onUpPropertyChanged();
197 
198 protected: //methods
200 
203  virtual void update(float dt, float ros_dt);
204 
211 
213  bool isMovementAvailable(){ return cam_movements_buffer_.size() >= 2; };
214 
224  double computeRelativeProgressInTime(const ros::Duration& transition_duration);
225 
247  float computeRelativeProgressInSpace(double relative_progress_in_time,
248  uint8_t interpolation_speed);
249 
251  void publishViewImage();
252 
254  void getViewImage(std::shared_ptr<Ogre::PixelBox>& pixel_box);
255 
256  void convertImage(std::shared_ptr<Ogre::PixelBox> input_image,
257  sensor_msgs::ImagePtr output_image);
258 
260  void prepareNextMovement(const ros::Duration& previous_transition_duration);
261 
264 
267 
271  virtual void onAttachedFrameChanged( const Ogre::Vector3& old_reference_position, const Ogre::Quaternion& old_reference_orientation );
272 
276 
277  void cameraPlacementCallback(const view_controller_msgs::CameraPlacementConstPtr &cp_ptr);
278 
283  void cameraTrajectoryCallback(const view_controller_msgs::CameraTrajectoryConstPtr& ct_ptr);
284 
289  void pauseAnimationCallback(const std_msgs::Duration::ConstPtr& pause_duration_msg);
290 
297  void transformCameraToAttachedFrame(geometry_msgs::PointStamped& eye,
298  geometry_msgs::PointStamped& focus,
299  geometry_msgs::Vector3Stamped& up);
300 
301  //void setUpVectorPropertyModeDependent( const Ogre::Vector3 &vector );
302 
303  void setPropertiesFromCamera( Ogre::Camera* source_camera );
304 
313  void beginNewTransition(const Ogre::Vector3& eye,
314  const Ogre::Vector3& focus,
315  const Ogre::Vector3& up,
316  ros::Duration transition_duration,
317  uint8_t interpolation_speed = view_controller_msgs::CameraMovement::WAVE);
318 
320  void cancelTransition();
321 
323  void updateCamera();
324 
325  Ogre::Vector3 fixedFrameToAttachedLocal(const Ogre::Vector3 &v) { return reference_orientation_.Inverse()*(v - reference_position_); }
326  Ogre::Vector3 attachedLocalToFixedFrame(const Ogre::Vector3 &v) { return reference_position_ + (reference_orientation_*v); }
327 
329 
330  Ogre::Quaternion getOrientation();
331 
332 protected Q_SLOTS:
333  void updateTopics();
334 
335 
336 protected: //members
337 
339 
343 
349 
352 
355 
357 
359  Ogre::SceneNode* attached_scene_node_;
360 
361  Ogre::Quaternion reference_orientation_;
362  Ogre::Vector3 reference_position_;
363 
364  // Variables used during animation
365  bool animate_;
368 
370  bool dragging_;
371 
373 
377 
381 
385 
387 };
388 
389 } // namespace rviz_animated_view_controller
390 
391 #endif // RVIZ_ANIMATED_VIEW_CONTROLLER_H
rviz_animated_view_controller::AnimatedViewController::handleMouseEvent
virtual void handleMouseEvent(rviz::ViewportMouseEvent &evt)
Definition: rviz_animated_view_controller.cpp:362
rviz_animated_view_controller::AnimatedViewController::onUpPropertyChanged
virtual void onUpPropertyChanged()
Called when up vector property is changed (does nothing for now...).
Definition: rviz_animated_view_controller.cpp:273
rviz_animated_view_controller::AnimatedViewController::interaction_mode_property_
rviz::EditableEnumProperty * interaction_mode_property_
Select between Orbit or FPS control style.
Definition: rviz_animated_view_controller.h:341
rviz::RosTopicProperty
rviz_animated_view_controller::AnimatedViewController::placement_subscriber_
ros::Subscriber placement_subscriber_
Definition: rviz_animated_view_controller.h:374
ros::Publisher
rviz_animated_view_controller::AnimatedViewController::update
virtual void update(float dt, float ros_dt)
Called at 30Hz by ViewManager::update() while this view is active. Override with code that needs to r...
Definition: rviz_animated_view_controller.cpp:767
rviz_animated_view_controller::AnimatedViewController::interaction_disabled_cursor_
QCursor interaction_disabled_cursor_
A cursor for indicating mouse interaction is disabled.
Definition: rviz_animated_view_controller.h:372
rviz_animated_view_controller::AnimatedViewController::OgreCameraMovement::transition_duration
ros::Duration transition_duration
Definition: rviz_animated_view_controller.h:106
rviz_animated_view_controller::AnimatedViewController::cancelTransition
void cancelTransition()
Cancels any currently active camera movement.
Definition: rviz_animated_view_controller.cpp:603
rviz_animated_view_controller::AnimatedViewController::pauseAnimationCallback
void pauseAnimationCallback(const std_msgs::Duration::ConstPtr &pause_duration_msg)
Sets the duration the rendering has to wait for during the next update cycle.
Definition: rviz_animated_view_controller.cpp:191
rviz_animated_view_controller::AnimatedViewController::fixed_up_property_
rviz::BoolProperty * fixed_up_property_
If True, "up" is fixed to ... up.
Definition: rviz_animated_view_controller.h:342
view_controller.h
rviz_animated_view_controller::AnimatedViewController::window_width_property_
rviz::FloatProperty * window_width_property_
The width of the rviz visualization window in pixels.
Definition: rviz_animated_view_controller.h:353
rviz_animated_view_controller::AnimatedViewController::cam_movements_buffer_
BufferCamMovements cam_movements_buffer_
Definition: rviz_animated_view_controller.h:367
ros.h
rviz_animated_view_controller::AnimatedViewController::current_camera_pose_publisher_
ros::Publisher current_camera_pose_publisher_
Definition: rviz_animated_view_controller.h:378
rviz::EditableEnumProperty
rviz::BoolProperty
rviz::ViewportMouseEvent
rviz_animated_view_controller::AnimatedViewController::OgreCameraMovement::up
Ogre::Vector3 up
Definition: rviz_animated_view_controller.h:104
rviz_animated_view_controller::AnimatedViewController::beginNewTransition
void beginNewTransition(const Ogre::Vector3 &eye, const Ogre::Vector3 &focus, const Ogre::Vector3 &up, ros::Duration transition_duration, uint8_t interpolation_speed=view_controller_msgs::CameraMovement::WAVE)
Begins a camera movement animation to the given goal point.
Definition: rviz_animated_view_controller.cpp:570
rviz_animated_view_controller::AnimatedViewController::pause_animation_duration_subscriber_
ros::Subscriber pause_animation_duration_subscriber_
Definition: rviz_animated_view_controller.h:376
rviz_animated_view_controller::AnimatedViewController::eye_point_property_
rviz::VectorProperty * eye_point_property_
The position of the camera.
Definition: rviz_animated_view_controller.h:345
rviz_animated_view_controller::AnimatedViewController::updateAttachedSceneNode
void updateAttachedSceneNode()
Update the position of the attached_scene_node_ from the TF frame specified in the Attached Frame pro...
Definition: rviz_animated_view_controller.cpp:300
rviz_animated_view_controller::AnimatedViewController::getDistanceFromCameraToFocalPoint
float getDistanceFromCameraToFocalPoint()
Return the distance between camera and focal point.
Definition: rviz_animated_view_controller.cpp:338
rviz_animated_view_controller::AnimatedViewController::render_frame_by_frame_
bool render_frame_by_frame_
Definition: rviz_animated_view_controller.h:382
rviz_animated_view_controller::AnimatedViewController::move_eye
void move_eye(float x, float y, float z)
Applies a translation to only the eye point.
Definition: rviz_animated_view_controller.cpp:988
rviz_animated_view_controller::AnimatedViewController::~AnimatedViewController
virtual ~AnimatedViewController()
Definition: rviz_animated_view_controller.cpp:159
rviz_animated_view_controller::AnimatedViewController::target_fps_
int target_fps_
Definition: rviz_animated_view_controller.h:383
rviz_animated_view_controller::AnimatedViewController::animate_
bool animate_
Definition: rviz_animated_view_controller.h:365
rviz_animated_view_controller::AnimatedViewController::publishCameraPose
void publishCameraPose()
Publishes the current camera pose.
Definition: rviz_animated_view_controller.cpp:485
rviz_animated_view_controller::AnimatedViewController::attached_frame_property_
rviz::TfFrameProperty * attached_frame_property_
Definition: rviz_animated_view_controller.h:358
rviz_animated_view_controller::AnimatedViewController::setPropertiesFromCamera
void setPropertiesFromCamera(Ogre::Camera *source_camera)
Definition: rviz_animated_view_controller.cpp:510
rviz_animated_view_controller::AnimatedViewController::computeRelativeProgressInTime
double computeRelativeProgressInTime(const ros::Duration &transition_duration)
Computes the fraction of time we already used for the current movement.
Definition: rviz_animated_view_controller.cpp:836
rviz_animated_view_controller::AnimatedViewController::OgreCameraMovement::OgreCameraMovement
OgreCameraMovement()
Definition: rviz_animated_view_controller.h:87
rviz_animated_view_controller::AnimatedViewController::onDistancePropertyChanged
virtual void onDistancePropertyChanged()
Called when distance property is changed; computes new eye position.
Definition: rviz_animated_view_controller.cpp:265
rviz_animated_view_controller::AnimatedViewController::OgreCameraMovement::eye
Ogre::Vector3 eye
Definition: rviz_animated_view_controller.h:102
rviz_animated_view_controller::AnimatedViewController::cameraPlacementCallback
void cameraPlacementCallback(const view_controller_msgs::CameraPlacementConstPtr &cp_ptr)
Definition: rviz_animated_view_controller.cpp:619
rviz_animated_view_controller::AnimatedViewController::updateTopics
void updateTopics()
Definition: rviz_animated_view_controller.cpp:165
rviz_animated_view_controller::AnimatedViewController::OgreCameraMovement::OgreCameraMovement
OgreCameraMovement(const Ogre::Vector3 &eye, const Ogre::Vector3 &focus, const Ogre::Vector3 &up, const ros::Duration &transition_duration, const uint8_t interpolation_speed)
Definition: rviz_animated_view_controller.h:89
rviz_animated_view_controller::AnimatedViewController::nh_
ros::NodeHandle nh_
Definition: rviz_animated_view_controller.h:338
rviz_animated_view_controller::AnimatedViewController::updateWindowSizeProperties
void updateWindowSizeProperties()
Definition: rviz_animated_view_controller.cpp:214
rviz_animated_view_controller::AnimatedViewController::finished_animation_publisher_
ros::Publisher finished_animation_publisher_
Definition: rviz_animated_view_controller.h:379
rviz_animated_view_controller::AnimatedViewController::attached_scene_node_
Ogre::SceneNode * attached_scene_node_
Definition: rviz_animated_view_controller.h:359
rviz::FloatProperty
rviz_animated_view_controller::AnimatedViewController::disconnectPositionProperties
void disconnectPositionProperties()
Convenience function; disconnects the signals/slots for position properties.
Definition: rviz_animated_view_controller.cpp:247
rviz_animated_view_controller::AnimatedViewController::getOrientation
Ogre::Quaternion getOrientation()
Return a Quaternion.
Definition: rviz_animated_view_controller.cpp:976
rviz_animated_view_controller::AnimatedViewController::distance_property_
rviz::FloatProperty * distance_property_
The camera's distance from the focal point.
Definition: rviz_animated_view_controller.h:344
rviz_animated_view_controller::AnimatedViewController::orbitCameraTo
void orbitCameraTo(const Ogre::Vector3 &point)
Calls beginNewTransition() with the focus point fixed, moving the eye to the point given.
Definition: rviz_animated_view_controller.cpp:752
rviz_animated_view_controller::AnimatedViewController::onActivate
virtual void onActivate()
called by activate().
Definition: rviz_animated_view_controller.cpp:220
rviz_animated_view_controller::AnimatedViewController::OgreCameraMovement::focus
Ogre::Vector3 focus
Definition: rviz_animated_view_controller.h:103
rviz_animated_view_controller::AnimatedViewController::camera_trajectory_topic_property_
rviz::RosTopicProperty * camera_trajectory_topic_property_
Definition: rviz_animated_view_controller.h:351
rviz_animated_view_controller::AnimatedViewController::up_vector_property_
rviz::VectorProperty * up_vector_property_
The up vector for the camera.
Definition: rviz_animated_view_controller.h:347
rviz_animated_view_controller::AnimatedViewController::BufferCamMovements
boost::circular_buffer< OgreCameraMovement > BufferCamMovements
Definition: rviz_animated_view_controller.h:110
rviz_animated_view_controller::AnimatedViewController::AnimatedViewController
AnimatedViewController()
Definition: rviz_animated_view_controller.cpp:97
rviz_animated_view_controller::AnimatedViewController::updateCamera
void updateCamera()
Updates the Ogre camera properties from the view controller properties.
Definition: rviz_animated_view_controller.cpp:925
rviz_animated_view_controller::AnimatedViewController::default_transition_time_property_
rviz::FloatProperty * default_transition_time_property_
A default time for any animation requests.
Definition: rviz_animated_view_controller.h:348
render_panel.h
rviz
rviz_animated_view_controller::AnimatedViewController::mouse_enabled_property_
rviz::BoolProperty * mouse_enabled_property_
If True, most user changes to camera state are disabled.
Definition: rviz_animated_view_controller.h:340
subscriber.h
rviz_animated_view_controller::AnimatedViewController::focus_point_property_
rviz::VectorProperty * focus_point_property_
The point around which the camera "orbits".
Definition: rviz_animated_view_controller.h:346
rviz_animated_view_controller::AnimatedViewController::onAttachedFrameChanged
virtual void onAttachedFrameChanged(const Ogre::Vector3 &old_reference_position, const Ogre::Quaternion &old_reference_orientation)
Override to implement the change in properties which nullifies the change in attached frame.
Definition: rviz_animated_view_controller.cpp:318
rviz_animated_view_controller::AnimatedViewController::onEyePropertyChanged
virtual void onEyePropertyChanged()
Called when eye property is changed; computes new distance.
Definition: rviz_animated_view_controller.cpp:255
rviz_animated_view_controller::AnimatedViewController::focal_shape_
rviz::Shape * focal_shape_
A small ellipsoid to show the focus point.
Definition: rviz_animated_view_controller.h:369
rviz_animated_view_controller::AnimatedViewController::reference_orientation_
Ogre::Quaternion reference_orientation_
Used to store the orientation of the attached frame relative to <Fixed Frame>
Definition: rviz_animated_view_controller.h:361
rviz_animated_view_controller::AnimatedViewController::pause_animation_duration_
ros::WallDuration pause_animation_duration_
Definition: rviz_animated_view_controller.h:386
rviz_animated_view_controller::AnimatedViewController::getViewImage
void getViewImage(std::shared_ptr< Ogre::PixelBox > &pixel_box)
Get the current image rviz is showing as an Ogre::PixelBox.
Definition: rviz_animated_view_controller.cpp:885
ros::WallTime
rviz_animated_view_controller::AnimatedViewController::moveEyeWithFocusTo
void moveEyeWithFocusTo(const Ogre::Vector3 &point)
Calls beginNewTransition() to move the eye to the point given, keeping the direction fixed.
Definition: rviz_animated_view_controller.cpp:759
rviz_animated_view_controller::AnimatedViewController::reference_position_
Ogre::Vector3 reference_position_
Used to store the position of the attached frame relative to <Fixed Frame>
Definition: rviz_animated_view_controller.h:362
rviz_animated_view_controller::AnimatedViewController
An un-constrained "flying" camera, specified by an eye point, focus point, and up vector.
Definition: rviz_animated_view_controller.h:77
image_transport.h
rviz::TfFrameProperty
rviz_animated_view_controller::AnimatedViewController::lookAt
virtual void lookAt(const Ogre::Vector3 &point)
Calls beginNewTransition() to move the focus point to the point provided, assumed to be in the Rviz F...
Definition: rviz_animated_view_controller.cpp:737
rviz_animated_view_controller::AnimatedViewController::reset
virtual void reset()
Resets the camera parameters to a sane value.
Definition: rviz_animated_view_controller.cpp:343
view_manager.h
rviz_animated_view_controller::AnimatedViewController::trajectory_subscriber_
ros::Subscriber trajectory_subscriber_
Definition: rviz_animated_view_controller.h:375
rviz_animated_view_controller::AnimatedViewController::transitionFrom
virtual void transitionFrom(ViewController *previous_view)
Called by ViewManager when this ViewController is being made current.
Definition: rviz_animated_view_controller.cpp:553
rviz_animated_view_controller::AnimatedViewController::onFocusPropertyChanged
virtual void onFocusPropertyChanged()
Called focus property is changed; computes new distance.
Definition: rviz_animated_view_controller.cpp:260
rviz_animated_view_controller::AnimatedViewController::rendered_frames_counter_
int rendered_frames_counter_
Definition: rviz_animated_view_controller.h:384
rviz::ViewController
image_transport::Publisher
rviz_animated_view_controller::AnimatedViewController::yaw_pitch_roll
void yaw_pitch_roll(float yaw, float pitch, float roll)
Applies a body-fixed-axes sequence of rotations; only accurate for small angles.
Definition: rviz_animated_view_controller.cpp:934
rviz_animated_view_controller::AnimatedViewController::transformCameraToAttachedFrame
void transformCameraToAttachedFrame(geometry_msgs::PointStamped &eye, geometry_msgs::PointStamped &focus, geometry_msgs::Vector3Stamped &up)
Transforms the camera defined by eye, focus and up into the attached frame.
Definition: rviz_animated_view_controller.cpp:709
cv_bridge.h
rviz_animated_view_controller::AnimatedViewController::mimic
virtual void mimic(ViewController *source_view)
Configure the settings of this view controller to give, as much as possible, a similar view as that g...
Definition: rviz_animated_view_controller.cpp:525
rviz_animated_view_controller::AnimatedViewController::isMovementAvailable
bool isMovementAvailable()
Returns true if buffer contains at least one start and end pose needed for one movement.
Definition: rviz_animated_view_controller.h:213
rviz_animated_view_controller::AnimatedViewController::cameraTrajectoryCallback
void cameraTrajectoryCallback(const view_controller_msgs::CameraTrajectoryConstPtr &ct_ptr)
Initiate camera motion from incoming CameraTrajectory.
Definition: rviz_animated_view_controller.cpp:656
rviz::Shape
rviz_animated_view_controller::AnimatedViewController::camera_view_image_publisher_
image_transport::Publisher camera_view_image_publisher_
Definition: rviz_animated_view_controller.h:380
rviz_animated_view_controller::AnimatedViewController::TRANSITION_LINEAR
@ TRANSITION_LINEAR
Definition: rviz_animated_view_controller.h:82
rviz_animated_view_controller::AnimatedViewController::attachedLocalToFixedFrame
Ogre::Vector3 attachedLocalToFixedFrame(const Ogre::Vector3 &v)
Definition: rviz_animated_view_controller.h:326
rviz_animated_view_controller::AnimatedViewController::pauseAnimationOnRequest
void pauseAnimationOnRequest()
Pauses the animation if pause_animation_duration_ is larger than zero.
Definition: rviz_animated_view_controller.cpp:826
rviz_animated_view_controller::AnimatedViewController::transition_start_time_
ros::WallTime transition_start_time_
Definition: rviz_animated_view_controller.h:366
rviz_animated_view_controller::AnimatedViewController::move_focus_and_eye
void move_focus_and_eye(float x, float y, float z)
Applies a translation to the focus and eye points.
Definition: rviz_animated_view_controller.cpp:981
rviz_animated_view_controller::AnimatedViewController::convertImage
void convertImage(std::shared_ptr< Ogre::PixelBox > input_image, sensor_msgs::ImagePtr output_image)
Definition: rviz_animated_view_controller.cpp:900
rviz_animated_view_controller::AnimatedViewController::fixedFrameToAttachedLocal
Ogre::Vector3 fixedFrameToAttachedLocal(const Ogre::Vector3 &v)
Definition: rviz_animated_view_controller.h:325
rviz::VectorProperty
rviz_animated_view_controller::AnimatedViewController::publish_view_images_property_
rviz::BoolProperty * publish_view_images_property_
If True, the camera view is published as images.
Definition: rviz_animated_view_controller.h:356
rviz_animated_view_controller::AnimatedViewController::computeRelativeProgressInSpace
float computeRelativeProgressInSpace(double relative_progress_in_time, uint8_t interpolation_speed)
Convert the relative progress in time to the corresponding relative progress in space wrt....
Definition: rviz_animated_view_controller.cpp:852
rviz_animated_view_controller::AnimatedViewController::connectPositionProperties
void connectPositionProperties()
Convenience function; connects the signals/slots for position properties.
Definition: rviz_animated_view_controller.cpp:239
rviz_animated_view_controller::AnimatedViewController::camera_placement_topic_property_
rviz::RosTopicProperty * camera_placement_topic_property_
Definition: rviz_animated_view_controller.h:350
ros::WallDuration
rviz_animated_view_controller::AnimatedViewController::prepareNextMovement
void prepareNextMovement(const ros::Duration &previous_transition_duration)
Updates the transition_start_time_ and resets the rendered_frames_counter_ for next movement.
Definition: rviz_animated_view_controller.cpp:919
rviz_animated_view_controller::AnimatedViewController::OgreCameraMovement
Definition: rviz_animated_view_controller.h:85
rviz_animated_view_controller::AnimatedViewController::initializeSubscribers
void initializeSubscribers()
Definition: rviz_animated_view_controller.cpp:185
rviz_animated_view_controller::AnimatedViewController::dragging_
bool dragging_
A flag indicating the dragging state of the mouse.
Definition: rviz_animated_view_controller.h:370
rviz_animated_view_controller
Definition: rviz_animated_view_controller.h:73
rviz_animated_view_controller::AnimatedViewController::updateAttachedFrame
virtual void updateAttachedFrame()
Called when Target Frame property changes while view is active. Purpose is to change values in the vi...
Definition: rviz_animated_view_controller.cpp:290
ros::Duration
rviz_animated_view_controller::AnimatedViewController::OgreCameraMovement::interpolation_speed
uint8_t interpolation_speed
Definition: rviz_animated_view_controller.h:107
rviz_animated_view_controller::AnimatedViewController::initializePublishers
void initializePublishers()
Definition: rviz_animated_view_controller.cpp:176
rviz_animated_view_controller::AnimatedViewController::publishViewImage
void publishViewImage()
Publish the rendered image that is visible to the user in rviz.
Definition: rviz_animated_view_controller.cpp:869
rviz_animated_view_controller::AnimatedViewController::TRANSITION_SPHERICAL
@ TRANSITION_SPHERICAL
Definition: rviz_animated_view_controller.h:83
rviz_animated_view_controller::AnimatedViewController::onInitialize
virtual void onInitialize()
Do subclass-specific initialization. Called by ViewController::initialize after context_ and camera_ ...
Definition: rviz_animated_view_controller.cpp:197
ros::NodeHandle
ros::Subscriber
rviz_animated_view_controller::AnimatedViewController::window_height_property_
rviz::FloatProperty * window_height_property_
The height of the rviz visualization window in pixels.
Definition: rviz_animated_view_controller.h:354


rviz_animated_view_controller
Author(s): Adam Leeper
autogenerated on Wed Mar 2 2022 01:03:32