Reading data from AR.Drone 2.0 with ROS and sending to Matlab through IPC [closed]

asked 2013-01-27 22:29:12 -0500

Cecilio Angulo gravatar image

updated 2014-01-28 17:15:00 -0500

ngrennan gravatar image


I'm trying to use IPC to send data collected from the Parrot's AR.Drone 2.0 with ROS to Matlab R2009a, but empty structures are read.

I've followed the tutorial at Penn Robotics.

After some known arrangements, the "Run the example matlab subscriber" works and I'm able to understand (I guess) how matlab_subscriber_example.launch and ipc_bridge_example/example_subscriber.m work.

Currently I'm trying to send information from the topic /ardrone/imu (which is a topic type sensor_msgs/Imu, supported by IPC) to Matlab, but I can get it.

My publisher launcher, similar to the example, is:


<node pkg="ipc" name="central" type="central" output="screen" args="-su"> </node>

<node pkg="ipc_sensor_msgs" name="example_node" type="sensor_msgs_Imu_subscriber" output="screen"> <remap from="/ardrone/imu" to="/example_topic"/> </node>


so, I made changes to: 1. node pkg="ipc_sensor_msgs" 2. type="sensor_msgs_Imu_subscriber" 3. from="/ardrone/imu" 4. value="imu"

The Matlab subscriber is:

% IPC-Bridge Example Subscriber % 1/24/2011 % Ben Cohen clear all; clc;

% add the ipc_bridge_matlab binaries to your path %[a, p] = system('rospack find ipc_geometry_msgs') %addpath(strcat(p, '/bin')); addpath('/opt/ros/fuerte/stacks/ipc_msgs/ipc_sensor_msgs/bin')

% create a publisher that publishes a geometry_msgs/Twist message pid=sensor_msgs_Imu('connect','subscriber','example_module','imu');

% create an empty geometry_msgs/Twist message structure msg=sensor_msgs_Imu('empty');

% read a message and print to screen while (1) msg = sensor_msgs_Imu('read',pid,100) %msg.linear.x %msg.linear.y %msg.linear.z %msg.angular.x %msg.angular.y %msg.angular.z end

hence, changes are: 1. addpath('/opt/ros/fuerte/stacks/ipc_msgs/ipc_sensor_msgs/bin') 2. pid=sensor_msgs_Imu('connect','subscriber','example_module','imu'); 3. msg=sensor_msgs_Imu('empty'); 4. msg = sensor_msgs_Imu('read',pid,100)

I did chmod +x on the publisher launch and everything is running, but it is returned in the command window that a 0-by-1 Cell is obtained.

Thanks for your help.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-10-14 16:16:00.524679