Skip to content
Snippets Groups Projects
Commit ef3aab46 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Fix list of joints per sub-device in Device

parent 0f1e7056
No related branches found
No related tags found
No related merge requests found
......@@ -83,7 +83,7 @@ namespace hpp {
/// \param robot Robots that manipulate objects,
/// \param objects Set of objects manipulated by the robot.
Device (const std::string& name) :
Parent_t (name), jointCacheSize_ (0)
Parent_t (name), jointCacheSize_ (1)
{}
void init (const DeviceWkPtr_t& self)
......
......@@ -34,7 +34,7 @@ namespace hpp {
std::size_t jvSize = model().joints.size();
assert (jvSize >= jointCacheSize_);
JointIndexes_t newJ (jvSize - jointCacheSize_);
for (std::size_t i = jointCacheSize_; i < jvSize; ++i) newJ[i] = i;
for (std::size_t i = jointCacheSize_; i < jvSize; ++i) newJ[i - jointCacheSize_] = i;
jointCacheSize_ = model().joints.size();
add (name, newJ);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment