Servers by jDrones

Mavros Offboard/Guided with no GPS

(Guillaume de Chambrier) #1

Hi guys, this is a duplicate question I have asked on rosanwer. But I figure more people here might know how to address my problem.

Hi, have recently been trying to control a rover equipped with a Pixhawk2 in an indoor environment.
For this purpose, I have followed the steps outlined in the mavros_offboard tutorial. I also had to change a few parameters on the PX4 firmware to allow the rover to arm without a GPS lock etc… I guess this should be the same for the ardurover flight stack.

After running a script similar to the tutorial one, I was able to switch to offboard mode (guided for ardurover), see below the echo of topic /mavros/state

  seq: 3105
    secs: 1503352094
    nsecs: 242159569
  frame_id: ''
connected: True
armed: True
guided: True
system_status: 4

However, the mavros node interfacing with the rover is printing the following output:

[ WARN] [1503352273.909538514]: GP: No GPS fix
[ INFO] [1503352280.350340503]: HP: requesting home position

I have tried to set this position with no success.

If any of you have managed to run a px4/apm robot in an offboard mode with no GPS I would be grateful for information on:

  1. Telling mavros/pixhawk not to expect a GPS fix

  2. Getting the tf topic to publish something (I guess this is related to 1.)

Thanks for any help.

(yukihiro noda) #2

Hi gpldecha, I am yukihiro.
sorry I don’t have your question’s answer.
I would like to control a Rover using the pixhawk via ROS.
I have followed the steps outlined in the “movros_offboad” too,
However, I can’t set the pixhawk to “offboard-mode”.
Could you tell me your changed parameters on the pixhawk (or another advice).

Follow is my matters…

$ rosrun mavros mavsys mode -c OFFBOARD

Request failed. Check mavros logs

$ roslaunch mavros px4.launch

… logging to /home/apsync/.ros/log/ea9565fa-b247-11e7-aca5-00044b6681a3/roslaunch-apsync-13607.log
Checking log directory for disk usage.This may take awhile.
Press Ctrl-C to interrupt
[ INFO] [1508140769.238255335]: Autostarting mavlink via USB on PX4
[ INFO] [1508140769.238398929]: Built-in SIMD instructions: ARM NEON
[ INFO] [1508140769.238485544]: Built-in MAVLink package version: 2017.9.9
[ INFO] [1508140769.238569763]: Known MAVLink dialects: common ardupilotmega ASLUAV
autoquad matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1508140769.238652158]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ERROR] [1508140795.114086732]: MODE: Unsupported FCU

$ rostopic echo /mavros/state

seq: 0
secs: 1508140769
nsecs: 91869815
frame_id: ''
connected: False
armed: False
guided: False
mode: ''
system_status: 0

Thanks for your any help.

(Guillaume de Chambrier) #3

Hi yukihiro,

Looks like mavros is not properly connected to the pixhawk. You have a connected: False
flag. It should be true.

First you should try to get a continuous flow of messages being published from the mavros/state topic.

Doing offboard with the PX4 stack is non-trivial. I have been in the processes of rewriting aspects of the PX4 stack to simply be able to run a rover without a GPS. I am still working on this.

(yukihiro noda) #4

Hi gpldecha,

Thank you for your reply.

I will try your suggestion.


(Pol De Petris) #5

Hi ! any develop on this topic ?
I’m implementing the offboard on pixhawk (px4 firmware) but I am getting confused on connections…
My idea was to simply connect my Pc -> usb to telem2 cable (diy) -> pixhawk and send mavros messages to move motors (just to see if it works or not)
What am I doing wrong ?

(Guillaume de Chambrier) #6

Not sure, I have not been able to get it working yet and I have taken a break from it. I am now back on it and trying again. I will let you know if I make any progress.