Skip to content

Commit adf60e0

Browse files
refactor
1 parent 72eb0b0 commit adf60e0

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

run_this_first.m

+5-8
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,17 @@
2020

2121
UI.t = 0:UI.timestep:UI.motion_duration;
2222

23-
%% ROS
24-
rosinit(UI.masterURI)
25-
2623
%% Get RBT
27-
robot = loadrobot('frankaEmikaPanda', 'DataFormat', 'column');
24+
[robot, robotData] = loadrobot('frankaEmikaPanda',...
25+
'DataFormat', 'column',...
26+
'Gravity', [0, 0, -9.80665]);
2827
removeBody(robot,'panda_leftfinger');
2928
removeBody(robot,'panda_rightfinger');
3029
panda_fingertipcenter = rigidBody('panda_fingertipcenter');
3130
setFixedTransform(panda_fingertipcenter.Joint, [0 pi -0.1 0], 'dh');
3231
addBody(robot,panda_fingertipcenter,'panda_hand');
3332
% interactiveRigidBodyTree(robot);
3433

35-
robot.Gravity = [0, 0, -9.80665];
36-
37-
3834
%% Get data
3935
load mean_var_linconstraint_rotated_z.mat
4036

@@ -51,7 +47,8 @@
5147

5248
%% Null space
5349

54-
50+
%% ROS
51+
rosinit(UI.masterURI)
5552

5653

5754

0 commit comments

Comments
 (0)