point_pose_extractor.cpp
Go to the documentation of this file.
1 // -*- mode: c++ -*-
2 /*********************************************************************
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2015, JSK Lab
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of the JSK Lab nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  *********************************************************************/
36 #include <jsk_topic_tools/log_utils.h>
37 
38 namespace jsk_perception
39 {
41  _sub.shutdown();
42  _client.shutdown();
43  _pub.shutdown();
45  }
46 
48  std::string _pose_str;
49  double template_width;
50  double template_height;
51  std::string template_filename;
52  std::string window_name;
53 
54  pnh_->param("child_frame_id", _child_frame_id, std::string("matching"));
55  pnh_->param("object_width", template_width, 0.06);
56  pnh_->param("object_height", template_height, 0.0739);
57  pnh_->param("relative_pose", _pose_str, std::string("0 0 0 0 0 0 1"));
58  std::string default_template_file_name;
59  try {
60 #ifdef ROSPACK_EXPORT
62  rospack::Package *p = rp.get_pkg("jsk_perception");
63  if (p!=NULL) default_template_file_name = p->path + std::string("/sample/opencv-logo2.png");
64 #else
66  std::vector<std::string> search_path;
67  rp.getSearchPathFromEnv(search_path);
68  rp.crawl(search_path, 1);
69  std::string path;
70  if (rp.find("jsk_perception",path)==true) default_template_file_name = path + std::string("/sample/opencv-logo2.png");
71 #endif
72  } catch (std::runtime_error &e) {
73  }
74  pnh_->param("template_filename", template_filename, default_template_file_name);
75  pnh_->param("reprojection_threshold", _reprojection_threshold, 3.0);
76  pnh_->param("distanceratio_threshold", _distanceratio_threshold, 0.49);
77  pnh_->param("error_threshold", _err_thr, 50.0);
78  pnh_->param("theta_step", _th_step, 5.0);
79  pnh_->param("phi_step", _phi_step, 5.0);
80  pnh_->param("viewer_window", _viewer, true);
81  pnh_->param("window_name", window_name, std::string("sample1"));
82  pnh_->param("autosize", _autosize, false);
83  pnh_->param("publish_null_object_detection", pnod, false);
84  pnh_->param("publish_tf", _publish_tf, false);
85 
86  // make one template
87  cv::Mat template_img;
88  template_img = cv::imread (template_filename, 1);
89  if ( template_img.empty()) {
90  ROS_ERROR ("template picture <%s> cannot read. template picture is not found or uses unsuported format.", template_filename.c_str());
91  return;
92  }
93 
94  _first_sample_change = false;
95 
96  // relative pose
97  std::vector<double> rv(7);
98  std::istringstream iss(_pose_str);
100  for(int i=0; i<6; i++)
101  iss >> rv[i];
102 
103  if (iss.eof()) { // use rpy expression
104  transform = tf::Transform(tf::createQuaternionFromRPY(rv[3], rv[4], rv[5]),
105  tf::Vector3(rv[0], rv[1], rv[2]));
106  } else { // use quaternion expression
107  iss >> rv[6];
108  transform = tf::Transform(tf::Quaternion(rv[3], rv[4], rv[5], rv[6]),
109  tf::Vector3(rv[0], rv[1], rv[2]));
110  }
111 
112  // add the image to template list
113  add_new_template(template_img, window_name, transform,
114  template_width, template_height, _th_step, _phi_step);
115 
116  } // initialize
117 
118 
119  cv::Mat PointPoseExtractor::make_homography(cv::Mat src, cv::Mat rvec, cv::Mat tvec,
120  double template_width, double template_height, cv::Size &size){
121 
122  cv::Point3f coner[4] = {cv::Point3f(-(template_width/2.0), -(template_height/2.0),0),
123  cv::Point3f(template_width/2.0,-(template_height/2.0),0),
124  cv::Point3f(template_width/2.0,template_height/2.0,0),
125  cv::Point3f(-(template_width/2.0),template_height/2.0,0)};
126  cv::Mat coner_mat (cv::Size(4, 1), CV_32FC3, coner);
127  std::vector<cv::Point2f> coner_img_points;
128 
129  cv::Mat zero_distortion_mat = cv::Mat::zeros(4, 1, CV_64FC1);
130  cv::projectPoints(coner_mat, rvec, tvec,
132  zero_distortion_mat, // pcam.distortionCoeffs(),
133  coner_img_points);
134  float x_min = 10000, x_max = 0;
135  float y_min = 10000, y_max = 0;
136  for (int i = 0; i < (int)coner_img_points.size(); i++){
137  x_min = std::min(x_min, coner_img_points.at(i).x);
138  x_max = std::max(x_max, coner_img_points.at(i).x);
139  y_min = std::min(y_min, coner_img_points.at(i).y);
140  y_max = std::max(y_max, coner_img_points.at(i).y);
141  }
142 
143  std::vector<cv::Point2f> coner_img_points_trans;
144  for (int i = 0; i < (int)coner_img_points.size(); i++){
145  cv::Point2f pt_tmp(coner_img_points.at(i).x - x_min,
146  coner_img_points.at(i).y - y_min);
147  coner_img_points_trans.push_back(pt_tmp);
148  }
149 
150  cv::Point2f template_points[4] = {cv::Point2f(0,0),
151  cv::Point2f(src.size().width,0),
152  cv::Point2f(src.size().width,src.size().height),
153  cv::Point2f(0,src.size().height)};
154  cv::Mat template_points_mat (cv::Size(4, 1), CV_32FC2, template_points);
155 
156  size = cv::Size(x_max - x_min, y_max - y_min);
157  return cv::findHomography(template_points_mat, cv::Mat(coner_img_points_trans), 0, 3);
158  }
159 
160 
161  int PointPoseExtractor::make_warped_images (cv::Mat src, std::vector<cv::Mat> &imgs,
162  std::vector<cv:: Mat> &Mvec,
163  double template_width, double template_height,
164  double th_step, double phi_step){
165 
166  std::vector<cv::Size> sizevec;
167 
168  for (int i = (int)((-3.14/4.0)/th_step); i*th_step < 3.14/4.0; i++){
169  for (int j = (int)((-3.14/4.0)/phi_step); j*phi_step < 3.14/4.0; j++){
170  double fR3[3], fT3[3];
171  cv::Mat rvec(3, 1, CV_64FC1, fR3);
172  cv::Mat tvec(3, 1, CV_64FC1, fT3);
173 
174  tf::Quaternion quat;
175  quat.setEuler(0, th_step*i, phi_step*j);
176  fR3[0] = quat.getAxis().x() * quat.getAngle();
177  fR3[1] = quat.getAxis().y() * quat.getAngle();
178  fR3[2] = quat.getAxis().z() * quat.getAngle();
179  fT3[0] = 0;
180  fT3[1] = 0;
181  fT3[2] = 0.5;
182 
183  cv::Mat M;
184  cv::Size size;
185  M = make_homography(src, rvec, tvec, template_width, template_height, size);
186  //Whenever an H matrix cannot be estimated, cv::findHomography returns an empty one.
187  if(!M.empty()){
188  Mvec.push_back(M);
189  sizevec.push_back(size);
190  }
191  }
192  }
193  for (int i = 0; i < (int)Mvec.size(); i++){
194  cv::Mat dst;
195  cv::warpPerspective(src, dst, Mvec.at(i), sizevec.at(i),
196  CV_INTER_LINEAR, IPL_BORDER_CONSTANT, 0);
197  imgs.push_back(dst);
198  }
199  return 0;
200  }
201 
202  bool PointPoseExtractor::add_new_template(cv::Mat img, std::string typestr, tf::Transform relative_pose,
203  double template_width, double template_height,
204  double theta_step=5.0, double phi_step=5.0)
205  {
206  std::vector<cv::Mat> imgs;
207  std::vector<cv::Mat> Mvec;
208  make_warped_images(img, imgs, Mvec,
209  template_width, template_height, theta_step, phi_step);
210 
211  for (int i = 0; i < (int)imgs.size(); i++){
212  std::string type = typestr;
213  if(imgs.size() > 1) {
214  char chr[20];
215  sprintf(chr, "%d", i);
216  type += "_" + std::string(chr);
217  }
218 
219  Matching_Template * tmplt =
220  new Matching_Template(imgs.at(i), type,
221  img.size().width, img.size().height,
222  template_width, template_height,
223  relative_pose, Mvec.at(i),
226  (_viewer ? type : ""), _autosize);
227  _templates.push_back(tmplt);
228  if( _viewer )
229  {
230  cv::namedWindow(type, _autosize ? CV_WINDOW_AUTOSIZE : 0);
231  cvSetMouseCallback (type.c_str(), &cvmousecb, this);
232  }
233  }
234  return true;
235  }
236 
237  bool PointPoseExtractor::settemplate_cb (jsk_perception::SetTemplate::Request &req,
238  jsk_perception::SetTemplate::Response &res){
239  if ( !_initialized ) {
240  ROS_WARN("SetTemplate service is available only after receiving input ImageFeature0D");
241  return false;
242  }
243  cv_bridge::CvImagePtr cv_ptr;
244  cv_ptr = cv_bridge::toCvCopy(req.image, enc::BGR8);
245  cv::Mat img(cv_ptr->image);
246 
248  tf::poseMsgToTF(req.relativepose, transform);
249 
250  // add the image to template list
251  add_new_template(img, req.type, transform,
252  req.dimx, req.dimy, 1.0, 1.0);
253  return true;
254  }
255 
256 
257  void PointPoseExtractor::imagefeature_cb (const posedetection_msgs::ImageFeature0DConstPtr& msg){
258  std::vector<cv::KeyPoint> sourceimg_keypoints;
259  cv::Mat sourceimg_descriptors;
260  std::vector<posedetection_msgs::Object6DPose> vo6p;
261  posedetection_msgs::ObjectDetection od;
262 
263  cv_bridge::CvImagePtr cv_ptr;
264  cv_ptr = cv_bridge::toCvCopy(msg->image, enc::BGR8);
265  cv::Mat src_img(cv_ptr->image);
266 
267  // from ros messages to keypoint and pin hole camera model
268  features2keypoint (msg->features, sourceimg_keypoints, sourceimg_descriptors);
270  if ( cv::countNonZero(pcam.intrinsicMatrix()) == 0 ) {
271  ROS_FATAL("intrinsic matrix is zero, your camera info looks invalid");
272  }
273  if ( !_initialized ) {
274  // make template images from camera info
275  initialize();
276  std::cerr << "initialize templates done" << std::endl;
277  _initialized = true;
278  }
279 
280  if ( sourceimg_keypoints.size () < 2 ) {
281  ROS_INFO ("The number of keypoints in source image is less than 2");
282  }
283  else {
284  // make KDTree
285  cv::flann::Index *ft = new cv::flann::Index(sourceimg_descriptors, cv::flann::KDTreeIndexParams(1));
286 
287  // matching and detect object
288  ROS_INFO("_templates size: %d", (int)_templates.size());
289  for (int i = 0; i < (int)_templates.size(); i++){
290  posedetection_msgs::Object6DPose o6p;
291 
292  cv::Mat debug_img;
293  if (_templates.at(i)->estimate_od(_client, src_img, sourceimg_keypoints, pcam, _err_thr, debug_img, ft, &o6p))
294  vo6p.push_back(o6p);
295 
296  // for debug Image topic
297  cv_bridge::CvImage out_msg;
298  out_msg.header = msg->image.header;
299  out_msg.encoding = "bgr8";
300  out_msg.image = debug_img;
301  _debug_pub.publish(out_msg.toImageMsg());
302  }
303  delete ft;
304  if (((int)vo6p.size() != 0) || pnod) {
305  od.header.stamp = msg->image.header.stamp;
306  od.header.frame_id = msg->image.header.frame_id;
307  od.objects = vo6p;
308  _pub.publish(od);
309  _pub_agg.publish(od);
310  // Publish result as geometry_msgs/PoseStamped. But it can only contain one object
311  geometry_msgs::PoseStamped pose_msg;
312  pose_msg.header = od.header;
313  if ((int)vo6p.size() != 0) {
314  pose_msg.pose = od.objects[0].pose;
315  _pub_pose.publish(pose_msg);
316  }
317  // broadcast tf
318  if ( this->_publish_tf ) {
320  tf::poseMsgToTF(pose_msg.pose, transform);
323  transform,
324  msg->image.header.stamp,
325  msg->image.header.frame_id,
327  )
328  );
329  }
330  }
331  }
332  // BOOST_FOREACH(Matching_Template* mt, _templates) {
333  // std::cerr << "templates_ -> " << mt << std::endl;
334  // }
335  cv::waitKey( 10 );
336  }
337 
339  {
340  DiagnosticNodelet::onInit();
341  dynamic_reconfigure::Server<Config> server;
342  dynamic_reconfigure::Server<Config>::CallbackType f;
343  f = boost::bind(&PointPoseExtractor::dyn_conf_callback, this, _1, _2);
344  server.setCallback(f);
345 
346  it = new image_transport::ImageTransport(*pnh_);
347  // Use nh_ instead of pnh_ for backward compatibility.
348  // See https://github.com/jsk-ros-pkg/jsk_recognition/pull/2779 and
349  // https://github.com/jsk-ros-pkg/jsk_recognition/pull/2778
350  _client = nh_->serviceClient<posedetection_msgs::Feature0DDetect>("Feature0DDetect");
351  _pub = advertise<posedetection_msgs::ObjectDetection>(*nh_, "ObjectDetection", 10);
352  _pub_agg = advertise<posedetection_msgs::ObjectDetection>(*nh_, "ObjectDetection_agg", 10);
353  _pub_pose = advertise<geometry_msgs::PoseStamped>(*nh_, "object_pose", 10);
354  _debug_pub = it->advertise("debug_image", 1);
355  _server = nh_->advertiseService("SetTemplate", &PointPoseExtractor::settemplate_cb, this);
356  _initialized = false;
357 
358  onInitPostProcess();
359  }
360 
362  {
363  _sub = nh_->subscribe("ImageFeature0D", 1,
365  }
366 
368  {
369  _sub.shutdown();
370  }
371 
372  /* callback for dynamic reconfigure */
373  void PointPoseExtractor::dyn_conf_callback(Config &config,
374  uint32_t level) {
375  std::cout << "id = " << config.template_id << std::endl;
376  std::cout << "lvl = " << level << std::endl;
377  if((int)_templates.size() <= config.template_id) {
378  ROS_WARN("template_id is invalid");
379  config.template_id = 0;
380  if(_templates.size() != 0)
381  config.frame_id = _templates[0]->_matching_frame;
382  } else {
383  Matching_Template* tmpl = _templates[config.template_id];
384  if(config.frame_id == tmpl->_matching_frame) {
385  ROS_WARN("update params");
386  tmpl->_reprojection_threshold = config.reprojection_threshold;
387  tmpl->_distanceratio_threshold = config.distanceratio_threshold;
388  _err_thr = config.error_threshold;
389  } else {
390  ROS_WARN("get params");
391  config.frame_id = tmpl->_matching_frame;
392  config.reprojection_threshold = tmpl->_reprojection_threshold;
393  config.distanceratio_threshold = tmpl->_distanceratio_threshold;
394  config.error_threshold = _err_thr;
395  }
396  }
397  }
398 
399 }; // the end of definition of class PointPoseExtractor
400 
jsk_perception::PointPoseExtractor::_server
ros::ServiceServer _server
Definition: point_pose_extractor.h:567
PLUGINLIB_EXPORT_CLASS
PLUGINLIB_EXPORT_CLASS(jsk_perception::PointPoseExtractor, nodelet::Nodelet)
msg
msg
tf::TransformBroadcaster::sendTransform
void sendTransform(const geometry_msgs::TransformStamped &transform)
image_transport::ImageTransport
tf::poseMsgToTF
static void poseMsgToTF(const geometry_msgs::Pose &msg, Pose &bt)
jsk_perception::PointPoseExtractor::_err_thr
double _err_thr
Definition: point_pose_extractor.h:578
boost::shared_ptr< CvImage >
rospack::Rosstackage::getSearchPathFromEnv
bool getSearchPathFromEnv(std::vector< std::string > &sp)
jsk_perception::PointPoseExtractor::_debug_pub
image_transport::Publisher _debug_pub
Definition: point_pose_extractor.h:571
i
int i
jsk_perception::PointPoseExtractor::initialize
virtual void initialize()
Definition: point_pose_extractor.cpp:79
image_geometry::PinholeCameraModel::intrinsicMatrix
const cv::Matx33d & intrinsicMatrix() const
cv_bridge::CvImage::toImageMsg
sensor_msgs::ImagePtr toImageMsg() const
jsk_perception::PointPoseExtractor::make_warped_images
virtual int make_warped_images(cv::Mat src, std::vector< cv::Mat > &imgs, std::vector< cv::Mat > &Mvec, double template_width, double template_height, double th_step, double phi_step)
Definition: point_pose_extractor.cpp:193
jsk_perception::PointPoseExtractor::~PointPoseExtractor
virtual ~PointPoseExtractor()
Definition: point_pose_extractor.cpp:72
rospack::Rospack
ssd_train_dataset.int
int
Definition: ssd_train_dataset.py:175
jsk_perception::PointPoseExtractor::_pub_agg
ros::Publisher _pub_agg
Definition: point_pose_extractor.h:569
Matching_Template
Definition: point_pose_extractor.h:96
jsk_perception::PointPoseExtractor::_first_sample_change
bool _first_sample_change
Definition: point_pose_extractor.h:572
jsk_perception::PointPoseExtractor
Definition: point_pose_extractor.h:556
jsk_perception::PointPoseExtractor::_th_step
double _th_step
Definition: point_pose_extractor.h:575
rospack::Rosstackage::find
bool find(const std::string &name, std::string &path)
jsk_perception::PointPoseExtractor::pcam
image_geometry::PinholeCameraModel pcam
Definition: point_pose_extractor.h:579
ros::Subscriber::shutdown
void shutdown()
train_fcn_depth_prediction.transform
def transform(in_data)
Definition: train_fcn_depth_prediction.py:60
jsk_perception::PointPoseExtractor::_pub
ros::Publisher _pub
Definition: point_pose_extractor.h:569
jsk_perception::PointPoseExtractor::_templates
std::vector< Matching_Template * > _templates
Definition: point_pose_extractor.h:559
tf::StampedTransform
point_pose_extractor.h
jsk_perception::PointPoseExtractor::subscribe
virtual void subscribe()
Definition: point_pose_extractor.cpp:393
ros::Publisher::publish
void publish(const boost::shared_ptr< M > &message) const
Matching_Template::_reprojection_threshold
double _reprojection_threshold
Definition: point_pose_extractor.h:111
jsk_perception::PointPoseExtractor::dyn_conf_callback
virtual void dyn_conf_callback(Config &config, uint32_t level)
Definition: point_pose_extractor.cpp:405
jsk_perception::PointPoseExtractor::_publish_tf
bool _publish_tf
Definition: point_pose_extractor.h:583
jsk_perception::PointPoseExtractor::unsubscribe
virtual void unsubscribe()
Definition: point_pose_extractor.cpp:399
image_transport::ImageTransport::advertise
Publisher advertise(const std::string &base_topic, uint32_t queue_size, bool latch=false)
rospack::ROSPack
img
img
class_list_macros.h
rospack::Rosstackage::crawl
void crawl(std::vector< std::string > search_path, bool force)
jsk_perception
Definition: add_mask_image.h:48
image_geometry::PinholeCameraModel::fromCameraInfo
bool fromCameraInfo(const sensor_msgs::CameraInfo &msg)
jsk_perception::PointPoseExtractor::settemplate_cb
virtual bool settemplate_cb(jsk_perception::SetTemplate::Request &req, jsk_perception::SetTemplate::Response &res)
Definition: point_pose_extractor.cpp:269
ros::Publisher::shutdown
void shutdown()
tf::Quaternion::getAngle
tfScalar getAngle() const
cv_bridge::toCvCopy
CvImagePtr toCvCopy(const sensor_msgs::CompressedImage &source, const std::string &encoding=std::string())
cv_bridge::CvImage::header
std_msgs::Header header
jsk_perception::PointPoseExtractor::add_new_template
virtual bool add_new_template(cv::Mat img, std::string typestr, tf::Transform relative_pose, double template_width, double template_height, double theta_step, double phi_step)
Definition: point_pose_extractor.cpp:234
features2keypoint
void features2keypoint(posedetection_msgs::Feature0D features, std::vector< cv::KeyPoint > &keypoints, cv::Mat &descriptors)
Definition: point_pose_extractor.h:74
type
type
jsk_perception::PointPoseExtractor::_reprojection_threshold
double _reprojection_threshold
Definition: point_pose_extractor.h:573
rp
rospack::Rospack rp
jsk_perception::PointPoseExtractor::_viewer
bool _viewer
Definition: point_pose_extractor.h:582
jsk_perception::PointPoseExtractor::it
image_transport::ImageTransport * it
Definition: point_pose_extractor.h:565
jsk_perception::PointPoseExtractor::make_homography
virtual cv::Mat make_homography(cv::Mat src, cv::Mat rvec, cv::Mat tvec, double template_width, double template_height, cv::Size &size)
Definition: point_pose_extractor.cpp:151
ros::ServiceClient::shutdown
void shutdown()
ROS_WARN
#define ROS_WARN(...)
jsk_perception::PointPoseExtractor::_sub
ros::Subscriber _sub
Definition: point_pose_extractor.h:566
random_forest_client_sample.req
req
Definition: random_forest_client_sample.py:45
node_scripts.pointit.p
p
Definition: pointit.py:231
jsk_perception::PointPoseExtractor::onInit
virtual void onInit()
Definition: point_pose_extractor.cpp:370
tf::Transform
image_transport::Publisher::publish
void publish(const sensor_msgs::Image &message) const
jsk_perception::PointPoseExtractor::_initialized
bool _initialized
Definition: point_pose_extractor.h:581
ROS_FATAL
#define ROS_FATAL(...)
jsk_perception::PointPoseExtractor::_autosize
bool _autosize
Definition: point_pose_extractor.h:577
jsk_perception::PointPoseExtractor::imagefeature_cb
virtual void imagefeature_cb(const posedetection_msgs::ImageFeature0DConstPtr &msg)
Definition: point_pose_extractor.cpp:289
jsk_perception::PointPoseExtractor::_pub_pose
ros::Publisher _pub_pose
Definition: point_pose_extractor.h:569
jsk_perception::PointPoseExtractor::_phi_step
double _phi_step
Definition: point_pose_extractor.h:576
server
Definition: clip/server.py:1
f
f
nodelet::Nodelet
Matching_Template::_matching_frame
std::string _matching_frame
Definition: point_pose_extractor.h:99
jsk_perception::PointPoseExtractor::_distanceratio_threshold
double _distanceratio_threshold
Definition: point_pose_extractor.h:574
Matching_Template::_distanceratio_threshold
double _distanceratio_threshold
Definition: point_pose_extractor.h:113
cv_bridge::CvImage::encoding
std::string encoding
ROS_ERROR
#define ROS_ERROR(...)
cv_bridge::CvImage
jsk_perception::PointPoseExtractor::cvmousecb
static void cvmousecb(int event, int x, int y, int flags, void *param)
Definition: point_pose_extractor.h:604
tf::createQuaternionFromRPY
static tf::Quaternion createQuaternionFromRPY(double roll, double pitch, double yaw)
tf::Quaternion::setEuler
void setEuler(const tfScalar &yaw, const tfScalar &pitch, const tfScalar &roll)
tf::Quaternion::getAxis
Vector3 getAxis() const
jsk_perception::PointPoseExtractor::pnod
bool pnod
Definition: point_pose_extractor.h:580
jsk_perception::PointPoseExtractor::_client
ros::ServiceClient _client
Definition: point_pose_extractor.h:568
ROS_INFO
#define ROS_INFO(...)
config
config
cv_bridge::CvImage::image
cv::Mat image
jsk_perception::PointPoseExtractor::_br
tf::TransformBroadcaster _br
Definition: point_pose_extractor.h:570
tf::Quaternion
jsk_perception::PointPoseExtractor::_child_frame_id
std::string _child_frame_id
Definition: point_pose_extractor.h:584


jsk_perception
Author(s): Manabu Saito, Ryohei Ueda
autogenerated on Fri May 16 2025 03:11:17