Space Engineers

Space Engineers

Not enough ratings
Wheeled Rover Drone
By Survival Ready
Vanilla Automation of Wheeled Drone Rovers
   
Award
Favorite
Favorited
Unfavorite
Introduction
Vanilla automation of any drones in SE is based on the use of several AI blocks that allow you to solve basic game tasks: attack or defense, movement by GPS coordinates, following the carrier (leader), as well as takeoff (deployed) from the carrier and returning to it.

All drone movements are controlled by the AI ​​Flight (Move) block, which can turn towards a target and move towards it using thrusters, but this block cannot control the wheels, and therefore building a vanilla wheeled drone is not an easy task.

The main idea for a wheeled drone is to use Propulsion Override for movement and Handbreak for stopping. The rover will turn towards the target using gyroscopes, overcoming the friction force of the wheels.

Note: in SE, the direction of wheel rotation depends on the orientation of the suspension. For forward movement, positive values ​​are used for the left wheels, and negative values ​​for the right ones.

To solve the problem, I made a small rover with a 3x3x4 wheelbase and a custom turret, due to which the drone's center of mass shifted upward. This is not the simplest drone design, but it allowed me to understand in detail the features of the suspension settings, as well as objectively evaluate the practical side of the idea.

Rover with a shifted center of mass
Simplified and more stable game design

You can test the drone's behavior along with reading the manual to see how it works. I will describe the testing methodology and features in the relevant sections.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3304663625
MNLAV-21 is a universal drone that can be used as a regular rover with control from the cabin or via a remote control unit, as well as an autonomous drone with automation of all basic behavior modes and binding to the carrier. The description of the control buttons on the digital panels is displayed on the cockpit screens.
Suspension setup
The rover has two control modes — manual from the cabin and automatic for the drone. Each mode has its own setting that allows it to move along the surface of the planet without tipping over on turns, steep slopes and braking at high speed. All tests were carried out on Pertam with a gravity of 1.2g. The rover's mass, including ammunition, is 21.6 tons.

The suspension settings for controlling the rover in manual mode from the cockpit or via the remote control unit are no different, you can use the settings you are used to. I use the same settings for the entire suspension. In this case, this allows you to stay on a slope of up to 45 degrees with the handbrake.


When controlling in drone mode, different settings are used for the front and rear pair of wheels, which boils down to turning the all-wheel drive rover into a rear-wheel drive one. In this case, turning will be performed by the front pair of wheels, and driving — by the rear.


Note that all wheels are set to Proplution Override, which makes the rover always move. This value should be set so that the rover does not break away from the handbrake with the current wheel friction settings.

Hint: This is a very convenient game mode - you just need to release the brake and the rover will start moving forward like a spaceship with the dampers turned off. All you have to do is turn the car in the desired direction, without worrying about constant acceleration with the "W" key. To test it from the cabin, press #9 and turn off the handbrake.

Park and climb
These are two more necessary suspension settings if the drone is used together with the carrier.

The most reliable way to park in the hangar is a magnetic plate together with a handbrake, which prevents the rover from falling off the mount while the carrier is moving along the planet's surface.

If the drone design allows, then the easiest way is to use the minimum suspension height setting and a magnetic plate installed at the bottom of the drone. Automatic parking in the hangar is provided by the event controller configured for Landing gear locked. You should not use the Ready to lock or Autolock event due to possible accidental parking while moving.

To climb the ramp, on the contrary, use the maximum suspension height setting. The simplest design of a sliding ramp is based on Hangar Door blocks, but they have an unpleasant feature — the height of the sides of the sliding parts, which a 3x3 wheeled rover may not overcome, especially with a large ramp steepness.

To drive up a ramp, you need to not only set the maximum suspension height, but also make it soft using the Strength parameter. 10% will be enough to prevent the rover from bouncing off the ramp ledges during the climb.

To prevent the rover from tipping over backwards, you need to enable the gyroscope control interception and additionally set a small forward rotation. In my case, this is Pitch with a negative value. This parameter depends on how the gyroscopes are installed. It is easy to select in practice.

Parking in hangar of carrier on magnetic plate
Climbing a ramp at an angle of 45 degrees
Gyroscopes
Gyroscopes will not be superfluous on any rover. With their help, you can achieve greater stabilization in motion and avoid tipping over during sudden braking, but for a wheeled drone, these are mandatory units. There should be enough of them so that for the suspension settings you have chosen, their power is sufficient to turn the rover on the spot, overcoming the friction mode on the planet's surface, taking into account the cargo load.

