Using sensor_msgs/JointState in the newly released rosmatlab my MathWorks [closed]

asked 2014-02-09 08:13:39 -0500

Adnan Munawar gravatar image

I recently installed the rosmatlab package from Mathworks. I am trying to create a msg of type sensor_msgs/JointState as follows, msg = rosmatlab.message('sensor_msgs/JointState', node)

given that roscore and node are already defined.

I am then using

msg.setName('something')

I am getting the following error

No method 'setName' with matching signature found for class 'org.ros.internal.message.$Proxy23'.

I cannot find the documentation for msg.setName to look for the funcitons arguments.

I can however call

msg.setPosition(21) and msg.setVelocity as expected.

Please help

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2016-08-14 01:14:05.587705

Comments

Hi, the solution is on : https://de.mathworks.com/matlabcentra... . Matlab version 2017a. Thanks!

ViktorDluhos gravatar image ViktorDluhos  ( 2017-08-17 10:10:33 -0500 )edit

As you already note on your answer on Matlab Central, the current ROS support in the Robotics toolbox of Mathworks is rather different from the rosmatlab pkg that the OP was using. I'm not sure the answer is 'portable'.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-17 14:12:42 -0500 )edit

Well, yes I told that I have newer version but the solution is revelant to the question. So if someone will have this problem in the future and he will have a newer version of matlab, he will find his solution here. The point is to create Cell Array od strings (then you can use it to set parameter)

ViktorDluhos gravatar image ViktorDluhos  ( 2017-08-17 14:41:00 -0500 )edit

But if you think that the solution isnt relevantné enough then you Can delete my answer. I just wanted to help dome people. Best regards.

ViktorDluhos gravatar image ViktorDluhos  ( 2017-08-17 14:42:43 -0500 )edit

I thought the question was referring to tu-darmstadt-ros-pkg/rosmatlab, which has the same name, but is not from Mathworks.

I'm not going to delete anything. I was merely wondering whether the same software was being referenced.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-17 14:45:09 -0500 )edit

Well yes I agree with you. Im not entirely sure if it could work on rosmatlab. Im current working onconnection ROS with Matlab and I Washington havinka the samé problém and couldnt fond the answer anuwhere. So I just shared what I found out.

ViktorDluhos gravatar image ViktorDluhos  ( 2017-08-17 14:50:42 -0500 )edit