ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Eskarppelli's profile - activity

2014-07-18 19:02:43 -0500 received badge  Famous Question (source)
2014-04-20 06:19:59 -0500 received badge  Notable Question (source)
2014-04-07 21:52:28 -0500 received badge  Popular Question (source)
2014-04-07 04:37:03 -0500 received badge  Editor (source)
2014-04-07 04:35:32 -0500 asked a question Matlab subscriber dont receive the ros publisher message

Hello,

I started the turtlesim and turtle_teleop_key like the tutorial says to, then I started the matlab subscriber and made ​​the connection. When I look at the information from the topic(@rostopic info), the connection seems to work, but my subscriber is not receiving messages posted to the topic. Does anyone know what could be the problem?

Code used: (ROS)

$ roscore

$ rosrun turtlesim turtlesim_node

$ rosrun turtlesim turtle_teleop_key

(Matlab)

-> node = rosmatlab.node('node','localhost:11311') %I cant post links

-> subscriber = node.addSubscriber('turtle1/cmd_vel' , 'geometry_msgs/Twist',1)

-> message = getmessage();

-> subscriber.setOnNewMessageListeners({ @message.set_mes});

classdef getmessage < handle

    properties 
        message        
    end


    methods
        function obj = getmessage()
            disp('Message Created')
        end


        function set_mes(obj, mes)
            obj.message = mes;
        end


        function ret = get_mes(obj)
            ret = obj.message;
        end
    end
end

Thanks