Skip to content

Instantly share code, notes, and snippets.

@EricCousineau-TRI
Last active November 21, 2019 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EricCousineau-TRI/cab585d360edab15138d17eb2408d5b8 to your computer and use it in GitHub Desktop.
Save EricCousineau-TRI/cab585d360edab15138d17eb2408d5b8 to your computer and use it in GitHub Desktop.
template <typename Class, typename... Args>
math::RigidTransformd ResolveRigidTransform(
const Class& element, Args... args) {
ignition::math::Pose3d pose;
ThrowAnyErrors(element.ResolvePose(args..., pose));
return ToRigidTransform(pose);
}
ResolveRigidTransform(link, model_frame)
---
math::RigidTransform ResolveRigidTransform(const SemanticPose& pose, std::string relative_to = "") {
Pose3d value;
ThrowAnyErrors(pose.Resolve(relative_to, value));
return ToRigidTransform(pose);
}
ResolveRigidTransform(link.SemanticPose(), model_frame)
class Link {
PoseElement* GetPoseElement();
...
ElementPtr xml;
}
class PoseElement {
void SetRelativeTo(...)
string GetRelativeTo(...)
Pose3d GetRawValue()
Pose3d SetRawValue(...)
Pose3d Resolve(...)
...
ElementPtr xml;
};
class AxisXyzElement {
string GetExpressedIn(...);
...
...
ElementPtr xml;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment