Commit 8c1497b2 authored by Guilhem Saurel's avatar Guilhem Saurel

format

parent 187ae875
...@@ -67,19 +67,18 @@ class GetJointNames : public Command { ...@@ -67,19 +67,18 @@ class GetJointNames : public Command {
/// \param entity instance of Entity owning this command /// \param entity instance of Entity owning this command
/// \param docstring documentation of the command /// \param docstring documentation of the command
GetJointNames(DynamicPinocchio& entity, const std::string& docstring) GetJointNames(DynamicPinocchio& entity, const std::string& docstring)
: Command(entity, std::vector<Value::Type>(), docstring){} : Command(entity, std::vector<Value::Type>(), docstring) {}
virtual Value doExecute() { virtual Value doExecute() {
DynamicPinocchio& robot = static_cast<DynamicPinocchio&>(owner()); DynamicPinocchio& robot = static_cast<DynamicPinocchio&>(owner());
if (robot.m_model == 0x0){ if (robot.m_model == 0x0) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::GENERIC, SOT_THROW ExceptionDynamic(ExceptionDynamic::GENERIC, "model has not been initialized.");
"model has not been initialized.");
} }
const std::vector<std::string>& jointNames = robot.m_model->names; const std::vector<std::string>& jointNames = robot.m_model->names;
// Remove first joint names 'universe' // Remove first joint names 'universe'
std::size_t n (jointNames.size()); std::size_t n(jointNames.size());
assert(n >= 1); assert(n >= 1);
std::vector<Value> res; std::vector<Value> res;
for (std::size_t i=1; i<jointNames.size(); ++i) { for (std::size_t i = 1; i < jointNames.size(); ++i) {
res.push_back(Value(jointNames[i])); res.push_back(Value(jointNames[i]));
} }
return Value(res); return Value(res);
......
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