simflight icon indicating copy to clipboard operation
simflight copied to clipboard

Can not identify drake related class

Open hughhugh opened this issue 7 years ago • 4 comments

Hi, @andybarry I have git clone and complied drake in R2017a and Ubuntu 16.04. I tried examples in drake like Quadrotor and Quadrotor2D, both works well. Then I git clone the simflight repository, it doesnot work. Log are as the following. From the console infos, there is something wrong with the drake class. In the Quadrotor example, the class "drake.util.BotLCMGLClient" is also been used. So could you help figure it out? Thank you very much.

'LCM: Disabling IPV6 support LCM: TTL set to zero, traffic will not leave localhost. Undefined variable "drake" or class "drake.util.BotLCMGLClient".

Error in DrawTrajectoryLcmGl (line 32) lcmgl = drake.util.BotLCMGLClient(lcm.lcm.LCM.getSingleton(), lcmgl_name);

Error in TrajectoryLibrary/SimulateTrajectory (line 132) DrawTrajectoryLcmGl(traj.xtraj, ['Nominal: ' traj.name], options);

Error in TrajectoryLibrary/AddStabilizationTrajectory (line 219) [~, simtraj] = obj.SimulateTrajectory(traj_num, obj.ti_rollout_time);

Error in AddTiqrControllers (line 5) [lib_just_for_rollout, traj_num] = lib.AddStabilizationTrajectory(x0, u0, gains.K_pd, [name '-pd-no-yaw']);

Error in FindTrimDrake (line 116) lib = AddTiqrControllers(lib, 'TI-straight', A, B, x0, u0, gains);

Error in BuildTrajectoryLibrary (line 15) [x0, u0, lib] = FindTrimDrake(p, lib, gains_ti);'

hughhugh avatar Jun 03 '17 15:06 hughhugh

Drake has changed a lot since I wrote this code. Try checking out a revision of Drake from around Dec 2015.

andybarry avatar Jun 03 '17 16:06 andybarry

Hi, @andybarry I have build the last_sha_with_windows_support. The visualizer can be loaded, but there are still some errors. I have tried 'ccmake ..' command to set Drake. Could you display me the configure used? Thank you.

'LCM: Disabling IPV6 support LCM: TTL set to zero, traffic will not leave localhost. Simulating: "TI-straight-pd-no-yaw" for 3 second(s) with default initial conditions... done. Error initializing LCM types. If you want to use the HUD visualizer, you need to run: javaaddpath('/home/abarry/realtime/LCM/LCMtypes.jar'); javaaddpath('/home/abarry/pronto-distro/build/share/java/lcmtypes_mav-lcmtypes.jar'); javaaddpath('/home/abarry/pronto-distro/build/share/java/lcmtypes_mav_estimator.jar'); Warning: vertcat for pptrajectories with different breaks is not supported (yet). kicking out to function handle version

In PPTrajectory/vertcat (line 462) In DeltawingPlant.playback (line 65) In DeltawingPlantStateEstFrame/playback (line 84) In TrajectoryLibrary/SimulateTrajectory (line 177) In TrajectoryLibrary/AddStabilizationTrajectory (line 219) In AddTiqrControllers (line 5) In FindTrimDrake (line 116) In BuildTrajectoryLibrary (line 14) Warning: creating function handle. this is potentially inefficient. consider implementing things a different way In FunctionHandleTrajectory (line 13) In Trajectory/vertcat (line 138) In PPTrajectory/vertcat (line 463) In DeltawingPlant.playback (line 65) In DeltawingPlantStateEstFrame/playback (line 84) In TrajectoryLibrary/SimulateTrajectory (line 177) In TrajectoryLibrary/AddStabilizationTrajectory (line 219) In AddTiqrControllers (line 5) In FindTrimDrake (line 116) In BuildTrajectoryLibrary (line 14)

Error using DynamicalSystem/setOutputFrame (line 452) frame dimension does not match number of outputs Error in Trajectory/inFrame (line 88) mobj = setOutputFrame(mobj,frame);

Error in Trajectory/subsref (line 217) [varargout{:}] = builtin('subsref',a,s);

Error in Visualizer/playback (line 85) xtraj = xtraj.inFrame(obj.getInputFrame); % try to convert it

Error in DeltawingPlant.playback (line 76) playback(v, traj_and_u, options);

Error in DeltawingPlantStateEstFrame/playback (line 84) obj.p.playback(xtraj, utraj, options);

Error in TrajectoryLibrary/SimulateTrajectory (line 177) obj.p.playback(xtraj, utraj, struct('slider', true));

Error in TrajectoryLibrary/AddStabilizationTrajectory (line 219) [~, simtraj] = obj.SimulateTrajectory(traj_num, obj.ti_rollout_time);

Error in AddTiqrControllers (line 5) [lib_just_for_rollout, traj_num] = lib.AddStabilizationTrajectory(x0, u0, gains.K_pd, [name '-pd-no-yaw']);

Error in FindTrimDrake (line 116) lib = AddTiqrControllers(lib, 'TI-straight', A, B, x0, u0, gains);

Error in BuildTrajectoryLibrary (line 14) [x0, u0, lib] = FindTrimDrake(p, lib, gains_ti);

hughhugh avatar Jun 05 '17 10:06 hughhugh

1.Find all "drake.util.BotLCMGLClient" in the drake, and change it to "drake.matlab.util.BotLCMGLClient". 2.Find all "obj.p.playback" or "playback", and comment it.

dayanmayi avatar Jul 24 '17 09:07 dayanmayi

which verison of drake ? Can u explain it? thanks. @dayanmayi @andybarry @hughhugh

LIANGXINKAI avatar Mar 29 '20 10:03 LIANGXINKAI