A method comprising: receiving, at a controller , a command for moving a piston of a hydraulic actuator at a given speed in a given direction, wherein the hydraulic actuator includes a first chamber and a second chamber , and wherein a valve assembly comprises a first valve and a second valve, the first valve coupling a source of pressurized hydraulic fluid to the first chamber and the second valve coupling the second chamber to a return line; based on the command, the controller providing a first signal and a second signal to respectively operate the first valve and the second valve of the valve assembly to provide the pressurized hydraulic fluid to the first chamber and allow hydraulic fluid in the second chamber to flow from the second chamber to the return line so as to cause motion of the piston at the given speed in the given direction, wherein the second valve is controllable independently of the first valve; receiving position information indicative of the piston reaching a first position at a first threshold distance from an end-stop of the hydraulic actuator; in response, the controller modifying the first signal to the first valve of the valve assembly so as to reduce a speed of the piston; receiving position information indicative of the piston reaching a second position at a second threshold distance closer to the end-stop of the hydraulic actuator; and in response, the controller further modifying the second signal to the second valve of the valve assembly to cause the hydraulic fluid in the second chamber to apply a force on the piston in a direction away from the end-stop, and wherein (i) modifying the first signal is based on the speed of the piston between the first position and the second position, or (ii) modifying the second signal is based on the distance between the piston and the end-stop. receiving, at a controller , a command for moving a piston of a hydraulic actuator at a given speed in a given direction, wherein the hydraulic actuator includes a first chamber and a second chamber , and wherein a valve assembly comprises a first valve and a second valve, the first valve coupling a source of pressurized hydraulic fluid to the first chamber and the second valve coupling the second chamber to a return line; based on the command, the controller providing a first signal and a second signal to respectively operate the first valve and the second valve of the valve assembly to provide the pressurized hydraulic fluid to the first chamber and allow hydraulic fluid in the second chamber to flow from the second chamber to the return line so as to cause motion of the piston at the given speed in the given direction, wherein the second valve is controllable independently of the first valve; receiving position information indicative of the piston reaching a first position at a first threshold distance from an end-stop of the hydraulic actuator; in response, the controller modifying the first signal to the first valve of the valve assembly so as to reduce a speed of the piston; receiving position information indicative of the piston reaching a second position at a second threshold distance closer to the end-stop of the hydraulic actuator; and in response, the controller further modifying the second signal to the second valve of the valve assembly to cause the hydraulic fluid in the second chamber to apply a force on the piston in a direction away from the end-stop, and wherein (i) modifying the first signal is based on the speed of the piston between the first position and the second position, or (ii) modifying the second signal is based on the distance between the piston and the end-stop. (i) modifying the first signal is based on the speed of the piston between the first position and the second position, or (ii) modifying the second signal is based on the distance between the piston and the end-stop. <EOS>