## 4 Environment Perception, Mapping, and Representation for Locomotion
### Survey of Environment Perception for Locomotion in Snake Robots  
Many of the snake robots found in literature are equipped with a camera located in the head of the robot and pointing in the same direction as the navigation direction. However, in most cases, the images captured by the camera are not used for visual feedback for the robot's control, but sent to the operator for her/him to plan the robot's trajectory or to solve the high level applications, which in the case of snake robots are usually inspection or search-and-rescue operations. One way a snake robot can have a very simple perception of the surrounding environments is by using _proprioception_; i.e., using the robot's own internal state (e.g., joint angles, motor current levels, etc.) to derive some properties of the environment. As an example, [53] showed that the tilt angle of a slope can be inferred by only using the snake robot's state estimated from the joint angles, and used this information to adapt the behaviour of sidewinding and maximise the travelling speed. In [52], a heavily bioinspired method was developed based on the mechanics and neural control locomotion of a worm which also uses a serpentine motion. The objective in this case is to react and adapt to obstacles in the environment. The work in [58] implements strain gauges measuring the deformation in the joint actuators; from these measurements, the contact forces applied to a waterproof snake robot are calculated. The sensing modality that is most commonly explored in snake robots for environment perception is _force_ or _contact_ sensors. The first snake robot in 1972 [10] already used contact switches along the body of the snake robot, and demonstrated lateral inhibition with respect to external obstacles. Apart from reacting to contact with obstacles, the main use of force sensors is to adapt the body of the snake robot to the irregularities of the terrain [56; 57]. The authors in [54] claim to feature the first full-body 3D-sensing snake. The robot is equipped with 3-DOF force sensors integrated in the wheels (which are also actuated), and uses this data to equally distribute the weight of all the segments, apart from moving away from obstacles at the sides. In [55], a different application of contact sensors is shown, in which lateral switches distributed along the body of the snake are used as touch sensors to guarantee that there are enough push-point contacts so that propulsion can be performed. In case the last contact point was lost, the robot performs an exploratory movement. The snake robot in [15] is already designed aimed at obstacle-aided locomotion, by including two main features: a smooth exterior surface that allows the robot to glide, and contact force sensing by using four force-sensing resistors on each side of the joint module, and assuming that in locomotion on horizontal surfaces it is enough to know on which side of the robot the contact happens. Robots that base their environment perception on contact-based sensors exclusively allow for limited motion planning. For example, when aiming at obstacle avoidance, it is impossible to achieve full avoidance, as the robot needs to make contact with the obstacle in order to realise its presence. However, in [84; 85], it is demonstrated that environment representation can be achieved purely by contact sensors. In this case, whisker-like contact sensors were used in a SLAM framework to produce an environment representation that could potentially be used for planning and obstacle-aided locomotion purposes. The use of range or _proximity_ sensors allows snake robots to not rely on contact in order to perceive the environment, and thus perform obstacle avoidance. The works in [60; 61] feature active infrared sensors used to implement reactive behaviours for avoiding obstacles, either by selecting an obstacle-free trajectory in the first case, or by adapting the undulatory motion for narrow corridor-like passages in the second one.