erfan

Terrain following

Recommended Posts

Hello
I have a question regarding to the parameter Terrain_Enable:

In mission planer states that :
This enables terrain following for RTL and LAND flight modes. To use this option TERRAIN_ENABLE must be 1 and the GCS must  support sending terrain data to the aircraft.  In RTL the RTL_ALT will be considered a height above the terrain.  In LAND mode the vehicle will slow to LAND_SPEED 10m above terrain (instead of 10m above home).  This parameter does not affect AUTO and Guided which use a per-command flag to determine if the height is above-home, absolute or above-terrain.



Does that mean Even if I am using  Teraranger evo 3 when landing it goes to 10 meter if setting waypoints using terrain ?

Thanks
@Spitfire76

 

Share this post


Link to post
Share on other sites
4 hours ago, erfan said:

This enables terrain following for RTL and LAND flight modes.

It looks like both TERRAIN_ENABLE and TERRAIN_FOLLOW must be set to 1 for it to be enabled in RTL and LAND modes. By default it looks like they are set to 1 and 0 respectively. 

 

4 hours ago, erfan said:

Does that mean Even if I am using  Teraranger evo 3 when landing it goes to 10 meter if setting waypoints using terrain ?

Where do you get the 10 meter value from ?. Is that from the parameter LAND_ALT_LOW which defaults to 10m ?. This is of course used in autonomous landing and when reached will slow the decent to the value of LAND_SPEED. These are used to help provide a gentle landing.

Its my understanding that without Terrain following enabled that 10 m would be 10 m above the home position. So say that the home position is 100 m above sea level (MSL) but you performed an autonomous landing on higher ground, at say 120m MSL, then the trigger to the slower decent speed would never be reached and maybe the UAV would bounce or even crash. With terrain following enabled this would be avoided as it would use the stored map data to know the height of the ground at that location although I understand that the data is not always that accurate which is why its better to have a rangefinder as that will know the true height above the ground or obstacle. 

Now one thing that comes to mind is that since the rangefinder is not used above RNGFND_MAX_CM which in your case is only 300 what happens above this height without terrain following enabled. Would it slow the decent at 3m instead of 10 m ?. I will have to check with SITL.

Edited by Spitfire76

Share this post


Link to post
Share on other sites
On 6/10/2019 at 9:17 PM, Spitfire76 said:

 

Where do you get the 10 meter value from ?. Is that from the parameter LAND_ALT_LOW which defaults to 10m ?

 This is what is written in full-parameter list when searching

TERRAIN_FOLLOW

In LAND mode the vehicle will slow to LAND_SPEED 10m above terrain (instead of 10m above home).  

does this mean even if I set 1 meter it goes to 10 meter ?

Share this post


Link to post
Share on other sites

what does sentence exactly mean by the word Terrain  ?
When the rangefinder can “see” the ground, the pilot’s throttle stick adjusts the target altitude above the terrain (i.e. the attitude corrected distance from the range finder)

should I use terrain following enable when I am using rangefinder to atomically adjust the height? 
if yes how this terrain used for rangefinder?
@Spitfire76

Share this post


Link to post
Share on other sites
9 hours ago, erfan said:

does this mean even if I set 1 meter it goes to 10 meter ?

What parameter are you referring to when you say setting to 1 meter ?. If its TERRAIN_FOLLOW that value is not in meters its just a boolean i.e 0 or 1, off or on.

My understanding of the behavior when in LAND mode is that the copter will initially descend at a relative fast rate which I believe is set by the parameter WPNAV_SPEED_DN and defaults to 150cm/sec and when it reaches the altitude set by LAND_ALT_LOW (default 10m) it reduces its descend speed to the value of LAND_SPEED (default 50cm/sec).

Assume for the moment you don't have a rangefinder installed and TERRAIN_FOLLOW is default to 0

The way ArduCopter knows its altitude is by using the barometer that uses atmospheric pressure to calculate it. When ARMED it say's "ok this must be the ground" and it uses that as 0 altitude for its whole mission. The issue is that the ground may not be entirely flat which means it could crash into higher ground like a hill or mountain. Say it has to land in LAND mode on higher ground than where it took off from and that ground is more than 10m higher it will never know to switch to a lower descend rate and so hit the ground at 150cm/sec!. 

Now assume that you still don't have a rangefinder installed but TERRAIN_ENABLE and TERRAIN_FOLLOW are set to 1. These tell ArduPilot to get terrain data from the ground control station, in our case Mission Planner, which in turns gets it from the mapping source. In other words based on a given latitude and longitude the mapping source also provides the ground height above sea level. For example say you take off at where the ground is at 100 m above sea level (MSL) and fly  to an altitude of 100m (200m MSL). You then fly to an area that is 150m MSL. Without the terrain data you would now be only 50m above the ground (still at 200 MSL) but with the terrain data Ardupilot adjusts its altitude to maintain 100 m above the ground (goes to 250 MSL). So when you go to LAND mode it will know when its 10m above the ground and switch to the lower descent rate. 

If you install a rangefinder it does not need to use the mapping data as it knows exactly its height above ground. It also has the advantage of detecting not just the ground but an object directly below it. Now the rangefinder is only used below its accuracy height which in your case is 3m (RNGFND_MAX_CM). This is below the 10m set by LAND_ATL_LOW so does the UAV descend at a rate of 150 cm/sec and when it starts to use the ranger finder at 3m reduce it to 50cm/sec.? I would hope so but I am not sure but will try to find out.

Edited by Spitfire76

Share this post


Link to post
Share on other sites
3 hours ago, Spitfire76 said:

1) What parameter are you referring to when you say setting to 1 meter ?.

2) This is below the 10m set by LAND_ATL_LOW so does the UAV descend at a rate of 150 cm/sec and when it starts to use the ranger finder at 3m reduce it to 50cm/sec.? I would hope so but I am not sure but will try to find out.

1st question :
I meant changing LAND_ATL_LOW to a lower value rather than 10m 
---------------------------------------------------

2nd question :
after changing this parameter in SITL 
param set RNGFND1_TYPE 1
param set RNGFND1_SCALING 10
param set RNGFND1_PIN 0
param set RNGFND1_MAX_CM 300
param set RNGFND1_MIN_CM 10
param set RNGFND1_ADDR 49

I simulate the flight 
above 10 m speed of down was about 150cm/s
but below 10 m it was decreasing to 70 cm/s  and about 6 m it was about 50cm/s
and below 3 m was also below 50cm/s

meaning no difference between 10 m and 3 m for the land speed?
I also tried this with a higher range for RNGFND max = 6000 

and RNGFND min = 20

the result was still the same , I could not see that much difference between the speed of landing

does it make sense? 
Could you also test it?

@Spitfire76

Edited by erfan

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.