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

ROSmatlab + hydro + ardrone

asked 2014-05-13 09:57:35 -0600

Dr One gravatar image

I'm trying to use hydro from matlab 2013a on ubuntu. I've so far installed ROS, and the autonomy/ardrone code, as well as the ardrone_tutorials code and verified both work from the command line (i.e. I can roslaunch the demo code, control the drone, etc).

What I need to do next is set up a node in rosmatlab, which I believe I did correctly after setting environment variables etc:

node = rosmatlab.node('NODE','localhost',11311); % This completes correctly

When I try to add a subscriber, I see an error in the terminal window in which I'm running the drone driver, which leads me to assume the above line is correct. The problem is that rosmatlab does not seem to know what a message of type navdata is, thus the following fails:

sub = rosmatlab.subscriber('ardrone/navdata','ardrone_autonomy/Navdata',1,node);

java.lang.ClassNotFoundException: ardrone_autonomy.Navdata.

I'm not sure how to proceed. Do I need to somehow port the existing code into matlab?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-05-13 10:16:51 -0600

ahendrix gravatar image

Since rosmatlab is based on rosjava, it sounds like the messages you're using haven't been built for Java.

These tutorials may be useful:

edit flag offensive delete link more


Many thanks for taking the time to answer, I believe you are quite correct. Unfortunately building a custom message package seems fairly onerous given the present state of rosjava. Nevertheless, thanks a lot :)

Dr One gravatar image Dr One  ( 2014-05-14 02:12:55 -0600 )edit

You shouldn't have to create a custom message package; you just need to compile the messages in the existing ardrone_autonomy package for rosjava.

ahendrix gravatar image ahendrix  ( 2014-05-14 06:56:00 -0600 )edit

I figured that out a little before seeing your comment. Happy to say that a quick crash course on Gradle and rosjava builds saved the day. Now I'm just trying to figure servces and rosmatlab out...

Dr One gravatar image Dr One  ( 2014-05-15 09:42:37 -0600 )edit

Question Tools


Asked: 2014-05-13 09:57:35 -0600

Seen: 485 times

Last updated: May 13 '14