Closed patmarion closed 8 years ago
Hi @rdeits maybe you know what to do to fix this one? Reported to me by @MarcoCar
I guess there are two files, should we only be using the drake file?
$ find . -name Valkyrie.m ./software/control/matlab/systems/Valkyrie.m ./software/drake/drake/examples/Valkyrie/@Valkyrie/Valkyrie.m
I don't know why this hasn't failed before, but yes, you want the Drake one. I don't have a working DRC build on this machine, so it's hard for me to test, but I believe the right thing to do is to port the following code from software/control/.../Valkyrie into the constructor of Drake's @Valkyrie/Valkyrie.m
:
options = applyDefaults(options,...
struct('valkyrie_version', 1,...
'use_new_kinsol', true));
if ~any(options.valkyrie_version == [1,2])
error('Valkyrie:badVersion','Invalid Valkyrie version. Valid values are 1 and 2')
end
if nargin < 1 || isempty(urdf)
switch options.valkyrie_version
case 1
%urdf = strcat(getenv('DRC_PATH'),'/models/valkyrie/V1_sim_mit_drake.urdf');
urdf = strcat(getenv('DRC_PATH'),'/models/valkyrie/V1_sim_shells_reduced_polygon_count_mit.urdf');
case 2
urdf = strcat(getenv('DRC_PATH'),'/models/val_description/urdf/valkyrie_sim_drake.urdf');
end
else
typecheck(urdf,'char');
end
and then just delete software/control/.../Valkyrie.m
entirely.
@rdeits what you suggested solves the issue above but there's still something not working properly in @Valkyrie/Valkyrie.m
. This is the output I got
BasePlanner.withValkyrie(2)
Started lcm handle loop
Error using MultiCoordinateFrame/replaceFrameNum (line 353)
new subframe does not match the dimensions of the frame you are trying to replace
Error in Valkyrie/compile (line 90)
valkyrie_state_frame = replaceFrameNum(valkyrie_state_frame,1,valkyrieFrames.ValkyrieState(obj));
Error in TimeSteppingRigidBodyManipulator (line 88)
obj = compile(obj);
Error in Valkyrie (line 45)
obj = obj@TimeSteppingRigidBodyManipulator(urdf,options.dt,options);
Error in DRCPlanner (line 100)
obj.iris_planner = IRISPlanner(Valkyrie([], struct('floating', true)));
Error in BasePlanner (line 14)
obj = obj@DRCPlanner(varargin{:});
Error in BasePlanner.withValkyrie (line 8)
obj = BasePlanner(BasePlanner.constructValkyrie(varargin{:}));
Any idea?
Ah, I see. That's unfortunate. We have different coordinate frames for the OH and Drake versions of Valkyrie, and it looks like they're not compatible. We'll have to keep the OH version around, then. I'm opening a pull request to resolve the name ambiguity.
After updating to drake master: