ROS SLAM APM Integration for autonomous indoor flight .

737 views
Skip to first unread message

Roberto Navoni

unread,
Jul 21, 2015, 11:14:30 AM7/21/15
to drones-discuss
Dear Friend,
i have a question what's better way to use slam in apm without GPS in
indoor enviroment ? Our first idea was to use ROS SLAM output as GPS
and interface it to APM firmware by a gps driver . We saw some
application where use RC ovverride for close the loop in control of
the drone what is better approach.
Best
Roberto

Gary McCray

unread,
Jul 21, 2015, 1:02:46 PM7/21/15
to drones-...@googlegroups.com
Hi Roberto,

It seems to me like it would work either way, but the RC override gives complete navigation control to the companion computer whereas GPS input would simply offset the GPS coordinates and depend on being in a very simple mode like loiter for operation.

I would think the RC_Override could be more versatile especially for something as complex as SLAM and it would also give you the opportunity to make activating / deactivating it a part of a Mission Plan.

That said, I can also see how the simplicity of simply offsetting GPS coordinates could be useful under some circumstances as well, definitely an interesting concept.

My take is if you actually feel the need to choose one or the other RC_override would be more useful.

But if you could reasonably implement both, each would have it's uses.

I am just starting to use ROS myself for my X/Y scanned laser rangefinder.

Mine is the least qualified voice in this room and I am sure others will have more significant considerations.

Best,

Gary

Roberto Navoni

unread,
Jul 21, 2015, 1:13:43 PM7/21/15
to drones-discuss
Hi Gary,
thanks for your reply do you know some good tutorial where is possible
to understand the interation between RC_Ovverride and SLAM for APM
based Flight Control ? For GPS simulation it's clear and i understand
the advantages and limit of solution but i don't found a clear
tutorial that explain the integration concept for RC_Ovverride i would
like to understand the advantages and disavantages of different
approach.
best
Roberto
> --
> You received this message because you are subscribed to the Google Groups
> "drones-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to drones-discus...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Gary McCray

unread,
Jul 21, 2015, 1:27:01 PM7/21/15
to drones-...@googlegroups.com
Hi Roberto,
To answer your question, no, I don't know where to find more information on RC override, but I think Randy has used it and at least a few others, they should be able to help .

But another thought occurred to me relating to GPS offset, which seems like it could work pretty well for horizontal motion.

But as I understand things it could be a problem for vertical motion since the barometer is primarily used for altitude and GPS is at most "blended".

It would seem to me you would generally need to be in a mode that depended solely on the GPS for altitude for "GPS offset" to work well indoors and I don't know that we have that.

You probably could probably emulate optical flow or more simply a laser rangefinder / sonar as well, but that is another interface.

I think Randy will be of more help than I on this topic he has much, much more experience with it than I do.

Best,

Gary

Roberto Navoni

unread,
Jul 21, 2015, 1:36:41 PM7/21/15
to drones-discuss
Hi found this page on px4 website ...
https://pixhawk.org/dev/offboard_control/testing
here there is an example of set position by ros ... but i think that
in this case use GPS for position not visual slam ... so at the end of
doc there is this interesting info :

px4: the current firmware uses ekf_att_pos_estimator as the default
estimator. This estimator does not support vision estimate positioning
input, so if you are performing indoor navigation, change the default
estimator to inav. This can be done in the ROMFS script or use the
NuttShell to stop the EKF and start inav.
Mean that for SLAM integration is better to use inav instead of EKF
on PX4? @Randy @Paul do you have some idea about it ?
best
Roberto

Randy Mackay

unread,
Jul 21, 2015, 9:06:04 PM7/21/15
to drones-...@googlegroups.com

Looks like you're looking at the px4 stack website - that may work but I can't give any advice on that.

If using optical flow it should be possible to Loiter indoors with AC3.3 and with some minor changes even in Guided.

For control I'd strongly recommend that rc-overrides are not used. The velocity controller could be used or we could add support for a lean angle based control (which many are asking for) or add support to set a position using a LOCAL_NED position.

If the SLAM solution is providing a position estimate then the best solution might be to ask Paul to enhance the EKF so that it accepts positions from other systems besides a GPS. One problem is that the EKF is already very complex and Paul is busy working on breaking it up into smaller pieces so he may not have time to help you in the near future.

-Randy

Roberto Navoni

unread,
Jul 22, 2015, 2:26:25 AM7/22/15
to drones-discuss
Hi Randy,
i check the ROS enviroment and test it on our on board companion
computer I think that it's a very powerfull enviroment rich of a lot
of great algorithm for mapping and navigation , could be very nice
define a standard approach for interface apm software to it for indoor
or in some enviroment where GPS is not so stable . Actually my first
idea is to implement a slam->gps driver for transform the information
from slam in some similar to a ublox gps data for do the first test.
Could be nice that Victor or Lorentz join this discussion for support
the best approach.
Best
Roberto

2015-07-22 3:05 GMT+02:00 'Randy Mackay' via drones-discuss
<drones-...@googlegroups.com>:

Víctor MV

unread,
Jul 23, 2015, 4:24:07 AM7/23/15
to drones-discuss, lase...@gmail.com
Hi Roberto,

+1 to Randy's comments on not using rc-override. It's not secure for dev. purposes and you definitely want to have the chance to take over the drone if something goes wrong. There're several ways of starting this over and some have been exposed above. If you want to take the Hector or PX4 routes you should probably reach out those groups.

Although mavros already provides a bridge I believe that it'll need to be extended if you wanted to use it for this particular application. I haven't looked at it throughfully but to me the easiest way would be to add another flight mode in APM that interacts with ROS through the right topics processing the logic coming from the SLAM algorithm and translating it into the right set of movements (thereby you'll need to make use of the ROS client library within APM). I would make sure to implement code that allows me to take over manually with the RC controller. We did something similar with GUIDED mode at https://github.com/erlerobot/ardupilot/commits/hackguide




איתי גיא

unread,
Jul 25, 2015, 1:50:12 PM7/25/15
to drones-discuss, lase...@gmail.com
Hi Roberto ,

I don't think that the interface with the pixhawk is the issue. 
but the SLAM algorithm used .
since the SLAM is stochastic algorithm , solving it correctly must take the state of the system into consideration (pos and control).
so , after you have a solution you can inject it directly .
there are approaches that separate the INS from the sensors estimation . look into it !

Itay

Roberto Navoni

unread,
Jul 27, 2015, 2:04:24 AM7/27/15
to איתי גיא, drones-discuss
Hi Itay,
i agree with you , my first idea was to use SLAM output as FAKE GPS
information and use it with a special GPS driver then use data fusion
olready available for GPS.
Best
Roberto

Roberto Navoni

unread,
Jul 27, 2015, 2:06:32 AM7/27/15
to Víctor MV, drones-discuss
Dear Friends
Some one already used rosserial on windows for connect to ROS machine
? Are there more reliable alternative option ? We are testing it but
after a while it crash , and if you use Lidar information you need to
decimate the array laser information before to send because the limit
of array is at 255 .
best
Roberto
Reply all
Reply to author
Forward
0 new messages