mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 16:57:46 +08:00
removed goal_global topic subscription (to send a global goal, use set_goal service instead)
This commit is contained in:
+1
-17
@@ -188,7 +188,6 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
|
||||
|
||||
// planning topics
|
||||
goalSub_ = nh.subscribe("goal", 1, &CoreWrapper::goalCallback, this);
|
||||
goalGlobalSub_ = nh.subscribe("goal_global", 1, &CoreWrapper::goalGlobalCallback, this);
|
||||
nextMetricGoalPub_ = nh.advertise<geometry_msgs::PoseStamped>("goal_out", 1);
|
||||
goalReachedPub_ = nh.advertise<std_msgs::Bool>("goal_reached", 1);
|
||||
globalPathPub_ = nh.advertise<nav_msgs::Path>("global_path", 1);
|
||||
@@ -1396,22 +1395,7 @@ void CoreWrapper::goalCallback(const geometry_msgs::PoseStampedConstPtr & msg)
|
||||
}
|
||||
ROS_INFO("Planning: set goal %s", targetPose.prettyPrint().c_str());
|
||||
UTimer timer;
|
||||
rtabmap_.computePath(targetPose, false);
|
||||
ROS_INFO("Planning: Time computing path = %f s", timer.ticks());
|
||||
goalCommonCallback(rtabmap_.getPath());
|
||||
}
|
||||
|
||||
void CoreWrapper::goalGlobalCallback(const geometry_msgs::PoseStampedConstPtr & msg)
|
||||
{
|
||||
Transform targetPose = rtabmap_ros::transformFromPoseMsg(msg->pose);
|
||||
if(targetPose.isNull())
|
||||
{
|
||||
ROS_ERROR("Pose received is null!");
|
||||
return;
|
||||
}
|
||||
ROS_INFO("Planning: set goal %s", targetPose.prettyPrint().c_str());
|
||||
UTimer timer;
|
||||
rtabmap_.computePath(targetPose, true);
|
||||
rtabmap_.computePath(targetPose);
|
||||
ROS_INFO("Planning: Time computing path = %f s", timer.ticks());
|
||||
goalCommonCallback(rtabmap_.getPath());
|
||||
}
|
||||
|
||||
@@ -174,7 +174,6 @@ private:
|
||||
|
||||
void goalCommonCallback(const std::vector<std::pair<int, rtabmap::Transform> > & poses);
|
||||
void goalCallback(const geometry_msgs::PoseStampedConstPtr & msg);
|
||||
void goalGlobalCallback(const geometry_msgs::PoseStampedConstPtr & msg);
|
||||
void updateGoal(const ros::Time & stamp);
|
||||
|
||||
void process(
|
||||
@@ -249,7 +248,6 @@ private:
|
||||
|
||||
//Planning stuff
|
||||
ros::Subscriber goalSub_;
|
||||
ros::Subscriber goalGlobalSub_;
|
||||
ros::Publisher nextMetricGoalPub_;
|
||||
ros::Publisher goalReachedPub_;
|
||||
ros::Publisher globalPathPub_;
|
||||
|
||||
Reference in New Issue
Block a user