29 #include <QApplication> 32 #include <std_srvs/Empty.h> 33 #include <std_msgs/Empty.h> 34 #include <std_msgs/Int32MultiArray.h> 40 #include <opencv2/highgui/highgui.hpp> 53 #include "rtabmap_ros/GetMap.h" 54 #include "rtabmap_ros/SetGoal.h" 55 #include "rtabmap_ros/SetLabel.h" 56 #include "rtabmap_ros/RemoveLabel.h" 59 float max3(
const float& a,
const float& b,
const float& c)
70 frameId_(
"base_link"),
72 waitForTransform_(
true),
73 waitForTransformDuration_(0.2),
74 odomSensorSync_(
false),
75 maxOdomUpdateRate_(10),
77 lastOdomInfoUpdateTime_(0),
78 rtabmapNodeName_(
"rtabmap")
83 QString configFile = QDir::homePath()+
"/.ros/rtabmapGUI.ini";
84 for(
int i=1; i<argc; ++i)
86 if(strcmp(argv[i],
"-d") == 0)
97 configFile.replace(
'~', QDir::homePath());
101 ROS_INFO(
"rtabmapviz: Using configuration from \"%s\"", configFile.toStdString().c_str());
110 rnh.
param(
"is_rtabmap_paused", paused, paused);
114 std::string initCachePath;
122 pnh.
param(
"init_cache_path", initCachePath, initCachePath);
123 if(initCachePath.size())
126 if(initCachePath.at(0) !=
'/')
130 ROS_INFO(
"rtabmapviz: Initializing cache with local database \"%s\"", initCachePath.c_str());
133 getMapSrv.request.global =
false;
134 getMapSrv.request.optimized =
true;
135 getMapSrv.request.graphOnly =
true;
138 ROS_WARN(
"Can't call \"get_map\" service. The cache will still be loaded " 139 "but the clouds won't be created until next time rtabmapviz " 140 "receives the optimized graph.");
147 QMetaObject::invokeMethod(
mainWindow_,
"updateCacheFromDatabase", Q_ARG(QString, QString(initCachePath.c_str())));
152 ROS_ERROR(
"tf_prefix parameter has been removed, use directly odom_frame_id and frame_id parameters.");
189 const rtabmap_ros::InfoConstPtr & infoMsg,
190 const rtabmap_ros::MapDataConstPtr & mapMsg)
202 std::map<int, rtabmap::Transform> poses;
203 std::map<int, Signature> signatures;
204 std::multimap<int, rtabmap::Link> links;
217 const rtabmap_ros::GoalConstPtr & goalMsg,
218 const nav_msgs::PathConstPtr & pathMsg)
221 std::vector<std::pair<int, Transform> > poses(pathMsg->poses.size());
222 for(
unsigned int i=0; i<pathMsg->poses.size(); ++i)
224 poses[i].first = -int(i)-1;
231 const std_msgs::BoolConstPtr & value)
244 std::map<int, Signature> signatures;
245 std::map<int, Transform> poses;
246 std::multimap<int, rtabmap::Link> constraints;
263 bool modified =
false;
265 for(rtabmap::ParametersMap::iterator i=parameters.begin(); i!=parameters.end(); ++i)
268 if(defaultParameters.find((*i).first) != defaultParameters.end())
270 rnh.
setParam((*i).first, (*i).second);
273 else if((*i).first.find(
'/') != (*i).first.npos)
275 ROS_WARN(
"Parameter %s is not used by the rtabmap node.", (*i).first.c_str());
284 ROS_ERROR(
"Can't call \"update_parameters\" service");
288 else if(anEvent->
getClassName().compare(
"RtabmapEventCmd") == 0)
290 std_srvs::Empty emptySrv;
297 ROS_ERROR(
"Can't call \"reset\" service");
305 std::string str =
uFormat(
"rosrun dynamic_reconfigure dynparam set %s pause true",
cameraNodeName_.c_str());
306 if(system(str.c_str()) !=0)
308 ROS_ERROR(
"Command \"%s\" returned non zero value.", str.c_str());
316 if(!ros::service::call(
"pause", emptySrv))
318 ROS_ERROR(
"Can't call \"pause\" service");
326 ROS_ERROR(
"Can't call \"resume\" service");
335 std::string str =
uFormat(
"rosrun dynamic_reconfigure dynparam set %s pause false",
cameraNodeName_.c_str());
336 if(system(str.c_str()) !=0)
338 ROS_ERROR(
"Command \"%s\" returned non zero value.", str.c_str());
346 ROS_ERROR(
"Can't call \"trigger_new_map\" service");
357 getMapSrv.request.optimized = cmdEvent->
value2().
toBool();
358 getMapSrv.request.graphOnly = cmdEvent->
value3().
toBool();
361 ROS_WARN(
"Can't call \"get_map_data\" service");
372 rtabmap_ros::SetGoal setGoalSrv;
377 ROS_ERROR(
"Can't call \"set_goal\" service");
381 UASSERT(setGoalSrv.response.path_ids.size() == setGoalSrv.response.path_poses.size());
382 std::vector<std::pair<int, Transform> > poses(setGoalSrv.response.path_poses.size());
383 for(
unsigned int i=0; i<setGoalSrv.response.path_poses.size(); ++i)
385 poses[i].first = setGoalSrv.response.path_ids[i];
388 this->
post(
new RtabmapGlobalPathEvent(setGoalSrv.request.node_id, setGoalSrv.request.node_label, poses, setGoalSrv.response.planning_time));
395 ROS_ERROR(
"Can't call \"cancel_goal\" service");
402 rtabmap_ros::SetLabel setLabelSrv;
403 setLabelSrv.request.node_label = cmdEvent->
value1().
toStr();
407 ROS_ERROR(
"Can't call \"set_label\" service");
413 rtabmap_ros::RemoveLabel removeLabelSrv;
414 removeLabelSrv.request.label = cmdEvent->
value1().
toStr();
417 ROS_ERROR(
"Can't call \"remove_label\" service");
423 std_msgs::Int32MultiArray msg;
429 ROS_WARN(
"Not handled command (%d)...", cmd);
432 else if(anEvent->
getClassName().compare(
"OdometryResetEvent") == 0)
437 ROS_ERROR(
"Can't call \"reset_odom\" service, (will only work with rtabmap/visual_odometry node.)");
444 const nav_msgs::OdometryConstPtr & odomMsg,
445 const rtabmap_ros::UserDataConstPtr & userDataMsg,
446 const std::vector<cv_bridge::CvImageConstPtr> & imageMsgs,
447 const std::vector<cv_bridge::CvImageConstPtr> & depthMsgs,
448 const std::vector<sensor_msgs::CameraInfo> & cameraInfoMsgs,
449 const std::vector<sensor_msgs::CameraInfo> & depthCameraInfoMsgs,
450 const sensor_msgs::LaserScan& scan2dMsg,
451 const sensor_msgs::PointCloud2& scan3dMsg,
452 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg,
453 const std::vector<rtabmap_ros::GlobalDescriptor> & globalDescriptorMsgs,
454 const std::vector<std::vector<rtabmap_ros::KeyPoint> > & localKeyPoints,
455 const std::vector<std::vector<rtabmap_ros::Point3f> > & localPoints3d,
456 const std::vector<cv::Mat> & localDescriptors)
458 UASSERT(imageMsgs.size() == 0 || (imageMsgs.size() == cameraInfoMsgs.size()));
460 std_msgs::Header odomHeader;
464 odomHeader = odomMsg->header;
465 if(!odomMsg->child_frame_id.empty())
467 frameId = odomMsg->child_frame_id;
471 ROS_WARN(
"Received odom topic with child_frame_id not set! Using \"%s\" as base frame.",
frameId_.c_str());
476 if(!scan2dMsg.ranges.empty())
478 odomHeader = scan2dMsg.header;
480 else if(!scan3dMsg.data.empty())
482 odomHeader = scan3dMsg.header;
484 else if(cameraInfoMsgs.size())
486 odomHeader = cameraInfoMsgs[0].header;
488 else if(depthMsgs.size() && depthMsgs[0].get())
490 odomHeader = depthMsgs[0]->header;
492 else if(imageMsgs.size() && imageMsgs[0].get())
494 odomHeader = imageMsgs[0]->header;
500 cv::Mat
covariance = cv::Mat::eye(6,6,CV_64FC1);
503 UASSERT(odomMsg->twist.covariance.size() == 36);
504 if(odomMsg->twist.covariance[0] != 0 &&
505 odomMsg->twist.covariance[7] != 0 &&
506 odomMsg->twist.covariance[14] != 0 &&
507 odomMsg->twist.covariance[21] != 0 &&
508 odomMsg->twist.covariance[28] != 0 &&
509 odomMsg->twist.covariance[35] != 0)
511 covariance = cv::Mat(6,6,CV_64FC1,(
void*)odomMsg->twist.covariance.data()).clone();
514 else if(odomInfoMsg.get() && odomInfoMsg->covariance.size() == 36)
516 if(odomInfoMsg->covariance[0] != 0 &&
517 odomInfoMsg->covariance[7] != 0 &&
518 odomInfoMsg->covariance[14] != 0 &&
519 odomInfoMsg->covariance[21] != 0 &&
520 odomInfoMsg->covariance[28] != 0 &&
521 odomInfoMsg->covariance[35] != 0)
523 covariance = cv::Mat(6,6,CV_64FC1,(
void*)odomInfoMsg->covariance.data()).clone();
526 if(odomHeader.frame_id.empty())
534 std::vector<rtabmap::CameraModel> cameraModels;
535 std::vector<rtabmap::StereoCameraModel> stereoCameraModels;
538 bool ignoreData =
false;
548 if(imageMsgs.size() && imageMsgs[0].get() && depthMsgs.size() && depthMsgs[0].get())
551 bool imagesAlreadyRectified = Parameters::defaultRtabmapImagesAlreadyRectified();
552 Parameters::parse(allParameters, Parameters::kRtabmapImagesAlreadyRectified(), imagesAlreadyRectified);
568 imagesAlreadyRectified))
570 ROS_ERROR(
"Could not convert rgb/depth msgs! Aborting rtabmapviz update...");
575 if(!scan2dMsg.ranges.empty())
586 ROS_ERROR(
"Could not convert laser scan msg! Aborting rtabmapviz update...");
590 else if(!scan3dMsg.data.empty())
601 ROS_ERROR(
"Could not convert 3d laser scan msg! Aborting rtabmapviz update...");
606 if(odomInfoMsg.get())
612 else if(odomInfoMsg.get())
625 !stereoCameraModels.empty()?
647 const nav_msgs::OdometryConstPtr & odomMsg,
648 const rtabmap_ros::UserDataConstPtr & userDataMsg,
651 const sensor_msgs::CameraInfo& leftCamInfoMsg,
652 const sensor_msgs::CameraInfo& rightCamInfoMsg,
653 const sensor_msgs::LaserScan& scan2dMsg,
654 const sensor_msgs::PointCloud2& scan3dMsg,
655 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg,
656 const std::vector<rtabmap_ros::GlobalDescriptor> & globalDescriptorMsgs,
657 const std::vector<rtabmap_ros::KeyPoint> & localKeyPoints,
658 const std::vector<rtabmap_ros::Point3f> & localPoints3d,
659 const cv::Mat & localDescriptors)
661 std_msgs::Header odomHeader;
665 odomHeader = odomMsg->header;
666 if(!odomMsg->child_frame_id.empty())
668 frameId = odomMsg->child_frame_id;
672 ROS_WARN(
"Received odom topic with child_frame_id not set! Using \"%s\" as base frame.",
frameId_.c_str());
677 if(!scan2dMsg.ranges.empty())
679 odomHeader = scan2dMsg.header;
681 else if(!scan3dMsg.data.empty())
683 odomHeader = scan3dMsg.header;
687 odomHeader = leftCamInfoMsg.header;
693 cv::Mat
covariance = cv::Mat::eye(6,6,CV_64FC1);
696 UASSERT(odomMsg->twist.covariance.size() == 36);
697 if(odomMsg->twist.covariance[0] != 0 &&
698 odomMsg->twist.covariance[7] != 0 &&
699 odomMsg->twist.covariance[14] != 0 &&
700 odomMsg->twist.covariance[21] != 0 &&
701 odomMsg->twist.covariance[28] != 0 &&
702 odomMsg->twist.covariance[35] != 0)
704 covariance = cv::Mat(6,6,CV_64FC1,(
void*)odomMsg->twist.covariance.data()).clone();
707 else if(odomInfoMsg.get() && odomInfoMsg->covariance.size() == 36)
709 if(odomInfoMsg->covariance[0] != 0 &&
710 odomInfoMsg->covariance[7] != 0 &&
711 odomInfoMsg->covariance[14] != 0 &&
712 odomInfoMsg->covariance[21] != 0 &&
713 odomInfoMsg->covariance[28] != 0 &&
714 odomInfoMsg->covariance[35] != 0)
716 covariance = cv::Mat(6,6,CV_64FC1,(
void*)odomInfoMsg->covariance.data()).clone();
719 if(odomHeader.frame_id.empty())
730 bool ignoreData =
false;
741 bool imagesAlreadyRectified = Parameters::defaultRtabmapImagesAlreadyRectified();
742 Parameters::parse(allParameters, Parameters::kRtabmapImagesAlreadyRectified(), imagesAlreadyRectified);
757 imagesAlreadyRectified))
759 ROS_ERROR(
"Could not convert stereo msgs! Aborting rtabmapviz update...");
763 if(!scan2dMsg.ranges.empty())
774 ROS_ERROR(
"Could not convert laser scan msg! Aborting rtabmapviz update...");
778 else if(!scan3dMsg.data.empty())
789 ROS_ERROR(
"Could not convert 3d laser scan msg! Aborting rtabmapviz update...");
794 if(odomInfoMsg.get())
800 else if(odomInfoMsg.get())
827 const nav_msgs::OdometryConstPtr & odomMsg,
828 const rtabmap_ros::UserDataConstPtr & userDataMsg,
829 const sensor_msgs::LaserScan& scan2dMsg,
830 const sensor_msgs::PointCloud2& scan3dMsg,
831 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg,
832 const rtabmap_ros::GlobalDescriptor & globalDescriptor)
834 std_msgs::Header odomHeader;
838 odomHeader = odomMsg->header;
839 if(!odomMsg->child_frame_id.empty())
841 frameId = odomMsg->child_frame_id;
845 ROS_WARN(
"Received odom topic with child_frame_id not set! Using \"%s\" as base frame.",
frameId_.c_str());
850 if(!scan2dMsg.ranges.empty())
852 odomHeader = scan2dMsg.header;
854 else if(!scan3dMsg.data.empty())
856 odomHeader = scan3dMsg.header;
866 cv::Mat
covariance = cv::Mat::eye(6,6,CV_64FC1);
869 UASSERT(odomMsg->twist.covariance.size() == 36);
870 if(odomMsg->twist.covariance[0] != 0 &&
871 odomMsg->twist.covariance[7] != 0 &&
872 odomMsg->twist.covariance[14] != 0 &&
873 odomMsg->twist.covariance[21] != 0 &&
874 odomMsg->twist.covariance[28] != 0 &&
875 odomMsg->twist.covariance[35] != 0)
877 covariance = cv::Mat(6,6,CV_64FC1,(
void*)odomMsg->twist.covariance.data()).clone();
880 else if(odomInfoMsg.get() && odomInfoMsg->covariance.size() == 36)
882 if(odomInfoMsg->covariance[0] != 0 &&
883 odomInfoMsg->covariance[7] != 0 &&
884 odomInfoMsg->covariance[14] != 0 &&
885 odomInfoMsg->covariance[21] != 0 &&
886 odomInfoMsg->covariance[28] != 0 &&
887 odomInfoMsg->covariance[35] != 0)
889 covariance = cv::Mat(6,6,CV_64FC1,(
void*)odomInfoMsg->covariance.data()).clone();
892 if(odomHeader.frame_id.empty())
900 bool ignoreData =
false;
910 if(!scan2dMsg.ranges.empty())
921 ROS_ERROR(
"Could not convert laser scan msg! Aborting rtabmapviz update...");
925 else if(!scan3dMsg.data.empty())
936 ROS_ERROR(
"Could not convert 3d laser scan msg! Aborting rtabmapviz update...");
941 if(odomInfoMsg.get())
947 else if(odomInfoMsg.get())
974 const nav_msgs::OdometryConstPtr & odomMsg,
975 const rtabmap_ros::UserDataConstPtr & userDataMsg,
976 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
980 std_msgs::Header odomHeader = odomMsg->header;
983 cv::Mat
covariance = cv::Mat::eye(6,6,CV_64FC1);
986 UASSERT(odomMsg->twist.covariance.size() == 36);
987 if(odomMsg->twist.covariance[0] != 0 &&
988 odomMsg->twist.covariance[7] != 0 &&
989 odomMsg->twist.covariance[14] != 0 &&
990 odomMsg->twist.covariance[21] != 0 &&
991 odomMsg->twist.covariance[28] != 0 &&
992 odomMsg->twist.covariance[35] != 0)
994 covariance = cv::Mat(6,6,CV_64FC1,(
void*)odomMsg->twist.covariance.data()).clone();
997 if(odomHeader.frame_id.empty())
1004 bool ignoreData =
false;
1014 if(odomInfoMsg.get())
1020 else if(odomInfoMsg.get())
ros::ServiceClient getMapSrv
static std::string homeDir()
std::string uFormat(const char *fmt,...)
virtual void commonOdomCallback(const nav_msgs::OdometryConstPtr &odomMsg, const rtabmap_ros::UserDataConstPtr &userDataMsg, const rtabmap_ros::OdomInfoConstPtr &odomInfoMsg)
message_filters::Synchronizer< MyGoalPathSyncPolicy > * goalPathSync_
bool convertRGBDMsgs(const std::vector< cv_bridge::CvImageConstPtr > &imageMsgs, const std::vector< cv_bridge::CvImageConstPtr > &depthMsgs, const std::vector< sensor_msgs::CameraInfo > &cameraInfoMsgs, const std::vector< sensor_msgs::CameraInfo > &depthCameraInfoMsgs, const std::string &frameId, const std::string &odomFrameId, const ros::Time &odomStamp, cv::Mat &rgb, cv::Mat &depth, std::vector< rtabmap::CameraModel > &cameraModels, std::vector< rtabmap::StereoCameraModel > &stereoCameraModels, tf::TransformListener &listener, double waitForTransform, bool alreadRectifiedImages, const std::vector< std::vector< rtabmap_ros::KeyPoint > > &localKeyPointsMsgs=std::vector< std::vector< rtabmap_ros::KeyPoint > >(), const std::vector< std::vector< rtabmap_ros::Point3f > > &localPoints3dMsgs=std::vector< std::vector< rtabmap_ros::Point3f > >(), const std::vector< cv::Mat > &localDescriptorsMsgs=std::vector< cv::Mat >(), std::vector< cv::KeyPoint > *localKeyPoints=0, std::vector< cv::Point3f > *localPoints3d=0, cv::Mat *localDescriptors=0)
message_filters::Subscriber< rtabmap_ros::Info > infoTopic_
message_filters::Subscriber< rtabmap_ros::Goal > goalTopic_
rtabmap::ParametersMap getAllParameters() const
std::string uReplaceChar(const std::string &str, char before, char after)
virtual bool handleEvent(UEvent *anEvent)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
virtual void commonStereoCallback(const nav_msgs::OdometryConstPtr &odomMsg, const rtabmap_ros::UserDataConstPtr &userDataMsg, const cv_bridge::CvImageConstPtr &leftImageMsg, const cv_bridge::CvImageConstPtr &rightImageMsg, const sensor_msgs::CameraInfo &leftCamInfoMsg, const sensor_msgs::CameraInfo &rightCamInfoMsg, const sensor_msgs::LaserScan &scan2dMsg, const sensor_msgs::PointCloud2 &scan3dMsg, const rtabmap_ros::OdomInfoConstPtr &odomInfoMsg, const std::vector< rtabmap_ros::GlobalDescriptor > &globalDescriptorMsgs=std::vector< rtabmap_ros::GlobalDescriptor >(), const std::vector< rtabmap_ros::KeyPoint > &localKeyPoints=std::vector< rtabmap_ros::KeyPoint >(), const std::vector< rtabmap_ros::Point3f > &localPoints3d=std::vector< rtabmap_ros::Point3f >(), const cv::Mat &localDescriptors=cv::Mat())
bool call(const std::string &service_name, MReq &req, MRes &res)
GLM_FUNC_DECL genType e()
rtabmap::Transform transformFromPoseMsg(const geometry_msgs::Pose &msg, bool ignoreRotationIfNotSet=false)
std::map< std::string, std::string > ParametersMap
void infoMapCallback(const rtabmap_ros::InfoConstPtr &infoMsg, const rtabmap_ros::MapDataConstPtr &mapMsg)
ROSCPP_DECL const std::string & getName()
std::vector< int > toIntArray(bool *ok=0) const
void setConstraints(const std::multimap< int, Link > &constraints)
void post(UEvent *event, bool async=true) const
void processRequestedMap(const rtabmap_ros::MapData &map)
rtabmap::MainWindow * mainWindow_
rtabmap::PreferencesDialog * prefDialog_
rtabmap::Transform getTransform(const std::string &fromFrameId, const std::string &toFrameId, const ros::Time &stamp, tf::TransformListener &listener, double waitForTransform)
int toInt(bool *ok=0) const
#define UASSERT(condition)
void goalReachedCallback(const std_msgs::BoolConstPtr &value)
message_filters::Subscriber< rtabmap_ros::MapData > mapDataTopic_
static std::string currentDir(bool trailingSeparator=false)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
void publish(const boost::shared_ptr< M > &message) const
void mapDataFromROS(const rtabmap_ros::MapData &msg, std::map< int, rtabmap::Transform > &poses, std::multimap< int, rtabmap::Link > &links, std::map< int, rtabmap::Signature > &signatures, rtabmap::Transform &mapToOdom)
rtabmap::OdometryInfo odomInfoFromROS(const rtabmap_ros::OdomInfo &msg, bool ignoreData=false)
double lastOdomInfoUpdateTime_
std::string rtabmapNodeName_
double waitForTransformDuration_
const UVariant & value3() const
void setPoses(const std::map< int, Transform > &poses)
ros::Subscriber goalReachedTopic_
message_filters::Synchronizer< MyInfoMapSyncPolicy > * infoMapSync_
virtual std::string getClassName() const=0
void setupCallbacks(ros::NodeHandle &nh, ros::NodeHandle &pnh, const std::string &name)
virtual void commonMultiCameraCallback(const nav_msgs::OdometryConstPtr &odomMsg, const rtabmap_ros::UserDataConstPtr &userDataMsg, const std::vector< cv_bridge::CvImageConstPtr > &imageMsgs, const std::vector< cv_bridge::CvImageConstPtr > &depthMsgs, const std::vector< sensor_msgs::CameraInfo > &cameraInfoMsgs, const std::vector< sensor_msgs::CameraInfo > &depthCameraInfoMsgs, const sensor_msgs::LaserScan &scan2dMsg, const sensor_msgs::PointCloud2 &scan3dMsg, const rtabmap_ros::OdomInfoConstPtr &odomInfoMsg, const std::vector< rtabmap_ros::GlobalDescriptor > &globalDescriptorMsgs=std::vector< rtabmap_ros::GlobalDescriptor >(), const std::vector< std::vector< rtabmap_ros::KeyPoint > > &localKeyPoints=std::vector< std::vector< rtabmap_ros::KeyPoint > >(), const std::vector< std::vector< rtabmap_ros::Point3f > > &localPoints3d=std::vector< std::vector< rtabmap_ros::Point3f > >(), const std::vector< cv::Mat > &localDescriptors=std::vector< cv::Mat >())
void setSignaturesData(const std::map< int, Signature > &data)
void infoFromROS(const rtabmap_ros::Info &info, rtabmap::Statistics &stat)
bool isProcessingOdometry() const
QMap< QString, QVariant > ParametersMap
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
OdometryInfo copyWithoutData() const
void goalPathCallback(const rtabmap_ros::GoalConstPtr &goalMsg, const nav_msgs::PathConstPtr &pathMsg)
void setMonitoringState(bool pauseChecked=false)
float max3(const float &a, const float &b, const float &c)
bool convertStereoMsg(const cv_bridge::CvImageConstPtr &leftImageMsg, const cv_bridge::CvImageConstPtr &rightImageMsg, const sensor_msgs::CameraInfo &leftCamInfoMsg, const sensor_msgs::CameraInfo &rightCamInfoMsg, const std::string &frameId, const std::string &odomFrameId, const ros::Time &odomStamp, cv::Mat &left, cv::Mat &right, rtabmap::StereoCameraModel &stereoModel, tf::TransformListener &listener, double waitForTransform, bool alreadyRectified)
bool hasParam(const std::string &key) const
void setMapCorrection(const Transform &mapCorrection)
double maxOdomUpdateRate_
void uSleep(unsigned int ms)
virtual void commonLaserScanCallback(const nav_msgs::OdometryConstPtr &odomMsg, const rtabmap_ros::UserDataConstPtr &userDataMsg, const sensor_msgs::LaserScan &scan2dMsg, const sensor_msgs::PointCloud2 &scan3dMsg, const rtabmap_ros::OdomInfoConstPtr &odomInfoMsg, const rtabmap_ros::GlobalDescriptor &globalDescriptor=rtabmap_ros::GlobalDescriptor())
static const ParametersMap & getDefaultParameters()
bool convertScanMsg(const sensor_msgs::LaserScan &scan2dMsg, const std::string &frameId, const std::string &odomFrameId, const ros::Time &odomStamp, rtabmap::LaserScan &scan, tf::TransformListener &listener, double waitForTransform, bool outputInFrameId=false)
tf::TransformListener tfListener_
std::string toStr(bool *ok=0) const
void subscribe(ros::NodeHandle &nh, const std::string &topic, uint32_t queue_size, const ros::TransportHints &transport_hints=ros::TransportHints(), ros::CallbackQueueInterface *callback_queue=0)
const UVariant & value2() const
void setParam(const std::string &key, const XmlRpc::XmlRpcValue &v) const
static void addHandler(UEventsHandler *handler)
message_filters::sync_policies::ExactTime< rtabmap_ros::Goal, nav_msgs::Path > MyGoalPathSyncPolicy
std::string cameraNodeName_
double timestampFromROS(const ros::Time &stamp)
message_filters::Subscriber< nav_msgs::Path > pathTopic_
ros::Publisher republishNodeDataPub_
bool isProcessingStatistics() const
GuiWrapper(int &argc, char **argv)
message_filters::sync_policies::ExactTime< rtabmap_ros::Info, rtabmap_ros::MapData > MyInfoMapSyncPolicy
const UVariant & value1() const
bool convertScan3dMsg(const sensor_msgs::PointCloud2 &scan3dMsg, const std::string &frameId, const std::string &odomFrameId, const ros::Time &odomStamp, rtabmap::LaserScan &scan, tf::TransformListener &listener, double waitForTransform, int maxPoints=0, float maxRange=0.0f, bool is2D=false)