How to exchange MultiDOFJointTrajectoryPoint[] datas using ROS-Matlab?

asked 2015-02-20 13:22:13 -0500

Andromeda gravatar image

updated 2015-05-15 00:12:40 -0500

Hi guys, I'm having a hard time trying to find out how to use the ROS I/O Matlab package to let them communicate each other.

In my simple script I wrote the following lines of Matlab's code:

%% Creating a Publisher and send data from Matlab to ROS

% Create a new node named /NODE and connect it to the master.
rosmat_nh = rosmatlab.node( 'matlab_generator', [], [], 'rosIP', '' );

publish_point = rosmat_nh.addPublisher( 'trajectory', 'trajectory_msgs/MultiDOFJointTrajectoryPoint' );

message_point = rosmat_nh.newMessage( 'trajectory_msgs/MultiDOFJointTrajectoryPoint');

for i = 1:100


but it ends with an error saying:

>> publisher_trajectory
Shutting down node /matlab_generator on
No method 'setTransforms' with matching signature found for class 'org.ros.internal.message.$Proxy24'.

Error in publisher_trajectory (line 11)

I suppose the problem arises because trajectory_msgs/MultiDOFJointTrajectoryPoint[] is an array. But how to deal with it? How should I change my code to make it working?

Do you have any example where array are created and published in rosjava????


PS: using another not-array standard type (e.g. geometry_msgs/Point) works perfectly

edit retag flag offensive close merge delete