|
From: <is...@us...> - 2008-08-05 23:38:49
|
Revision: 2603
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=2603&view=rev
Author: isucan
Date: 2008-08-05 23:38:59 +0000 (Tue, 05 Aug 2008)
Log Message:
-----------
more careful loading of robot models
Modified Paths:
--------------
pkg/trunk/motion_planning/kinematic_planning/src/kinematic_planning.cpp
pkg/trunk/world_models/world_3d_map/params.xml
pkg/trunk/world_models/world_3d_map/src/world_3d_map.cpp
Modified: pkg/trunk/motion_planning/kinematic_planning/src/kinematic_planning.cpp
===================================================================
--- pkg/trunk/motion_planning/kinematic_planning/src/kinematic_planning.cpp 2008-08-05 23:30:34 UTC (rev 2602)
+++ pkg/trunk/motion_planning/kinematic_planning/src/kinematic_planning.cpp 2008-08-05 23:38:59 UTC (rev 2603)
@@ -154,15 +154,17 @@
printf("Loading robot descriptions...\n\n");
std::string description_files;
- get_param("robotdesc_list", description_files);
- std::stringstream sdf(description_files);
- while (sdf.good())
+ if (get_param("robotdesc_list", description_files))
{
- std::string file;
- std::string content;
- sdf >> file;
- get_param(file, content);
- addRobotDescriptionFromData(content.c_str());
+ std::stringstream sdf(description_files);
+ while (sdf.good())
+ {
+ std::string file;
+ std::string content;
+ sdf >> file;
+ if (get_param(file, content))
+ addRobotDescriptionFromData(content.c_str());
+ }
}
printf("\n\n");
}
Modified: pkg/trunk/world_models/world_3d_map/params.xml
===================================================================
--- pkg/trunk/world_models/world_3d_map/params.xml 2008-08-05 23:30:34 UTC (rev 2602)
+++ pkg/trunk/world_models/world_3d_map/params.xml 2008-08-05 23:38:59 UTC (rev 2603)
@@ -2,5 +2,6 @@
<double name="world_3d_map/max_publish_frequency">0.3</double> <!-- Hz -->
<double name="world_3d_map/retain_pointcloud_duration">60</double> <!-- seconds -->
<double name="world_3d_map/retain_pointcloud_fraction">0.02</double> <!-- percentage (between 0 and 1) -->
- <int name="world_3d_map/verbosity_level">1</int> <!-- integer value -->
+ <int name="world_3d_map/verbosity_level">1</int> <!-- integer value -->
+ <string name="world_3d_map/robot_model">robotdesc/pr2</string> <!-- string value -->
</params>
Modified: pkg/trunk/world_models/world_3d_map/src/world_3d_map.cpp
===================================================================
--- pkg/trunk/world_models/world_3d_map/src/world_3d_map.cpp 2008-08-05 23:30:34 UTC (rev 2602)
+++ pkg/trunk/world_models/world_3d_map/src/world_3d_map.cpp 2008-08-05 23:38:59 UTC (rev 2603)
@@ -153,21 +153,13 @@
void loadRobotDescriptions(void)
{
- printf("Loading robot descriptions...\n\n");
-
- std::string description_files;
- get_param("robotdesc_list", description_files);
- std::stringstream sdf(description_files);
- while (sdf.good())
+ std::string model;
+ if (get_param("world_3d_map/robot_model", model))
{
- std::string file;
std::string content;
- sdf >> file;
- printf("Loading '%s'\n", file.c_str());
- get_param(file, content);
- addRobotDescriptionFromData(content.c_str());
+ if (get_param(model, content))
+ addRobotDescriptionFromData(content.c_str());
}
- printf("\n\n");
}
void addRobotDescriptionFromData(const char *data)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|