Space Engineers Wiki

New Official Space Engineers wiki

A new official wiki is now available! - at https://spaceengineers.wiki.gg/

This wiki is deprecated in favour of it.

READ MORE

Space Engineers Wiki
Advertisement

The Remote Control (short: RC) block and the Automaton blocks (short: AI) support an optional autopilot function. The Autopilot is used to make shuttles, trams, or patrolling defense drones travel on a predetermined track and perform automatic actions at waypoints.

A “drone”, “tram”, or “shuttle” in this article’s sense is a cockpit-less ship with a Remote Control or Automaton block, gyroscopes, and thrusters, plus any specialised functionality of your choice — such as connectors, passenger cabin, turrets with AI targeting enabled, spotlights, cargo containers, etc.

For the Autopilot, antenna and cockpit are allowed but not required. You just need some port to access the Control Panel Screen to set everything up.

Usage[]

In the Control Panel Screen, the following settings apply to the Autopilot. They are explained in this article.

  • Collision Avoidance
  • Precision Mode
  • Flight Mode
  • Forward Direction
  • Speed Limit
  • Waypoints
  • Set up Actions
  • GPS Locations, Add, Remove

Define Waypoints[]

To configure the shuttle’s autopilot behaviour, you need to give it waypoints:

  1. Prepare a list of waypoints on your GPS screen.
  2. Open the AI Basic/Remote Control block’s Control Panel Screen.
  3. Create a list of Waypoints for the Autopilot to follow in order:
    • To add a location, select a coordinate from the "GPS Locations" list and click Add. It is added to the Waypoints.
    • To make corrections, select a misplaced coordinate from the Waypoints list and click Remove.

The Autopilot will interpret the list as a queue, starting from the top and working its way to the bottom, travelling from one to the next.

The Autopilot can control thrusters and gyroscopes to reach the listed waypoints. The Autopilot cannot steer wheels though — the "Control Wheels" option that you see in the Remote Control Panel refers to the player-steered Remote Control, not to the Autopilot function.

Flight modes[]

The autopilot operates in one of three modes:

  • Patrol - If the first and last waypoint lie far apart, you may want to choose Patrolling. The autopilot visits each waypoint, and then turns around and visits them in backwards order, and so on.
    Example: ABC CBA ABC CBA…
  • Circle - If the first and last waypoint are close to each other, you may want to choose circling. The autopilot visits each waypoint, and then starts over from the beginning, and so on.
    Example: ABC ABC ABC ABC…
  • One Way - The autopilot visits each waypoint, stops at the last waypoint, then toggles itself off.[1] This option is useful to send a ship somewhere, once, either on a kamikaze mission, or to automatically move one damaged ship to safety while the player pilot changes to another ship.
    Example: ABC.

Precision Mode[]

Toggle on Precision Mode for more accurate shuttle navigation. In precision mode, the autopiloted shuttle aims to stop exactly on each GPS waypoint before it rotates towards the next waypoints, using the Remote Control/AI Basic block as the center point of the vessel.

  • The advantage of precision mode is that the shuttle can follow a path through a narrow base or tight mining tunnel, and it aligns itself perfectly with waypoints recorded for Connectors.
  • The downside is that the shuttle will brake often and accelerate again, meaning the shuttle will waste power/fuel, and travel only slowly.

When Precision Mode is off, the shuttle travels faster. The autopilot aims for a general area of about 50 meters around the waypoint. Once the way point is deemed close enough, the autopilot will immediately turn and continue on to the next GPS waypoint, without braking.

  • The advantage is that the Autopilot will use the fastest means to reach each waypoint.
  • The downside is that it will overshoot waypoints, miss connectors, and bash into base walls, because of its high speed.

This faster mode works well for patrolling open space, but is not recommended for shuttle navigation inside bases or near obstacles!

It's important to remember that the GPS coordinates of the waypoints are aligned with the position of the AI/RC block, especially when you want to position a ship at a connector. Position the drone on its docking connector before creating the GPS waypoint to get the exact spot.

Tip: When the pilot creates the GPS waypoint while remotely piloting a grid, the waypoint is centered on the grid’s AI/RC block automatically. This makes it easier to create correct waypoints remotely — you don't need to fly there in person. If you however attempt to create waypoints in Spectator Mode, the GPS will record the location of the player character instead of the location of the Spectator!

Collision Avoidance[]

Collision Avoidance enables a basic obstacle sensor for flying long distances. The autopilot will attempt to detect obvious obstacles, like base walls, asteroids, or mountains, and brake to avoid crashing. It will not detect nor avoid players though.

Before the Automaton update, the function of Collision Avoidance merely prevented drones from totalling themselves by waiting in front of the obstacle for you to provide additional waypoints (on the RC's Control Panel Screen). Post-Automaton update, collision avoiding drones are expected to find a path around simple obstacles autonomously.

  • If you gave the autopiloted drone very precise, safe waypoints to describe its path, for example for a shuttle inside a base, then switch Collision Avoidance off.
  • If the autopiloted grid is a player-built missile which is meant to collide with targets, switch Collision Avoidance off.
  • If you only know the corner points of the path, or if it's a long path, and anything (defense, attack, other events) could happen in between, switch Collision Avoidance on.
  • If the drone refuses to fly with Collision Avoidance on, some obstacle is too close to the Remote Control sensor. Place the Remote Control block somewhere where it is not obstructed by the drone's own blocks. Note that the Autopilot sensor scans a spherical area to ensure the drone has room to rotate, so even if the drone is built slender, the AI considers narrow gaps a full obstacle.

Forward Direction[]

If you have built the remote control block the wrong way round, the shuttle will fly sideways. This will be an obstacle for docking or if your main thrusters need to point towards planetary gravity.

Grinding it down and rebuilding it may not be a choice if it’s squeezed into a small drone ship. Then you can correct it in the control panel "the software way". Select the new Forward Direction from the menu: backwards, left, right, up, or down. Default is forward.

Tip: Look at the text above the lens from the front to verify that the camera is right way up, too. It’s often easier to replace.

Speed Limit[]

Depending on how your waypoints are spaced, and whether Precision mode is off, the shuttle’s behaviour can look like reckless flying. The shuttle will try to accelerate between waypoints, which can lead to it overshooting (and possibly damaging itself) and having to correct course.

To prevent it from wasting time and energy with course corrections, use the Speed Limit slider to slow the drone down to a lower percentage of its maximum acceleration.

Set up Automatic Actions at Waypoints[]

At each waypoint, the autopilot can optionally trigger any ship functions from the Config Menu, which makes your drones quite powerful.

For example at arrival, the drone can automatically play sounds, toggle lights on/off, de-/repressurise a passenger cabin, lock/unlock landing gears, lock/unlock connectors (to recharge batteries and restock ammo), discharge/recharge connected batteries, close/open doors, and so on.

To have more control and activate multiple events, put the actions into a Timer Block, and make the Waypoint action start the Timer Block.

Set up Automatic Reactions Anywhere[]

To make the drone react to events other than reaching a waypoint, build an Event Controller block and set it up to detect situations and trigger actions.

A note on Autopilot and wheeled vehicles[]

The autopilot does not attempt to propel or turn wheels of rovers. It insists on using gyroscopes and thrusters like a space ship. As a workaround, you can use the wheel suspensions' Overrides to put the vehicle into a sort of "cruise control." Adding Gyroscopes to the vehicle has the added benefit that the autopilot will at least attempt to recover and level while the vehicle catches air during a jump, which is useful.

Turning a rover through gyroscopes somewhat works if you set the wheels to low friction. To then move towards the waypoint, a rover without thrusters needs a Propulsion Override on the wheels. Remember to Invert Propulsion on the right side while using the override. You will have to turn on/off the Propulsion Overrides yourself at each waypoint — or rather set up timers or sensors to toggle the overrides at waypoints.

  1. Drive along the path and record the waypoints at the exact same height as the Remote Control block will be during the trip.
  2. Make a control group for the wheels on the right side.
  3. Make a control group for all wheels.
  4. Build two Timer Blocks.
  5. Program the first Timer block to start driving:
    • Enable Increase Propulsion Override on all wheels, lower the friction on all wheels, enable Invert Propulsion on the right side, release the brakes, and start the Autopilot.
  6. Program the second Timer block to stop driving:
    • Enable Reset Propulsion Override on all wheels, increase the friction on all wheels, disable Invert Propulsion on the right side, hit the brakes, and stop the Autopilot.


Watch Halipatsui's video with some great tips: Guide for using RC Block with Rovers.

Limitations[]

Be warned that for wheeled vehicles, waypoint detection is unreliable, because, in contrast to spacecraft, a rover in gravity cannot freely move in 6 directions to align with the target coordinates. If the suspension is higher or lower (simply because the cargo is very full or empty), the autopilot may struggle to "reach" the waypoint.

The workaround to combine low friction with a propulsion override is only viable on flat terrain, the autopilot cannot handle driving uphill like that.

Collision avoidance and precision mode are not available for wheeled vehicles.

Steam Workshop Scripts[]

For autopiloted space flight, see Rdav‘s Fleet Command script; and for reliable autopiloted land vehicles, see Wanderer_308’s Driver Assisting System on the Steam Workshop.

Media[]

References[]

Advertisement