My rover has 6 of them and they are located in the front of the car to compensate for the center of mass shifted back. Gyro control interception is automatically enabled when moving at speeds above 1 m / s and disabled when parked. This allows the AI ​​Flight (Move) unit to quickly turn the rover to the target.

Another useful property of gyroscopes is the ability to overcome steep climbs. As in the case of a ramp, you need to add pitch interception (forward rotation) — this will add traction to the front wheels and prevent tipping back.

It is better to orient the gyroscopes in the same way
Gyroscopes help climb slopes up to 60 degrees
Vanilla automation
Vanilla automation of a wheeled rover is possible a little less than completely. All necessary actions can be set using Timers, sensors, Event Controllers and Action Relays, but for some unknown reason the SE developers do not provide the ability to control the HandBreak state, although such an opportunity is embedded in the cockpit properties.

Via the digital panel of the control blocks, you can only set the HandBreak switching, but not turn it on or off, as is done, for example, to control the switching on and off of the block, where both OnOff switching and On/Off switching are provided.

In principle, HandBreak switching may be enough if you do not interfere with the drone control and constantly remember what state they are in, but this will greatly complicate the automation, so to control HandBreak I use the EasyPlay script, which allows you to add this feature with one line of the scenario, which is located in the CustomData Programm block PB EasyPlay
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2688952356
Another necessity of using a script is the way to implement the setting of digital values, which are represented using a slider. For example, to set the suspension height, the Increase Height Offset, Decrease Height Offset and Reset Heght Offset commands are used.

In order to switch between two suspension height settings, you will need two timers, in which you will first need to reset the suspension height using Reset Heght Offset, and then set the desired height using several Increase/Decrease Offset commands. And this is only one suspension parameter, and you need to set up to seven values.

Obviously, the result will be an unplayable drone consisting of 90% timers. Therefore, I use a script to avoid 100% vanilla masochism. Otherwise, there is nothing in the EasyPlay control scenaries that could not be set in a game way, so the automation can be considered vanilla.
Automation blocks
This section will describe all automation blocks and their purpose. In total, you will need to install: 1 Remote Control, 5 Action Relay, 4 AI behavior block, 4 Event Controller, 3 Sensor, 2 Timer, 1 Broadcast Controller and 1 Programm block.


Action Relay
After the Signal update, a full-fledged ability to control drones remotely appeared. All the main drone behavior patterns are implemented through these blocks:

Action Attack (channel 1) — enables AI Offensive (Combat) Behavior and allows the drone to search for a target within a radius of 2500 m

Action Deploy (channel 5) — launches the deployed scenario from the carrier

Action Follow (channel 2) — carrier follow mode. Enables AI Basic (Task) Behavior and launches the Follow Player pattern

Action Return (channel 3) — carrier return mode. Enables AI Recorder (Task) Behavior and launches the movement pattern to Waypoint 1, which is established during binding to the carrier beacon.

Action Signal (channel 10) — carrier feedback. In this case, the drone sends a signal to lower the ramp

When receiving an incoming signal, the drone broadcasts a message to the chat confirming receipt. The special feature of the Action Relay block is that it can receive a message sent by its own block. This allows you to test the behavior of the drone while in the cockpit, which is convenient for debugging. All Action Relay blocks are displayed on the first digital panel, and you can evaluate the behavior of the drone from the first person.

The Action Signal block is used as an outgoing one and can be used to communicate with the carrier or other drones. You can spawn two MNLAV-21 rovers and use one as a leader and the other as a drone. To do this, on the leader, use button #5 on the second digital panel to disable incoming signals (see Follow mode) and send outgoing signals from the third digital panel. The arrangement of the signals is similar to the first panel.

AI Behavior blocks
These are automation blocks that initiate the execution of a particular task, each of which requires activation of the AI ​​Behavior block AI Flight (Move).

AI Offensive (Combat) — activates the target search mode, which is configured for the event controller of the same name

AI Recorder (Task) — activates the return to the carrier mode by binding to the beacon

AI Basic (Task) — activates the mode of following the carrier, leader or player (companion mode)

Since there are no thrusters on the rover, the AI ​​Flight (Move) block will issue a warning about the inability to move, but we do not need this, the rover will move and slow down without its participation. For the same reason, all block settings will be irrelevant, including Speed ​​Limit.

