Skip to content

jhu-dvrk/dvrk_virtual_camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dvrk_virtual_camera

dvrk_virtual_camera provides a ROS 2 virtual camera for dVRK models. The node renders an offscreen Ogre/RViz scene from robot descriptions and TF, then publishes a sensor_msgs/Image and matching sensor_msgs/CameraInfo.

The package assumes ROS 2 only.

Architecture

The virtual camera node runs independently of RViz. It uses the same Ogre/RViz rendering infrastructure, but it does not capture an existing RViz window.

Expected inputs:

  • TF for the dVRK model links
  • robot descriptions on topics such as:
    • /SUJ/robot_description
    • /ECM/robot_description
    • /PSM1/robot_description
    • /PSM2/robot_description
    • /PSM3/robot_description

Published outputs:

  • /ECM/virtual_camera/image_raw
  • /ECM/virtual_camera/camera_info

The launch file mounts a virtual camera frame to the ECM tip by publishing a static transform from parent_frame to camera_frame. By default:

  • parent_frame: ECM_end_link
  • camera_frame: ECM_virtual_camera
  • virtual camera view direction: +Z of camera_frame

Build

From the workspace root:

colcon build --packages-select dvrk_virtual_camera

Then source the workspace:

source install/setup.bash

Run

If the dVRK system, robot state publishers, TF, and robot description topics are already running:

ros2 launch dvrk_virtual_camera ecm_virtual_camera.launch.py

This starts the virtual camera node and image_view. To start only the node:

ros2 launch dvrk_virtual_camera ecm_virtual_camera.launch.py start_image_view:=false

To view the image manually:

ros2 run image_view image_view --ros-args -r image:=/ECM/virtual_camera/image_raw

Launch Arguments

  • width: image width in pixels, default 1280
  • height: image height in pixels, default 720
  • rate: image publication rate in Hz, default 15.0
  • fov_y: vertical field of view in radians, default 0.9
  • fixed_frame: fixed render frame, default world
  • parent_frame: frame the virtual camera is mounted to, default ECM_end_link
  • camera_frame: published virtual camera frame, default ECM_virtual_camera
  • image_topic: image output topic, default /ECM/virtual_camera/image_raw
  • camera_info_topic: camera info output topic, default /ECM/virtual_camera/camera_info
  • camera_x, camera_y, camera_z: camera offset from parent_frame, in meters
  • camera_roll, camera_pitch, camera_yaw: camera orientation from parent_frame, in radians
  • start_image_view: start image_view, default true

Notes

The renderer needs a working OpenGL/display context, even though RViz itself does not need to be running.

At the moment, the node renders geometry loaded from the configured robot description topics. It does not render arbitrary RViz displays such as markers, point clouds, or overlays from another RViz session.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors