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
↧