The behavior pattern settings of the AI ​​Offensive (Combat) block will also be irrelevant. Without thrusters, only Stay at Range can be implemented, and even then in a truncated version. The attack and fire boundaries will be set by the controllers, not the block settings. The only thing that will work is the definition of the target type - Threatening Subsistem and the use of course weapons, but for this rover it does not matter, since it is armed with a custom turret with its own AI.


Event Controllers
Provides processing of events related to various modes:

Event Giroscope — provides stabilization by gyroscopes during movement and turns them off if the rover is on the brake, configured for Grid Speed ​​Changed < 1 m\s

Event Parking — turns off the rover in the parking mode to the carrier, leaving only the Deploy signal active, configured for Landing Gear Locked

Event Attack and Event StayRange — determines the boundaries of target detection and opening fire, configured for Distance to Locked Target

Sensors
Responsible for braking the rover in various modes by switching the HandBrake of the cockpit and the remote control module.

Sensor Follow Break and Sensor Follow Play — organize the mode of following the carrier, leader or player by switching the brakes and restarting the AI ​​Basic (Task) block

Sensor Return — used for braking when returning to the carrier, detects the player, large blocks and stations to avoid collisions with them

Timers
Timer Patch — used to restart the target detection and attack controllers set to Distance to Locked Target. This solves a systemic problem related to target detection (hopefully this will be fixed someday)

Timer Return — stops moving towards the carrier when it is within 50 m of the rover, so as not to collide with it

Other
Broadcast controller — outputs drone-related messages to the player's personal chat, allowing you to track its current status

Program Block — executes EasyPlay scenarios related to rover suspension settings for different modes
Offensive Combat mode
Implemented on the basis of AI Offensive (Combat) blocks and two Event Controllers configured for the Event to Locked Target event and a timer that fixes a system problem associated with determining the target using the specified event.

The phrase "AI turns on" does not mean turning on the block itself, but switching to the active state of the AI ​​Behavior block.

Activated by receiving a signal on channel 1 Action Attack, after which AI Offensive is turned on and the drone goes into target search mode with a frequency of once every 5 seconds. When a target is detected at a distance specified in Event Attack, the drone turns around and moves towards it until the distance to the target reaches the distance set in Event StayRange. After which the drone stops and continues firing from the spot.

When the target moves away from the drone, it resumes pursuit until it reaches the distance specified in Event StayRange again, but the current implementation of the pattern cannot maintain the distance when the target moves towards the drone, since the rover control logic is greatly complicated by the implementation of reverse and requires the installation of an additional controller and tracking the direction of interception of wheel rotation.

When the target is destroyed or lost, the drone remains in place. If the Follow mode was previously set, the drone will return to the player automatically. If the Follow mode is not active, it can be returned back by the Return or Follow signal.

Testing the mode
Find a relatively flat surface of the planet and spawn two MNLAV-21s nearby, and sit in the cockpit of one of them. Press #5 on the digital panel #2, disabling incoming signals. This will be the leader.

Leave the cockpit and fly more than 1000 m along the course of the leader. Then spawn another MNLAV-21, assign it to the Space Pirates faction, overwriting the owner of all blocks, and disable the AI ​​Turret. This will be the target.

Return to the leader's cockpit, press buttons #4 and #5 on the digital panel #3 and start moving at an angle to the target so that the leader does not block its visibility to the drone.

After the drone "hooks" the target, change the direction of movement and begin to move away from the target. Watch the developments in third-person mode.
Return to carrier mode
Implemented using AI Recorder and a Sensor, with the definition of the player, grids and stations, as well as a timer that turns off the wheel control interception mode and sends a message to the chat about the task completion. Activated on channel 2, to which Action Return is configured.

Before using this mode, you should bind the drone to the carrier's beacon, so that there is somewhere to return to. To do this, unload the drone from the carrier and drive to the desired binding location (there must be a beacon on the carrier/leader). Then on the digital panel #2, turn on AI Recorder with button #3. If there is already something in the Waypoint list, you need to press Clear Waypoints and then select a beacon from the list of available ones and press Add Waypoint. Then turn off AI Recorder at #3.

Testing the mode
Spawn two MNLAV-21s nearby, and sit in the cockpit of one of them. Press #5 on the digital panel #2, turning off incoming signals. This will be the leader. Install a beacon on it (it is not clear why the developers did not use an antenna for binding).

