Hello,

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;

cmd_vel_pub.publish(cmd_vel);

}

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: 126

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?

Hi, 

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

Reply to Discussion

RSS

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service