|
From: <is...@us...> - 2009-07-22 04:02:08
|
Revision: 19378
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=19378&view=rev
Author: isucan
Date: 2009-07-22 04:02:06 +0000 (Wed, 22 Jul 2009)
Log Message:
-----------
removing unsafe attribute from planning response
Modified Paths:
--------------
pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp
pkg/trunk/motion_planning/motion_planning_srvs/srv/MotionPlan.srv
pkg/trunk/motion_planning/ompl_planning/src/motion_planner.cpp
Modified: pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp
===================================================================
--- pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp 2009-07-22 03:57:26 UTC (rev 19377)
+++ pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp 2009-07-22 04:02:06 UTC (rev 19378)
@@ -190,31 +190,26 @@
}
else
{
- if (res.unsafe)
- ROS_WARN("Received path is unsafe (planning data was out of date). Ignoring");
+ if (res.path.model_id != req.params.model_id)
+ ROS_ERROR("Received path for incorrect model: expected '%s', received '%s'", req.params.model_id.c_str(), res.path.model_id.c_str());
else
{
- if (res.path.model_id != req.params.model_id)
- ROS_ERROR("Received path for incorrect model: expected '%s', received '%s'", req.params.model_id.c_str(), res.path.model_id.c_str());
+ if (!planningMonitor_->getTransformListener()->frameExists(res.path.header.frame_id))
+ ROS_ERROR("Received path in unknown frame: '%s'", res.path.header.frame_id.c_str());
else
{
- if (!planningMonitor_->getTransformListener()->frameExists(res.path.header.frame_id))
- ROS_ERROR("Received path in unknown frame: '%s'", res.path.header.frame_id.c_str());
- else
+ approx = res.approximate;
+ if (res.approximate)
+ ROS_INFO("Approximate path was found. Distance to goal is: %f", res.distance);
+ ROS_INFO("Received path with %u states from motion planner", (unsigned int)res.path.states.size());
+ currentPath = res.path;
+ currentPos = 0;
+ if (planningMonitor_->transformPathToFrame(currentPath, planningMonitor_->getFrameId()))
{
- approx = res.approximate;
- if (res.approximate)
- ROS_INFO("Approximate path was found. Distance to goal is: %f", res.distance);
- ROS_INFO("Received path with %u states from motion planner", (unsigned int)res.path.states.size());
- currentPath = res.path;
- currentPos = 0;
- if (planningMonitor_->transformPathToFrame(currentPath, planningMonitor_->getFrameId()))
- {
- displayPathPublisher_.publish(currentPath);
- printPath(currentPath);
- feedback = pr2_robot_actions::MoveArmState::MOVING;
- update(feedback);
- }
+ displayPathPublisher_.publish(currentPath);
+ printPath(currentPath);
+ feedback = pr2_robot_actions::MoveArmState::MOVING;
+ update(feedback);
}
}
}
Modified: pkg/trunk/motion_planning/motion_planning_srvs/srv/MotionPlan.srv
===================================================================
--- pkg/trunk/motion_planning/motion_planning_srvs/srv/MotionPlan.srv 2009-07-22 03:57:26 UTC (rev 19377)
+++ pkg/trunk/motion_planning/motion_planning_srvs/srv/MotionPlan.srv 2009-07-22 04:02:06 UTC (rev 19378)
@@ -34,6 +34,3 @@
# set to 1 if the computed path was approximate
byte approximate
-
-# if state information was not up to date when planning, this is set to 1
-byte unsafe
Modified: pkg/trunk/motion_planning/ompl_planning/src/motion_planner.cpp
===================================================================
--- pkg/trunk/motion_planning/ompl_planning/src/motion_planner.cpp 2009-07-22 03:57:26 UTC (rev 19377)
+++ pkg/trunk/motion_planning/ompl_planning/src/motion_planner.cpp 2009-07-22 04:02:06 UTC (rev 19378)
@@ -143,7 +143,6 @@
res.path.model_id = req.params.model_id;
res.path.header.frame_id = planningMonitor_->getFrameId();
res.path.header.stamp = planningMonitor_->lastMapUpdate();
- res.unsafe = planningMonitor_->isEnvironmentSafe() ? 0 : 1;
res.distance = -1.0;
res.approximate = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|