Commit 2400ae30 authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

[BasicConfigurationShooter] Reintroduce boost::make_shared.

parent e60daf56
......@@ -26,8 +26,8 @@ namespace hpp {
size_type extraDim = robot_->extraConfigSpace ().dimension ();
size_type offset = robot_->configSize () - extraDim;
ConfigurationPtr_t config (new Configuration_t (robot_->configSize ()));
(*config).head(offset) = se3::randomConfiguration(robot_->model());
Configuration_t config(robot_->configSize ());
config.head (offset) = se3::randomConfiguration(robot_->model());
// Shoot extra configuration variables
for (size_type i=0; i<extraDim; ++i) {
......@@ -41,9 +41,9 @@ namespace hpp {
oss << i << ". min = " <<lower<< ", max = " << upper << std::endl;
throw std::runtime_error (oss.str ());
}
(*config) [offset + i] = lower + (upper - lower) * rand ()/RAND_MAX;
config [offset + i] = lower + (upper - lower) * rand ()/RAND_MAX;
}
return config;
return boost::make_shared<Configuration_t> (config);
}
} // namespace core
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment