I am building a fixed wing drone and I am trying to send velocity commands to the flight controller (a Pixhawk) from an onbord computer (Nvidia Jetson TX2) running ROS. 

the code I am using to send the commands looks like this:

ros::Publisher cmd_vel_pub = nh.advertise/span>geometry_msgs::TwistStamped>("mavros/setpoint_velocity/cmd_vel", 10);

geometry_msgs::TwistStamped cmd_vel;

while (ros::ok()) {

cmd_vel.header.stamp = ros::Time();

cmd_vel.twist.linear.x = 10;

cmd_vel.twist.angular.z = 10;



I am trying this with Ardupilot's SITL simulator and I have managed to send other commands over Mavros such as arm, takeoff and a set of waypoints that the drone in the simulation can reach. But when I send velocity commands nothing happens. 

Has anyone tried to do something similar, or found some documentation on weather the arduplane code supports velocity commands? 

Thankful for any help I can get! 

Views: 285

Reply to This

Replies to This Discussion

hi ,

      I use tx2 on the pixhawk,I am also using arducopter to send instructions. How do you do it, can you share your operation?


I ended up using the RCOverride command. Our code can be found here: https://github.com/alessandro-montanari/APF-Drone-Navigation

Reply to Discussion



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service