|
From: <is...@us...> - 2009-08-04 18:15:22
|
Revision: 20668
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20668&view=rev
Author: isucan
Date: 2009-08-04 18:15:14 +0000 (Tue, 04 Aug 2009)
Log Message:
-----------
one more helper function
Modified Paths:
--------------
pkg/trunk/motion_planning/planning_models/include/planning_models/kinematic_state_params.h
pkg/trunk/motion_planning/planning_models/src/kinematic_state_params.cpp
Modified: pkg/trunk/motion_planning/planning_models/include/planning_models/kinematic_state_params.h
===================================================================
--- pkg/trunk/motion_planning/planning_models/include/planning_models/kinematic_state_params.h 2009-08-04 18:14:43 UTC (rev 20667)
+++ pkg/trunk/motion_planning/planning_models/include/planning_models/kinematic_state_params.h 2009-08-04 18:15:14 UTC (rev 20668)
@@ -189,6 +189,12 @@
/** \brief Copy the parameters describing a given joint */
void copyParamsJoint(std::vector<double> ¶ms, const std::string &name) const;
+ /** \brief Copy the parameters describing a given set of joints */
+ void copyParamsJoints(double *params, const std::vector<std::string> &names) const;
+
+ /** \brief Copy the parameters describing a given set of joints */
+ void copyParamsJoints(std::vector<double> ¶ms, const std::vector<std::string> &names) const;
+
/** \brief Check if all params for a joint were seen */
bool seenJoint(const std::string &name) const;
Modified: pkg/trunk/motion_planning/planning_models/src/kinematic_state_params.cpp
===================================================================
--- pkg/trunk/motion_planning/planning_models/src/kinematic_state_params.cpp 2009-08-04 18:14:43 UTC (rev 20667)
+++ pkg/trunk/motion_planning/planning_models/src/kinematic_state_params.cpp 2009-08-04 18:15:14 UTC (rev 20668)
@@ -482,6 +482,18 @@
params[i] = m_params[i];
}
+void planning_models::StateParams::copyParamsJoints(std::vector<double> ¶ms, const std::vector<std::string> &names) const
+{
+ params.clear();
+ for (unsigned int j = 0 ; j < names.size() ; ++j)
+ {
+ std::vector<double> p;
+ copyParamsJoint(p, names[j]);
+ for (unsigned int i = 0 ; i < p.size() ; ++i)
+ params.push_back(p[i]);
+ }
+}
+
void planning_models::StateParams::copyParamsGroup(double *params, const std::string &group) const
{
copyParamsGroup(params, m_owner->getGroupID(group));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|