Closed liang-tang closed 8 years ago
What firmware used? Versions of ROS, MAVROS, Firmware?
jade, ros-jade-mavros, Firmware(commit: 9fedda43c6a501575773d83d715c36c46ac05f6a)
I would like to know what you are trying to do with the code It seems like mavros is functioning as it is supposed to but the code is misleading from your intentions.
a. It seems like you are trying to send the rate values in to the attitude.pose.position values. If you are using topic "/mavros/setpoint_attitude/attitude", then you should be sending the attitude values(on the quaternion), not the position values as shown in the code. such as
attitude.pose.orientation.x = q1;
b. You are publishing attitude topics and the attitude rate topic at the same time.
ros::Publisher attitude_pub = nh.advertise<geometry_msgs::PoseStamped>
("/mavros/setpoint_attitude/attitude", 10);
ros::Publisher attitude_rate_pub = nh.advertise<geometry_msgs::TwistStamped>
("/mavros/setpoint_attitude/cmd_vel", 10);
I am not sure what happens if you publish both at the same time, but try publishing just one of the topics which you want to use.
c. If you are controlling attitude rate, 10Hz might be a little slow to have successful flight performance.
I hope this will be useful in solving your issues,
@Jaeyoung-Lim thank you very much:) ,you're absolutely right. it just was for testing,because i want to control vehicle by mavros. i don't know whether it works well or badly.
hello every, i wrote a demo of mavros to test SET_ATTITUDE_TARGET, when i send /mavros/setpoint_attitude/cmd_vel & /mavros/setpoint_attitude/att_throttle,the vehicle behaves normally. but when i send /mavros/setpoint_attitude/attitude & /mavros/setpoint_attitude/att_throttle, the vehicle just Rise and fall(depends on throttle), can somebody tell me why ? thanks