time_from_start of JointTrajectory on RosMatlab

asked 2015-01-23 19:07:28 -0500

junji gravatar image

updated 2015-01-23 19:07:59 -0500

Nice to meet you. I am Jun from Germany. I am using the RosMatlab I/O package released on january 2014. I am having problems when trying to publish a JointTrajectory from Matlab.

Because I can’t find the way how to set “time_from_start”, it happens a publish error on Matlab now. Could you teach me how to set the“time_from_start” on RosMatlab?

with the next code :


node = rosmatlab.node('PublishTrajectory', [], [], 'rosIP', '127.0.0.1'); publisher = rosmatlab.publisher('Traj', 'trajectory_msgs/JointTrajectory', node);

msg = rosmatlab.message('trajectory_msgs/JointTrajectory', node); po = rosmatlab.message('trajectory_msgs/JointTrajectoryPoint', node);

p1 = msg.getPoints(); po.setTimeFromStart(1); p1.add(po);

msg.setPoints(p1); publisher.publish(msg);


If I run the above code, the below message comes on Matlab and can’t publish.


No method 'setTimeFromStart' with matching signature found for class 'org.ros.internal.message.$Proxy27'.

Error in JointTraj (line 27) po.setTimeFromStart(1);


I would appreciate it very much if you could advise me anything.

Best regards,

Jun

edit retag flag offensive close merge delete

Comments

hi did you fix this problem?

Andromeda gravatar imageAndromeda ( 2015-02-19 14:10:44 -0500 )edit