|
From: <is...@us...> - 2009-06-29 02:15:44
|
Revision: 17850
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=17850&view=rev
Author: isucan
Date: 2009-06-29 02:02:36 +0000 (Mon, 29 Jun 2009)
Log Message:
-----------
a getter for the box scale + another check
Modified Paths:
--------------
pkg/trunk/motion_planning/planning_environment/include/planning_environment/collision_space_monitor.h
pkg/trunk/motion_planning/planning_environment/src/collision_space_monitor.cpp
Modified: pkg/trunk/motion_planning/planning_environment/include/planning_environment/collision_space_monitor.h
===================================================================
--- pkg/trunk/motion_planning/planning_environment/include/planning_environment/collision_space_monitor.h 2009-06-29 01:48:17 UTC (rev 17849)
+++ pkg/trunk/motion_planning/planning_environment/include/planning_environment/collision_space_monitor.h 2009-06-29 02:02:36 UTC (rev 17850)
@@ -86,6 +86,7 @@
delete attachedBodyNotifier_;
}
+ /** \brief Return the instance of the environment model maintained */
collision_space::EnvironmentModel* getEnvironmentModel(void) const
{
return collisionSpace_;
@@ -102,6 +103,14 @@
{
return tf_;
}
+
+ /** \brief Return the scaling employed when creating spheres
+ from boxes in a collision map. The radius of a sphere is
+ this scaling multiplied by the largest extent of the box */
+ double getBoxScale(void) const
+ {
+ return boxScale_;
+ }
/** \brief Define a callback for before updating a map */
void setOnBeforeMapUpdateCallback(const boost::function<void(const robot_msgs::CollisionMapConstPtr)> &callback)
Modified: pkg/trunk/motion_planning/planning_environment/src/collision_space_monitor.cpp
===================================================================
--- pkg/trunk/motion_planning/planning_environment/src/collision_space_monitor.cpp 2009-06-29 01:48:17 UTC (rev 17849)
+++ pkg/trunk/motion_planning/planning_environment/src/collision_space_monitor.cpp 2009-06-29 02:02:36 UTC (rev 17850)
@@ -73,12 +73,13 @@
nh_.param<std::string>("~bounding_planes", planes, std::string());
std::stringstream ss(planes);
std::vector<double> planeValues;
- while (ss.good() && !ss.eof())
- {
- double value;
- ss >> value;
- planeValues.push_back(value);
- }
+ if (!planes.empty())
+ while (ss.good() && !ss.eof())
+ {
+ double value;
+ ss >> value;
+ planeValues.push_back(value);
+ }
if (planeValues.size() % 4 != 0)
ROS_WARN("~bounding_planes must be a list of 4-tuples (a b c d) that define planes ax+by+cz+d=0");
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|