Cartographer SLAM does not work with Rover-4.1.0

Hello everyone,
Is it no longer possible to implement SLAM in Rover-4.1.0?

Now I’m trying to implement Cartographer SLAM by looking at this document.
Last day I was able to get ROVER running autonomously indoors using a Pixhawk CUBE Black with Rover-4.0.0 installed and a Jetson Xavier NX.
And today, after installing Rover-4.1.0 rc3 on Pixhawk, the “VISION_POSITION_ESTIMATE” data is no longer sent from Jetson to Pixhawk.
I re-installed Rover-4.0.0 on Pixhawk again, and that fixed this problem.

Is SLAM support going to end with Rover-4.0.0?
Or do I need additional changes in the full parameter list to run indoor autonomous driving with SLAM in ROVER-4.1.0?

Hi @SpreadKnowledge,

We’ve actually improved support for external position estimates in 4.1 so I’m not sure why it isn’t working.

how do you know that the VISION_POSITION_ESTIMATE data is not being sent by ROS? Are you checking with MP’s mavlink inspector or is it just a warning on the HUD?

My two guesses are:

  1. we’ve changed some messages that ROS was relying on so it won’t start sending
  2. the VISO_TYPE parameter needs to be set

If you’ve got logs of it working and not working that might help figure out what’s going on.

Txs for giving this a try and reporting back!

1 Like

@SpreadKnowledge,

Can you also check that Rover-4.1.0-rc3 is installed? -rc2 had a problem with auto detection of serial port flow control which could cause problems if Telem1 or Telem2 were used with a companion computer connected using a serial cable with only 4 pins (e.g. no flow control).

1 Like

Thanks for replying!

I installed Rover-4.0.0 and Rover-4.1.0 firmware to Pixhawk again today to check Cartographer SLAM operation.
I opened the “MAVlink Inspector” window and confirmed that Jetson was sending location information to Pixhawk with Rover-4.1.0 rc3 firmware installed.
However, the HUD displayed the error message “Unhealty AHRS” and the Rover icon did not appear on the map when I clicked on “Set EKF Origin”.

Pixhawk gets the location information sent from Jetson via the Telem2 port, which is connected to only three pins: TX, RX, and GND.
The official documentation says to use EKF2, but I think there is a problem here.

1 Like

@SpreadKnowledge,

Ah, ok. Those docs haven’t been updated in a while so you should definitely use EKF3 and then set VISO_TYPE = 2 and the EK3_SRC_xxx parameters.

The setup is most like the setup for the T265.

Rover-4.1 also supports GPS/Non-GPS transitions.

1 Like

Thanks for the advice!

Finally, I have confirmed that I can run autonomous driving with Cartographer SLAM using Pixhawk with Rover-4.1.0 firmware installed.
You are right, changing to EKF3 instead of EKF2 was the key.

The following is the full parameter list that I have changed. Basically, it is the same as the one in the T265 setup.
I hope it will be helpful for someone else to do the same thing as me in the future.

SSERIAL2_PROTOCOL = 2
SERIAL2_BAUD = 115
AHRS_EKF_TYPE = 3
EK2_ENABLE = 0
EK3_ENABLE = 1
EK3_SRC1_POSXY = 6
EK3_SRC1_POSZ = 1
EK3_SRC1_VELXY = 6
EK3_SRC1_VELZ = 6
EKF3_SRC1_YAW = 6
GPS_TYPE = 0
VISO_TYPE = 1 (MAVLink)
COMPASS_USE = 0
COMPASS_USE2 = 0
COMPASS_USE3 = 0

Now that I’ve confirmed that ROVER-4.1.0 can also use Cartographer SLAM, so I’ll be able to use RTK-GNSS and Cartographer SLAM together for both outdoor and indoor autonomous driving.

Thank you very much for this!

1 Like

Great that you got it working! I’ll add it to my to-do list to update the wiki with the new parameter values for 4.1

I saw you published a YouTube video as well on this subject so I look forward to watching that, txs!

1 Like