rdeits / RigidBodyTreeInspector.jl

Simple visualization for the RigidBodyDynamics.jl library
Other
13 stars 6 forks source link

Unfortunate Valkyrie head situation #35

Closed tkoolen closed 7 years ago

tkoolen commented 7 years ago

image

Code to reproduce:

# Pkg.checkout("RigidBodyDynamics")
# Pkg.clone("https://github.com/tkoolen/ValkyrieRobot.jl.git")

using RigidBodyDynamics
using RigidBodyTreeInspector
using ValkyrieRobot

val = Valkyrie()
mechanism = val.mechanism;

DrakeVisualizer.any_open_windows() || DrakeVisualizer.new_window(); sleep(1)
vis = Visualizer()[:valkyrie]
setgeometry!(vis, mechanism, parse_urdf(ValkyrieRobot.urdfpath(), mechanism; package_path = [ValkyrieRobot.packagepath()]))
remove_fixed_tree_joints!(mechanism)

state = MechanismState{Float64}(mechanism)
settransform!(vis, state)

This is due to the remove_fixed_tree_joints! call. This used to work. Other mechanism modifications (like rerooting) result in similar issues. I'll take a look at this soon, but just wanted to report it for now.

rdeits commented 7 years ago

Whoops, thanks for noticing this 😄

rdeits commented 7 years ago

We realized that the problem goes away if you call setgeometry() after modifying the mechanism, which I think is an OK workaround.