Using mavros with turtlesim

asked 2016-05-04 08:18:56 -0600

RushHope gravatar image

I'm working on an application which takes in a robot's current state and returns desired state changes to the robot, via a robot driver. I'm using ROS's turtlesim robot simulation to test it. The driver successfully gets the turtle's "Pose", analyses it, and then sends it the desired new linear & angular velocities ("Twist").

Now, i'd like to implement mavlink on it. Since the robot uses ROS, i'll be using mavros to make the driver and the robot communicate. However, i'm a fairly new ROS and mavros user, and most of the information available on mavros is geared towards Pixhawk users so i'm very confused about how to implement this using turtlesim. So i have a few questions:

1). Does using mavros have the same advantages as using mavlink for communication (higher safety is obvious, but higher speed?)

2). Is this the correct communication flow that i should implement: driver node <--> mavros_node <--> turtlesim_node?

3). At each end of the communication flow, i need to write code that uses mavros_msgs::mavlink::convert() to pack/unpack the data being transferred?

4). To run mavros_node (rosrun mavros mavros_node _fcu_url:=), what will my _fcu_url be?

5). Do i make turtlesim send a "heartbeat" to connect to mavros_node, and how?

I'm using Ubuntu 14.04, ROS indigo, Python 2.7.6. The application, ROS, turtlesim simulation are all working on the same machine. Any help is much appreciated. Thank you!

edit retag flag offensive close merge delete