Mavros Offboard/Guided with no GPS

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

header: 
  seq: 3105
  stamp: 
    secs: 1503352094
    nsecs: 242159569
  frame_id: ''
connected: True
armed: True
guided: True
mode: OFFBOARD
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.

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

header:
seq: 0
stamp:
secs: 1508140769
nsecs: 91869815
frame_id: ‘’
connected: False
armed: False
guided: False
mode: ‘’
system_status: 0

Thanks for your any help.

@tanakaichiro
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.

Hi gpldecha,

Thank you for your reply.

I will try your suggestion.

Thanks.

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 ?

1 Like

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.

1 Like

Hii
sorry don’t have answer for your question, i juste want to know how you did

“…change a few parameters on the PX4 firmware to allow the rover to arm without a GPS lock …”

because i’m trying to change the mod to GUIDED and it’s not working and i think it will be resolved by disabling GPS because it doesn’t get any information ?
Thanks in advance.

@aksel

ARMING_CHECK 0
ARMING_REQUIRE 0

Check pixhawk-2-and-here-gnss-setup/. I think the parameters are the same. Btw I stopped using the PX4 flight stack and switched to Ardupilot.

Thanks for answering,
But unfortunately the GPS is not the problem i still can’t change the mode, the only ones that it can switch to are HOLD and MANUAL, it shows me a "Failed " message when trying to switch to other modes, do you have an idea about the source of the problem ?

Hi @gpldecha,
I know it’s been more than an year that there’s been any activity in this topic, but I was wondering if you were successful on your endeavour. I’m currently working on a Rover which will have a Jetson Nano as a companion computer and I would pick your brain for some info if you would be happy with it.
Cheers,
Carlos