code: public TrajectoryEnvelope getClosestGroundEnvelope(long time) {
  		if (this.getTemporalVariable().getEST() > time || this.getTemporalVariable().getEET() < time) return null;
  		if (!this.hasSubEnvelopes()) return this;
  		for (TrajectoryEnvelope te : this.getGroundEnvelopes()) {
  			if (te.getTemporalVariable().getEST() <= time) {
  				if (te.getTemporalVariable().getEET() >= time) {
  					return te;
  				}
  				else if (this.getGroundEnvelopes().higher(te).getTemporalVariable().getEST() > time) {
  					return te;//this.getGroundEnvelopes().higher(te);
  				}
  			}
  		}
  		return null;
  	}
docs: Get the ground {@link TrajectoryEnvelope} in which the robot will be
  at a given time. Returns <code>null</code> if the robot will not be in this
  {@link TrajectoryEnvelope} at the given time.
  @param time The time at which to return the {@link TrajectoryEnvelope}.
  @return The ground {@link TrajectoryEnvelope} in which the robot will be
  at a given time, or the ground {@link TrajectoryEnvelope} it is leaving in case
  the robot is traveling between the end point of one ground envelope and
  the starting point of the next one.