Space Engineers

Space Engineers

평점이 부족합니다.
Wico Modular Navigation (WMNav)
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
태그: autopilot
파일 크기
게시일
업데이트일
497.278 KB
2020년 4월 24일 오후 5시 25분
2022년 5월 12일 오후 8시 50분
변경 사항 10개 ( 보기 )

다운로드 위해 구독하기
Wico Modular Navigation (WMNav)

설명
Fourth generation of my scripts.

Navigation: autopilot with collision detection and avoidance.

Navigation instructions

Multiple instructions can be given in a sequence, separated by semi-colon
or new line. A space is required between the instruction letter and any
parameters you pass to it.

C <text>
Comment, to help label your instructions.
Has no effect on the program. Does not count towards instruction limit.

D <distance>
Sets the arrival distance (how close to get to the destination), in meters,
for the next waypoint.
Distance can be a single number, which the ship will try to reach

Distance is measured from the chosen Ship Orientation Block, so if that block is in
the back of your ship, you'll need to increase the arrival distance by at
least the length of your ship (in meters, not blocks).

Default value is 50m.


S <number>
Sets the maximum ship speed, in meters. If set to 0, no limit is enforced.

Default value is 0.

W <coordinates>
Adds a waypoint, at the specified coordinates. Coordinates are a set of
three numbers, separated by commas (i.e. 123,456,-78) or colons
(i.e. 123:456:-78). The last waypoint given (or only waypoint, if only
one given) is the final destination.

GPS Formatted coordinates are also suppoted

O <coordinates>
Orients the FRONT of the ship towards the coordinates.

autopatrol toggles automatically starting a patrol when commands are ended

patrol follows the waypoints in a remote control in order. Once unless autopatrol is on


EXAMPLE:

You can add comments, and you can even set a different speed or distance for
each waypoint:

D 10;patrol
S 45;W GPS:Wicorel #1:-0.51:94.27:-93.73:;W GPS:Wicorel #2:109.91:-384.71:119.44:



Commands can be issued through Programmable Block arguments


Instruction List:
D Distance D min
C Comment C [text]
O Orient O [x,y,z|x;y;z]
W Waypoint W [x,y,z|x;y;z]

L launch from connector (requires dock module)
OL Orbital launch from planet (requires orbital module
dock dock to a connector (requires dock module)
patrol gets waypoints from remote control and follows them in sequence. The max speed is set from the remote control setting

autopatrol toggles the autopatrol flag (automatically restarting patrols). Defaults to off.
refuel toggles the automatic refueling feature (will automatically dock when needed) Defaults to on
relaunch toggles the automatic relaunch feature. Defaults to off (false)

Sensors
The navigation will use a sensor for collision detection. The sensor must have [WICO] in the name or customdata.

Since the sensor will be used to scan forward, it should be placed as far forward in the craft as possible to give the best scanning range.

Cameras

The navigation will use camera raycast for collision detection. All cameras will automaticlly be used.

To stop a camera from being used for raycast (because it is inside the craft or otherwise obstructed) put [VIEW] in the name or customdata

Mainly, cameras on the front (direction of travel) are used. However, when the ship is 'inside' an asteroid, it will pathfind to find an exit; it uses cameras on all sides to do this.

Options

Options are stored in custom data so they can be changed.

The main ones are:

[POWER]
batterypcthigh=80 Battery charge needed before relaunch from connector
batterypctlow=20 Battery charge minimum needed before automatically needing a refuel

[CARGO]
cargopctmin=5

[TANKS]
tankspcthigh=99 Hydrogen tanks fill needed before relaunch from connector
tankspctlow=25 Hydrogen tanks fill minimum needed before automatically needing a refuel

댓글 20
Mad Doctor Tolliver 2022년 5월 16일 오전 1시 26분 
As of now, the only potential oddities I can find are a notable lack of collision detection on planets (even with working cameras and sensors and proper settings enabled in the Custom Data), and that the script seems to hate the idea of having a minimum altitude set in the Custom Data. Every time I have the altitude set to 0, everything works correctly. However, changing that number causes the navigation systems to become wonky. This could be an issue of correlation and not causation, but it seems to be worth mentioning. Beyond that, the script is working extremely well, and I greatly appreciate your hard work in creating it.
Wicorel  [작성자] 2022년 5월 12일 오후 8시 52분 
Parameter in CustomData is MaxWorldMps
Wicorel  [작성자] 2022년 5월 12일 오후 8시 50분 
Written, minor testing and updated.

You'll need to change the SpeedMax parameter in CustomData and also specify the higher speed in the nav commands
Mad Doctor Tolliver 2022년 5월 11일 오후 8시 15분 
@Wicorel I'm using Configurable Parameters, but I'll also do a test or two with a different speed mod. I suspect part of the issue is some stubborn memory storage that doesn't want to be modified after the first run. Some of the issues I have will get resolved by removing and rebuilding the programmable block itself. I'll do further testing and update you.
Wicorel  [작성자] 2022년 5월 11일 오전 7시 53분 
hmm. which mod are you using to increase speed? I'll test with that.
Mad Doctor Tolliver 2022년 5월 10일 오후 8시 50분 
So far, no major issues with navigation within or outside of gravity. The script is doing an excellent job, and I'm excited to work with it further.

One odd thing, though, is the apparent inability to set the maximum travel speed to a number higher than 100 m/s. Also, running "S 0" apparently enforces the max speed to in fact be 0 m/s instead of removing the limit.
Wicorel  [작성자] 2022년 5월 9일 오후 7시 49분 
Updated yesterday to fix the issues with navigating in gravity.

Let me know if anybody finds any more problems or has feature requests.
Mad Doctor Tolliver 2022년 5월 3일 오후 11시 26분 
@Wicorel Sorry to hear that it's being a problem. I'm greatly looking forward to using this script as a drone autopilot whenever it gets fixed. Outside of the glitchiness, your script is, I believe, the best autopilot I've found to date.
Wicorel  [작성자] 2022년 5월 3일 오후 8시 41분 
some luck, yes. but I found more issues.

Seems like I hadn't tested in gravity for a while.. :(

(and I have busy work schedule recently)
Mad Doctor Tolliver 2022년 5월 2일 오후 7시 14분 
@Wicorel Have you had any luck with the script weirdness? If not, that's totally fine. I was just curious.