Skip to content

Class robot_dart::gui::magnum::sensor::Camera

ClassList > robot_dart > gui > magnum > sensor > Camera

Inherits the following classes: robot_dart::sensor::Sensor

Public Functions

Type Name
Camera (BaseApplication * app, size_t width, size_t height, size_t freq=30, bool draw_debug=false)
virtual void attach_to_body (dart::dynamics::BodyNode * body, const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity()) override
virtual void attach_to_joint (dart::dynamics::Joint *, const Eigen::Isometry3d &) override
virtual void calculate (double) override
gs::Camera & camera ()
const gs::Camera & camera () const
Eigen::Matrix4d camera_extrinsic_matrix () const
Eigen::Matrix3d camera_intrinsic_matrix () const
DepthImage depth_array ()
GrayscaleImage depth_image ()
void draw_debug (bool draw=true)
bool drawing_debug () const
Image image ()
virtual void init () override
void look_at (const Eigen::Vector3d & camera_pos, const Eigen::Vector3d & look_at=Eigen::Vector3d(0, 0, 0), const Eigen::Vector3d & up=Eigen::Vector3d(0, 0, 1))
Magnum::Image2D * magnum_depth_image ()
Magnum::Image2D * magnum_image ()
GrayscaleImage raw_depth_image ()
void record_video (const std::string & video_fname)
virtual std::string type () override const
~Camera ()

Public Functions inherited from robot_dart::sensor::Sensor

See robot_dart::sensor::Sensor

Type Name
Sensor (size_t freq=40)
void activate (bool enable=true)
bool active () const
virtual void attach_to_body (dart::dynamics::BodyNode * body, const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity())
void attach_to_body (const std::shared_ptr< Robot > & robot, const std::string & body_name, const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity())
virtual void attach_to_joint (dart::dynamics::Joint * joint, const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity())
void attach_to_joint (const std::shared_ptr< Robot > & robot, const std::string & joint_name, const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity())
const std::string & attached_to () const
virtual void calculate (double) = 0
void detach ()
size_t frequency () const
virtual void init () = 0
const Eigen::Isometry3d & pose () const
void refresh (double t)
void set_frequency (size_t freq)
void set_pose (const Eigen::Isometry3d & tf)
void set_simu (RobotDARTSimu * simu)
const RobotDARTSimu * simu () const
virtual std::string type () const = 0
virtual ~Sensor ()

Protected Attributes

Type Name
std::unique_ptr< gs::Camera > _camera
Magnum::GL::Renderbuffer _color
Magnum::GL::Renderbuffer _depth
bool _draw_debug
Magnum::PixelFormat _format
Magnum::GL::Framebuffer _framebuffer = {Magnum::NoCreate}
size_t _height
BaseApplication * _magnum_app
size_t _width

Protected Attributes inherited from robot_dart::sensor::Sensor

See robot_dart::sensor::Sensor

Type Name
bool _active
Eigen::Isometry3d _attached_tf
bool _attached_to_body = = false
bool _attached_to_joint = = false
bool _attaching_to_body = = false
bool _attaching_to_joint = = false
dart::dynamics::BodyNode * _body_attached
size_t _frequency
dart::dynamics::Joint * _joint_attached
RobotDARTSimu * _simu = = nullptr
Eigen::Isometry3d _world_pose

Public Functions Documentation

function Camera

robot_dart::gui::magnum::sensor::Camera::Camera (
    BaseApplication * app,
    size_t width,
    size_t height,
    size_t freq=30,
    bool draw_debug=false
) 

function attach_to_body

virtual void robot_dart::gui::magnum::sensor::Camera::attach_to_body (
    dart::dynamics::BodyNode * body,
    const Eigen::Isometry3d & tf=Eigen::Isometry3d::Identity()
) override

Implements robot_dart::sensor::Sensor::attach_to_body


function attach_to_joint

inline virtual void robot_dart::gui::magnum::sensor::Camera::attach_to_joint (
    dart::dynamics::Joint *,
    const Eigen::Isometry3d &
) override

Implements robot_dart::sensor::Sensor::attach_to_joint


function calculate

virtual void robot_dart::gui::magnum::sensor::Camera::calculate (
    double
) override

Implements robot_dart::sensor::Sensor::calculate


function camera [½]

inline gs::Camera & robot_dart::gui::magnum::sensor::Camera::camera () 

function camera [2/2]

inline const gs::Camera & robot_dart::gui::magnum::sensor::Camera::camera () const

function camera_extrinsic_matrix

Eigen::Matrix4d robot_dart::gui::magnum::sensor::Camera::camera_extrinsic_matrix () const

function camera_intrinsic_matrix

Eigen::Matrix3d robot_dart::gui::magnum::sensor::Camera::camera_intrinsic_matrix () const

function depth_array

DepthImage robot_dart::gui::magnum::sensor::Camera::depth_array () 

function depth_image

GrayscaleImage robot_dart::gui::magnum::sensor::Camera::depth_image () 

function draw_debug

inline void robot_dart::gui::magnum::sensor::Camera::draw_debug (
    bool draw=true
) 

function drawing_debug

inline bool robot_dart::gui::magnum::sensor::Camera::drawing_debug () const

function image

inline Image robot_dart::gui::magnum::sensor::Camera::image () 

function init

virtual void robot_dart::gui::magnum::sensor::Camera::init () override

Implements robot_dart::sensor::Sensor::init


function look_at

void robot_dart::gui::magnum::sensor::Camera::look_at (
    const Eigen::Vector3d & camera_pos,
    const Eigen::Vector3d & look_at=Eigen::Vector3d(0, 0, 0),
    const Eigen::Vector3d & up=Eigen::Vector3d(0, 0, 1)
) 

function magnum_depth_image

inline Magnum::Image2D * robot_dart::gui::magnum::sensor::Camera::magnum_depth_image () 

function magnum_image

inline Magnum::Image2D * robot_dart::gui::magnum::sensor::Camera::magnum_image () 

function raw_depth_image

GrayscaleImage robot_dart::gui::magnum::sensor::Camera::raw_depth_image () 

function record_video

inline void robot_dart::gui::magnum::sensor::Camera::record_video (
    const std::string & video_fname
) 

function type

virtual std::string robot_dart::gui::magnum::sensor::Camera::type () override const

Implements robot_dart::sensor::Sensor::type


function ~Camera

inline robot_dart::gui::magnum::sensor::Camera::~Camera () 

Protected Attributes Documentation

variable _camera

std::unique_ptr<gs::Camera> robot_dart::gui::magnum::sensor::Camera::_camera;

variable _color

Magnum::GL::Renderbuffer robot_dart::gui::magnum::sensor::Camera::_color;

variable _depth

Magnum::GL::Renderbuffer robot_dart::gui::magnum::sensor::Camera::_depth;

variable _draw_debug

bool robot_dart::gui::magnum::sensor::Camera::_draw_debug;

variable _format

Magnum::PixelFormat robot_dart::gui::magnum::sensor::Camera::_format;

variable _framebuffer

Magnum::GL::Framebuffer robot_dart::gui::magnum::sensor::Camera::_framebuffer;

variable _height

size_t robot_dart::gui::magnum::sensor::Camera::_height;

variable _magnum_app

BaseApplication* robot_dart::gui::magnum::sensor::Camera::_magnum_app;

variable _width

size_t robot_dart::gui::magnum::sensor::Camera::_width;


The documentation for this class was generated from the following file robot_dart/gui/magnum/sensor/camera.hpp