ODE Physics and Matlab

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

ODE Physics and Matlab

I try to use the matlab interface and the ODE physics with the Puma robot. But when I apply some gravity, I have some weird results. The robot move without any commands. And I can't send any velocities to the robot.I would like to be able to send such commands. If you have any ideas on the strange behaviour, it would be very helpful.

My code:

orEnvLoadScene('data/hanoi.env.xml',1); % load a scene
orEnvSetOptions('physics ode'); % start the physics engine
orEnvSetOptions('gravity 0 0 -9.8'); % set gravity
orEnvSetOptions('debug 0')
orEnvSetOptions('timestep 0.001')
orEnvSetOptions('simulation stop')
orEnvSetOptions('simulation start')

robot = orEnvGetRobots();
robotid = robot{1,1}.id;

success = orRobotControllerSet(robotid, 'odevelocity')
success = orRobotControllerSend(robotid, 'setvelocity 3 0.5')