Subscribe /ar_pose_marker in matlab [closed]
Hello, I am having a problem with matlab and ROS. I would like to subscribe /ar_pose_marker in matlab but i am getting a error
Thats the Matlab code:
clear,close, clc; %addpath(genpath('/home/Downloads/email')); %addpath('/home/Downloads/email'); global pos; setenv('ROS_MASTER_URI','http://paulo-Inspiron-7537:11311') setenv('ROS_IP','192.168.1.2') rosinit('http://paulo-Inspiron-7537:11311','NodeHost','192.168.1.2','NodeName','/teste') camera = rossubscriber('/ar_pose_marker',@getPose);
Thats the error that I get:
Initializing global node /teste with NodeURI http://192.168.1.2:34676/
Error using qr_pose (line 13)
Failed to create a subscriber with topic name /ar_pose_marker and type ar_track_alvar_msgs/AlvarMarkers.
And if I try to do rostopic echo /ar_pose_marker on matlab I also get these error:
>> rostopic echo /ar_pose_marker
Failed to create a subscriber with topic name /ar_pose_marker and type ar_track_alvar_msgs/AlvarMarkers.
There is no problem in ROS Linux terminal, the rostopic echo is working and also a Subscribe code that I made on cpp.
Does anybody have a clue ? Edit: I am using Kinetic on Ubuntu 16. Other things are working on matlab like subscribing /turtle1/pose Thanks for your help, I really appreciate it !!!
Have you posted as much code as you can? I have a feeling you may have not, because I don't see where you're trying to use
qr_pose
.