Terrain follow in Guided mode - w/ rangefinder

Hi, I am struggling to get our drone to do terrain follow while using a global go to command. When I send the command to the drone while it is in GUIDED, it does not move, there are no warning or error messages received / broadcasted.

Details on my setup:

  • Using copter 4.1.5.
  • Using a mavlink type rangefinder (distance data is calculated and sent using a distance sensor message)
  • Distance sensor message has type MAV_DISTANCE_SENSOR_LASER, and orientation MAV_SENSOR_ROTATION_PITCH_270, min and max are at 80cm and 1000cm
  • Go to command is sent using a set_position_target_global_int_send message, with the frame set as MAV_FRAME_GLOBAL_TERRAIN_ALT_INT.
  • Type mask for go to message is 0b0000110111000000
  • Distance sensor message, and go to command are both sent by a onboard companion computer connected via pymavlink.

The Rangefinder data can be seen in mission planner as Rangefinder 1, and the values are reasonable. I have verified that the go to command works by using every other available frame, which makes the drone move as expected.

The relevant parameters I have set are below:
TERRAIN_ENABLE 0 (this makes sure I don not use terrain data, which I do not provide)
RNGFND1_TYPE 10
RNGFND1_MIN_CM 80
RNGFND1_MAX_CM 1000
RNGFND1_POS_Z 1
RNGFND1_ORIENT 25

The only parameter I cannot find in mission planner, is TERRAIN_FOLLOW, is this not in later version of Arducopter or is there a parameter I have missed that makes it available?

The full paramters of the drone:

icon_params_terrain.param (20.1 KB)

Got it working, typemask of 0b0000110111111000 (ignoring velocity x,y,z) seemed to fix it. Interesting that specifying a velocity for terrain altitude vs global/relative altitude works differently. I suppose in terrain follow it requires more control over the vz? Seems strange

Try updating to ArduCopter 4.4.2. Guided mode has been improved.