Move to the cockpit of another rover and perform the above procedure for binding to the leader's beacon.

Return to the cockpit of the leader, move away at a distance exceeding 50 m and press #5 on the digital panel #3 — the drone will drive up to the leader and stop at a distance of 50 m from it at an arbitrary point, and not at the binding point, as you expected.

It is extremely difficult to bring a wheeled rover exactly to a specified GPS point due to the rough control of the wheels, so the sensor stops moving as soon as it detects an obstacle specified in its settings. This is associated with the problem of returning if, on the way to the carrier, the rover drives to another grid at a distance closer than 50 m, where it remains. To return to the carrier, you will have to resort to remote control.

P.S. probably, if you don't turn off AI Recorder when stopping, you can organize a kind of formation of wheeled drones around the leader based on this mode and follow it in return mode.
Follow to carrier mode
Implemented in using AI Basic (Task) and two Sensors that control the playback of the Follow Me pattern and braking when approaching the player at a given distance. This idea has a purely vanilla solution and has already been implemented before me, but only for the rover in the "companion" mode

https://www.youtube.com/watch?v=9XIPxI79mJM
The follow-the-carrier mode is a bit more complicated, because the player can be inside another grid and this will lead to a collision of the drone with the carrier, and since Collision Avoidance AI Flight (Move) is not active, there are no options to avoid this except stopping the rover with the sensor.

Therefore, in the Sensor Follow Break setting, you need to enable a reaction not only to the player, but also to grid blocks. This makes the drone turn on HandBrake after it approaches the carrier on which the character is located, which is not even at the same level with the planet's surface. The sensor reaction radius should be set to the maximum — 50 m.

This behavior has some game advantages. Since the character moves arbitrarily during the game, the sensor will not allow the rover to follow him if the drone is next to the carrier. This will prevent the possibility of accidentally losing the drone.

If you need a companion during the game, then it is enough to disable the reaction to grids in Sensor Follow Break, but it is worth remembering this so as not to lose the drone, which accelerates quite quickly. It is not afraid of trees and stones, but a collision with another grid can be fatal for it.

Hint: Follow mode can be used to optimize the rover suspension settings using Propulsion Override You need to activate Follow Me, and then rise above the car to a height of more than 50 m. The rover should start driving in a circle under you. The smaller the trajectory radius, the more optimal the settings of all suspension parameters.

Testing the mode
Spawn two MNLAV-21s nearby, and sit in the cockpit of one of them. Press #5 on the #2 numeric keypad, disabling incoming signals. This will be the leader (carrier). Then press #6 on the #3 numeric keypad and start moving. The second rover will follow you at some distance.

The distance the drone will lag behind is determined by the game's implementation of the Follow Me mode of the AI ​​Recorder (Task) block and leaves much to be desired, so you will have to release the forward control key "W" for a while and even brake to avoid getting too far from the drone. No one needs a bodyguard walking down the next street.
Design vs Reality
The MNLAV-21 is a replica of the drone of the same name from the HomeWorld: Desert of Kharak game and was designed with the carrier design in mind. I uploaded it to my workshop a couple of weeks before publishing this guide and, as it turned out, I was a bit hasty.

Reality made its own adjustments and I needed additional space to accommodate automation blocks, so I had to remove the spare wheel, and replace the rounded nose and stylized turn repeaters made of neon tubes with more practical bumpers made of 1x1 wheels. This increased the reliability of the rover in collisions.


At the moment, the current version of the drone has been published, but I did not rework the title thumbnail.

You can find a large number of wheeled rovers of the most attractive design in the Steam Workshop, but it is unlikely that you will be able to make a real combat wheeled drone out of them. You can take any design you like, spawn it on Pertam and try to ride it on the dunes for at least three minutes at a speed of 50 m/s. If after that it does not crash, then its design can probably be used.

In the process of automating the wheeled drone, I finally understood why the developers did not include wheel automation when developing the AI ​​blocks of Automatons. This task is almost impossible to solve, since the behavior of the wheeled rover strongly depends on its design, which determines the suspension settings that will allow you to get an acceptable result, and no one needs negative feedback.

If you need a drone on the surface of the planet, then the easiest way to implement a hover — a rover on thrusters and with zero wheel friction.

See you on Pertam!