#include <gazebo_ros_camera_utils.h>
Public Member Functions | |
GazeboRosCameraUtils () | |
Constructor. | |
void | Load (sensors::SensorPtr _parent, sdf::ElementPtr _sdf) |
Load the plugin. | |
~GazeboRosCameraUtils () | |
Destructor. | |
Protected Member Functions | |
void | CameraQueueThread () |
void | ImageConnect () |
void | ImageDisconnect () |
void | PublishCameraInfo (ros::Publisher camera_info_publisher) |
Publish CameraInfo to the ROS topic. | |
void | PublishCameraInfo (common::Time &last_update_time) |
void | PublishCameraInfo () |
void | PutCameraData (const unsigned char *_src) |
Put camera data to the ROS topic. | |
void | PutCameraData (const unsigned char *_src, common::Time &last_update_time) |
Protected Attributes | |
boost::thread | callback_queue_thread_ |
rendering::CameraPtr | camera_ |
ros::Publisher | camera_info_pub_ |
camera info | |
std::string | camera_info_topic_name_ |
ros::CallbackQueue | camera_queue_ |
double | cx_ |
double | cx_prime_ |
double | cy_ |
unsigned int | depth_ |
double | distortion_k1_ |
double | distortion_k2_ |
double | distortion_k3_ |
double | distortion_t1_ |
double | distortion_t2_ |
double | focal_length_ |
std::string | format_ |
std::string | frame_name_ |
ROS frame transform name to use in the image message header. This should typically match the link name the sensor is attached. | |
double | hack_baseline_ |
unsigned int | height_ |
int | image_connect_count_ |
Keep track of number of connctions. | |
sensor_msgs::Image | image_msg_ |
ROS image message. | |
image_transport::Publisher | image_pub_ |
std::string | image_topic_name_ |
ROS image topic name. | |
int | imageConnectCount |
int | info_connect_count_ |
Keep track of number of connctions for CameraInfo. | |
int | infoConnectCount |
common::Time | last_info_update_time_ |
common::Time | last_update_time_ |
boost::mutex | lock_ |
A mutex to lock access to fields that are used in ROS message callbacks. | |
sensors::SensorPtr | parentSensor_ |
ros::NodeHandle * | rosnode_ |
A pointer to the ROS node. A node will be instantiated if it does not exist. | |
common::Time | sensor_update_time_ |
int | skip_ |
std::string | type_ |
size of image buffer | |
double | update_period_ |
double | update_rate_ |
update rate of this sensor | |
unsigned int | width_ |
physics::WorldPtr | world |
physics::WorldPtr | world_ |
Private Member Functions | |
void | configCallback (gazebo_plugins::GazeboRosCameraConfig &config, uint32_t level) |
void | InfoConnect () |
void | InfoDisconnect () |
void | Init () |
void | SetHFOV (const std_msgs::Float64::ConstPtr &hfov) |
: Camera modification functions | |
void | SetUpdateRate (const std_msgs::Float64::ConstPtr &update_rate) |
Private Attributes | |
std::string | camera_name_ |
ROS camera name. | |
ros::Subscriber | cameraHFOVSubscriber_ |
ros::Subscriber | cameraUpdateRateSubscriber_ |
dynamic_reconfigure::Server < gazebo_plugins::GazeboRosCameraConfig > * | dyn_srv_ |
image_transport::ImageTransport * | itnode_ |
event::ConnectionPtr | newFrameConnection_ |
std::string | robot_namespace_ |
for setting ROS name space |
Definition at line 64 of file gazebo_ros_camera_utils.h.
Constructor.
parent | The parent entity, must be a Model or a Sensor |
Definition at line 62 of file gazebo_ros_camera_utils.cpp.
Destructor.
Definition at line 83 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::CameraQueueThread | ( | ) | [protected] |
publish CameraInfo
take care of callback queue
Definition at line 550 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::configCallback | ( | gazebo_plugins::GazeboRosCameraConfig & | config, |
uint32_t | level | ||
) | [private] |
Definition at line 75 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::ImageConnect | ( | ) | [protected] |
Definition at line 318 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::ImageDisconnect | ( | ) | [protected] |
Definition at line 327 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::InfoConnect | ( | ) | [private] |
Reimplemented in gazebo::GazeboRosDepthCamera.
Definition at line 287 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::InfoDisconnect | ( | ) | [private] |
Reimplemented in gazebo::GazeboRosDepthCamera.
Definition at line 295 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::Init | ( | void | ) | [private] |
Compute camera_ parameters if set to 0
Definition at line 338 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::Load | ( | sensors::SensorPtr | _parent, |
sdf::ElementPtr | _sdf | ||
) |
Load the plugin.
take | in SDF root element |
Reimplemented in gazebo::GazeboRosDepthCamera, gazebo::GazeboRosOpenniKinect, and gazebo::GazeboRosCamera.
Definition at line 95 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::PublishCameraInfo | ( | ros::Publisher | camera_info_publisher | ) | [protected] |
Publish CameraInfo to the ROS topic.
Definition at line 490 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::PublishCameraInfo | ( | common::Time & | last_update_time | ) | [protected] |
Definition at line 470 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::PublishCameraInfo | ( | ) | [protected] |
Reimplemented in gazebo::GazeboRosOpenniKinect, and gazebo::GazeboRosDepthCamera.
Definition at line 476 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::PutCameraData | ( | const unsigned char * | _src | ) | [protected] |
Put camera data to the ROS topic.
don't bother if there are no subscribers
Definition at line 439 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::PutCameraData | ( | const unsigned char * | _src, |
common::Time & | last_update_time | ||
) | [protected] |
Definition at line 433 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::SetHFOV | ( | const std_msgs::Float64::ConstPtr & | hfov | ) | [private] |
: Camera modification functions
Definition at line 304 of file gazebo_ros_camera_utils.cpp.
void gazebo::GazeboRosCameraUtils::SetUpdateRate | ( | const std_msgs::Float64::ConstPtr & | update_rate | ) | [private] |
Definition at line 311 of file gazebo_ros_camera_utils.cpp.
boost::thread gazebo::GazeboRosCameraUtils::callback_queue_thread_ [protected] |
Definition at line 159 of file gazebo_ros_camera_utils.h.
rendering::CameraPtr gazebo::GazeboRosCameraUtils::camera_ [protected] |
Definition at line 167 of file gazebo_ros_camera_utils.h.
camera info
Definition at line 118 of file gazebo_ros_camera_utils.h.
std::string gazebo::GazeboRosCameraUtils::camera_info_topic_name_ [protected] |
Definition at line 119 of file gazebo_ros_camera_utils.h.
std::string gazebo::GazeboRosCameraUtils::camera_name_ [private] |
ROS camera name.
Definition at line 104 of file gazebo_ros_camera_utils.h.
Definition at line 157 of file gazebo_ros_camera_utils.h.
Definition at line 148 of file gazebo_ros_camera_utils.h.
Definition at line 149 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::cx_ [protected] |
Definition at line 131 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::cx_prime_ [protected] |
Definition at line 130 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::cy_ [protected] |
Definition at line 132 of file gazebo_ros_camera_utils.h.
unsigned int gazebo::GazeboRosCameraUtils::depth_ [protected] |
Definition at line 163 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::distortion_k1_ [protected] |
Definition at line 135 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::distortion_k2_ [protected] |
Definition at line 136 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::distortion_k3_ [protected] |
Definition at line 137 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::distortion_t1_ [protected] |
Definition at line 138 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::distortion_t2_ [protected] |
Definition at line 139 of file gazebo_ros_camera_utils.h.
dynamic_reconfigure::Server<gazebo_plugins::GazeboRosCameraConfig>* gazebo::GazeboRosCameraUtils::dyn_srv_ [private] |
Definition at line 153 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::focal_length_ [protected] |
Definition at line 133 of file gazebo_ros_camera_utils.h.
std::string gazebo::GazeboRosCameraUtils::format_ [protected] |
Definition at line 164 of file gazebo_ros_camera_utils.h.
std::string gazebo::GazeboRosCameraUtils::frame_name_ [protected] |
ROS frame transform name to use in the image message header. This should typically match the link name the sensor is attached.
Definition at line 124 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::hack_baseline_ [protected] |
Definition at line 134 of file gazebo_ros_camera_utils.h.
unsigned int gazebo::GazeboRosCameraUtils::height_ [protected] |
Definition at line 163 of file gazebo_ros_camera_utils.h.
int gazebo::GazeboRosCameraUtils::image_connect_count_ [protected] |
Keep track of number of connctions.
Definition at line 84 of file gazebo_ros_camera_utils.h.
sensor_msgs::Image gazebo::GazeboRosCameraUtils::image_msg_ [protected] |
ROS image message.
Definition at line 98 of file gazebo_ros_camera_utils.h.
Definition at line 94 of file gazebo_ros_camera_utils.h.
std::string gazebo::GazeboRosCameraUtils::image_topic_name_ [protected] |
ROS image topic name.
Definition at line 107 of file gazebo_ros_camera_utils.h.
int gazebo::GazeboRosCameraUtils::imageConnectCount [protected] |
Definition at line 177 of file gazebo_ros_camera_utils.h.
int gazebo::GazeboRosCameraUtils::info_connect_count_ [protected] |
Keep track of number of connctions for CameraInfo.
Definition at line 114 of file gazebo_ros_camera_utils.h.
int gazebo::GazeboRosCameraUtils::infoConnectCount [protected] |
Definition at line 178 of file gazebo_ros_camera_utils.h.
Definition at line 95 of file gazebo_ros_camera_utils.h.
common::Time gazebo::GazeboRosCameraUtils::last_info_update_time_ [protected] |
Definition at line 120 of file gazebo_ros_camera_utils.h.
common::Time gazebo::GazeboRosCameraUtils::last_update_time_ [protected] |
Definition at line 128 of file gazebo_ros_camera_utils.h.
boost::mutex gazebo::GazeboRosCameraUtils::lock_ [protected] |
A mutex to lock access to fields that are used in ROS message callbacks.
Definition at line 142 of file gazebo_ros_camera_utils.h.
Definition at line 172 of file gazebo_ros_camera_utils.h.
sensors::SensorPtr gazebo::GazeboRosCameraUtils::parentSensor_ [protected] |
Definition at line 166 of file gazebo_ros_camera_utils.h.
std::string gazebo::GazeboRosCameraUtils::robot_namespace_ [private] |
for setting ROS name space
Definition at line 101 of file gazebo_ros_camera_utils.h.
ros::NodeHandle* gazebo::GazeboRosCameraUtils::rosnode_ [protected] |
A pointer to the ROS node. A node will be instantiated if it does not exist.
Definition at line 93 of file gazebo_ros_camera_utils.h.
common::Time gazebo::GazeboRosCameraUtils::sensor_update_time_ [protected] |
Definition at line 174 of file gazebo_ros_camera_utils.h.
int gazebo::GazeboRosCameraUtils::skip_ [protected] |
Definition at line 146 of file gazebo_ros_camera_utils.h.
std::string gazebo::GazeboRosCameraUtils::type_ [protected] |
size of image buffer
Definition at line 145 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::update_period_ [protected] |
Definition at line 127 of file gazebo_ros_camera_utils.h.
double gazebo::GazeboRosCameraUtils::update_rate_ [protected] |
update rate of this sensor
Definition at line 126 of file gazebo_ros_camera_utils.h.
unsigned int gazebo::GazeboRosCameraUtils::width_ [protected] |
Definition at line 163 of file gazebo_ros_camera_utils.h.
physics::WorldPtr gazebo::GazeboRosCameraUtils::world [protected] |
Definition at line 179 of file gazebo_ros_camera_utils.h.
physics::WorldPtr gazebo::GazeboRosCameraUtils::world_ [protected] |
Definition at line 170 of file gazebo_ros_camera_utils.h.