Closed JJERPEB closed 8 years ago
Did you got "connected" message? What rosrun mavros checkid
says (run mavros first)?
First on a terminal a ran roslaunch mavros apm.launch
and I get this
In another terminal I ran rosrun mavros checkid
and this is what I get
ERROR. I got 3 addresses, but not your target 1:1
---
Received 794 messages, from 3 addresses
sys:comp list of messages
13:1 0, 1, 2, 35, 36, 165, 193, 33, 74, 241, 163, 116, 62, 150, 24, 152, 27, 125, 30, 42
51:68 109, 166
12:1 0, 33, 2, 35, 36, 165, 1, 42, 125, 152, 163, 116, 30, 150, 24, 27, 74, 62
So you somehow has several devices. 51:68
is 3DR Radio, and i see it's messages RADIO_STATUS
and RADIO
.
Set target system by adding tgt_system:=13
to launch.
This worked, thank you for your help!!
Hello!
I'm new to ROS and MAVlink and have been trying to control the pixhawk from a drone in a project i'm working on withouht succes...
I want to create a node that changes the drone mode to auto, then arms the drone and send a WP to the autopilot...
this is what i came up with...
`
include
include <ros/ros.h>
include <mavros_msgs/CommandBool.h>
include <mavros_msgs/CommandCode.h>
include <mavros_msgs/CommandTOL.h>
include <mavros_msgs/SetMode.h>
include <mavros_msgs/Mavlink.h>
include <mavros_msgs/Waypoint.h>
include <mavros_msgs/WaypointList.h>
include <mavros_msgs/WaypointSetCurrent.h>
include <mavros_msgs/WaypointClear.h>
include <mavros_msgs/WaypointPull.h>
include <mavros_msgs/WaypointPush.h>
int main(int argc, char **argv) { int rate = 10;
// Setting Autopilot to ARMED
} ` code in txt file node.txt
When I run the node I get the following
[ INFO] [1469719022.983060738]: setmode send ok 1 value: [ INFO] [1469719027.984290461]: ARM send ok 0 value [ INFO] [1469719031.988864722]: WP send ok 0 value
and mavros gives me these lines...
[ WARN] [1469719155.319478523]: WP: timeout, retries left 2 [ WARN] [1469719156.319690261]: WP: timeout, retries left 1 [ WARN] [1469719157.320182784]: WP: timeout, retries left 0 [ERROR] [1469719158.320509131]: WP: timed out.
I do not have a GPS fix (testing indoors) so that might have an impact on the WP
I've also read that there is a topic mavlink/to but I don't understand how to publish a wp or a mavlink message to it...
Any help will be greatly appreciated.