|
From: <is...@us...> - 2009-02-26 19:18:35
|
Revision: 11826
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=11826&view=rev
Author: isucan
Date: 2009-02-26 19:18:31 +0000 (Thu, 26 Feb 2009)
Log Message:
-----------
publishing new_id
Modified Paths:
--------------
pkg/trunk/motion_planning/kinematic_planning/src/kinematic_planning.cpp
pkg/trunk/prcore/robot_msgs/msg/KinematicPlanStatus.msg
Modified: pkg/trunk/motion_planning/kinematic_planning/src/kinematic_planning.cpp
===================================================================
--- pkg/trunk/motion_planning/kinematic_planning/src/kinematic_planning.cpp 2009-02-26 19:01:01 UTC (rev 11825)
+++ pkg/trunk/motion_planning/kinematic_planning/src/kinematic_planning.cpp 2009-02-26 19:18:31 UTC (rev 11826)
@@ -203,6 +203,7 @@
m_currentRequestType = R_NONE;
m_currentPlanStatus.id = -1;
+ m_currentPlanStatus.new_id = 0;
m_currentPlanStatus.distance = -1.0;
m_currentPlanStatus.done = 1;
m_currentPlanStatus.approximate = 0;
@@ -345,6 +346,7 @@
m_currentRequestType = R_STATE;
m_currentPlanStatus.id = ++m_replanID;
+ m_currentPlanStatus.new_id = 1;
m_currentPlanStatus.valid = 1;
m_currentPlanStatus.path.set_states_size(0);
m_currentPlanStatus.done = 0;
@@ -386,6 +388,7 @@
m_currentRequestType = R_POSITION;
m_currentPlanStatus.id = ++m_replanID;
+ m_currentPlanStatus.new_id = 1;
m_currentPlanStatus.valid = 1;
m_currentPlanStatus.path.set_states_size(0);
m_currentPlanStatus.done = 0;
@@ -428,6 +431,7 @@
}
res.value.id = -1;
+ res.value.new_id = 0;
res.value.done = trivial ? 1 : 0;
res.value.valid = res.value.path.get_states_size() > 0;
res.value.approximate = approximate ? 1 : 0;
@@ -456,6 +460,7 @@
}
res.value.id = -1;
+ res.value.new_id = 0;
res.value.done = trivial ? 1 : 0;
res.value.valid = res.value.path.get_states_size() > 0;
res.value.approximate = approximate ? 1 : 0;
@@ -590,6 +595,10 @@
m_currentlyExecutedPath.set_states_size(0);
}
+ // make sure new_id becomes 0, if it was 1
+ if (m_currentPlanStatus.new_id == 1)
+ m_currentPlanStatus.new_id = 0;
+
m_statusLock.unlock();
if (replan_inactive)
Modified: pkg/trunk/prcore/robot_msgs/msg/KinematicPlanStatus.msg
===================================================================
--- pkg/trunk/prcore/robot_msgs/msg/KinematicPlanStatus.msg 2009-02-26 19:01:01 UTC (rev 11825)
+++ pkg/trunk/prcore/robot_msgs/msg/KinematicPlanStatus.msg 2009-02-26 19:18:31 UTC (rev 11826)
@@ -4,6 +4,9 @@
# replanning is not active
int32 id
+# If the ID just changed, this value will be 1. Subsequent messages
+# will have the value equal to 0
+byte new_id
# The result of a motion plan: a kinematic path. If the motion plan is
# not succesful, this path has 0 states. If the motion plan is
@@ -19,7 +22,6 @@
# discard the path
float64 distance
-
# If the starting state was already in the goal region,
# this is set to 1. Otherwise, it will be set to 0
byte done
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|