-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New API #3
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3 +/- ##
==========================================
- Coverage 88.8% 88.16% -0.65%
==========================================
Files 1 4 +3
Lines 134 169 +35
==========================================
+ Hits 119 149 +30
- Misses 15 20 +5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be awesome!
Base.one(::Type{InterpolatableArray{A}}) where {A} = 1 | ||
Base.:*(n::Number, a::InterpolatableArray) = n * a.data | ||
|
||
rbd.normalize_configuration!(joint_type::JointType, q) = nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are unused now, right? Since you're using RigidBodyDynamics.normalize_configuration!
below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. I'll fix that in #4
tree = mechanism.tree # TODO: tree accessor? | ||
for vertex in rbd.Graphs.vertices(tree) | ||
body = vertex | ||
body_ancestors = rbd.Graphs.ancestors(vertex, tree) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, glad to see the RBD.Graphs
stuff coming in handy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, it's great!
settransform!(vis, to_affine_map(transform_to_root(state, body))) | ||
else | ||
body_ancestors = rbd.Graphs.ancestors(vertex, tree) | ||
path = Symbol.(string.(reverse(body_ancestors))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be nice to just store these in a Dict
in MechanismVisualizer
maybe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkoolen this diverges a bit from the way RigidBodyTreeInspector.jl worked, but I think it's for the better. This package now exports a
MechanismVisualizer
type which holds aMechanismState
. So to visualize a robot, you do:and to draw it in a configuration, you just use
RigidBodyDynamics.set_configuration!
:This should alleviate the annoyance of always having to make a new state just for the visualizer.
I've also turned on animation and the OdeIntegrators sink. I haven't made the demo as nice as before, but most of the important features should be in.