Robotics StackExchange | Archived questions

time_from_start of JointTrajectory on RosMatlab

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 “timefromstart”, it happens a publish error on Matlab now. Could you teach me how to set the“timefromstart” 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('trajectorymsgs/JointTrajectory', node); po = rosmatlab.message('trajectorymsgs/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

Asked by junji on 2015-01-23 20:07:28 UTC

Comments

hi did you fix this problem?

Asked by Andromeda on 2015-02-19 15:10:44 UTC

Answers