Skip to content

Commit

Permalink
[Joint] Modify default behaviour and return const
Browse files Browse the repository at this point in the history
  • Loading branch information
Megane Millan authored and jcarpent committed Jul 9, 2024
1 parent 1894c5f commit cc4583c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions include/pinocchio/multibody/joint/joint-helical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ namespace pinocchio
return classname();
}

Vector3 getMotionAxis()
Vector3 getMotionAxis() const
{
switch (axis)
{
Expand All @@ -936,7 +936,8 @@ namespace pinocchio
case 2:
return Vector3::UnitZ();
default:
return Vector3::Zero();
assert(false && "must never happen");
break;
}
}

Expand Down
5 changes: 3 additions & 2 deletions include/pinocchio/multibody/joint/joint-prismatic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ namespace pinocchio
return classname();
}

Vector3 getMotionAxis()
Vector3 getMotionAxis() const
{
switch (axis)
{
Expand All @@ -755,7 +755,8 @@ namespace pinocchio
case 2:
return Vector3::UnitZ();
default:
return Vector3::Zero();
assert(false && "must never happen");
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ namespace pinocchio
return classname();
}

Vector3 getMotionAxis()
Vector3 getMotionAxis() const
{
switch (axis)
{
Expand All @@ -213,7 +213,8 @@ namespace pinocchio
case 2:
return Vector3::UnitZ();
default:
return Vector3::Zero();
assert(false && "must never happen");
break;
}
}

Expand Down
5 changes: 3 additions & 2 deletions include/pinocchio/multibody/joint/joint-revolute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ namespace pinocchio
return classname();
}

Vector3 getMotionAxis()
Vector3 getMotionAxis() const
{
switch (axis)
{
Expand All @@ -851,7 +851,8 @@ namespace pinocchio
case 2:
return Vector3::UnitZ();
default:
return Vector3::Zero();
assert(false && "must never happen");
break;
}
}

Expand Down

0 comments on commit cc4583c

Please sign in to comment.