Posted 20 March 2014 - 09:21 PM
Initial release ready in time for v1.6! been tested in 1.58 and 1.6pr6, seems to work fine in both.
What is Turtle Tracker, you ask?
It's a handy program that allows tracking and (for now) pretty basic management of your turtles remotely, over rednet. The clever bit is that it's not something you build into your programs; it runs invisibly on the turtles, behind the shell, while your turtles do whatever they were gonna do anyway.
What are the features?
How do I use it?
Then, just use the turtle as you normally would, you shouldn't notice any change.
Then put the same program on whatever computer you want to track them from and run it. Any number of turtle IDs can be passed as arguments at the command line (ex, "turtletracker 1 5 7" would launch tracking turtles with ids 1, 5, and 7), but you can also start tracking more turtles from inside the program. The computer side of the program has a list of commands built-in, displayed on start, so you should be able to work out the rest!
But what if my program needs to run in the turtle's startup?
But Gopher, my turtle's program isn't run from startup, it is startup! What am I supposed to do?
1) rename your startup file to something else. For this example, I will assume you called it "notstartup"
2) make a new startup file containing
Why don't you have any screenshots in this thread? I NEVER download things that don't have screenshots!
Because there's not much to see in screenshots at this point, it's a pretty simple text-based program. And also because I'm lazy. If that's a deal-breaker for you, well, that's just your loss!
Is there any way you could possibly make this more awesome in the future?
Things coming in the perhaps-not-so-distant future:
Where to get it
Right here!
With http api enabled, you can use pastebin, just type
and it'll be downloaded to your turtle or computer. It's just one program for the turtle or computer sides, it detects which it runs on and acts accordingly!
What is Turtle Tracker, you ask?
It's a handy program that allows tracking and (for now) pretty basic management of your turtles remotely, over rednet. The clever bit is that it's not something you build into your programs; it runs invisibly on the turtles, behind the shell, while your turtles do whatever they were gonna do anyway.
What are the features?
- track any number of turtles at once from one computer
- track the distance from the computer and, if gps is available, positions of the turtles
- remotely halt a turtle, terminating whatever programs it is running and dropping it into a shell
- summon turtles, causing them to abort their programs and immediately move to within 2m of the computer that summoned them.
How do I use it?
Spoiler
First, just put the program on all the turtles you want to track and run it from the shell. This will launch the background coroutine that handles rednet messages and generally manages things, and launch another shell under that for you to use the turtle normally.Then, just use the turtle as you normally would, you shouldn't notice any change.
Then put the same program on whatever computer you want to track them from and run it. Any number of turtle IDs can be passed as arguments at the command line (ex, "turtletracker 1 5 7" would launch tracking turtles with ids 1, 5, and 7), but you can also start tracking more turtles from inside the program. The computer side of the program has a list of commands built-in, displayed on start, so you should be able to work out the rest!
But what if my program needs to run in the turtle's startup?
Spoiler
Not a problem. You can tell TurtleTracker™ what program to run instead of a shell, if you want. Say your startup file currently launches "excavate 16". You run TurtleTracker™ from your startup file like this:
--in startup file...
shell.run("turtletracker","excavate 16")
And that's that! tracker will run in background, while your turtle excavates, with you able to track and override it from a remote computer.But Gopher, my turtle's program isn't run from startup, it is startup! What am I supposed to do?
1) rename your startup file to something else. For this example, I will assume you called it "notstartup"
2) make a new startup file containing
shell.run("turtletracker","notstartup")
3) profitWhy don't you have any screenshots in this thread? I NEVER download things that don't have screenshots!
Because there's not much to see in screenshots at this point, it's a pretty simple text-based program. And also because I'm lazy. If that's a deal-breaker for you, well, that's just your loss!
Is there any way you could possibly make this more awesome in the future?
Spoiler
Surprisingly, yes! For one thing, if we get modem-enabled tablet computers in 1.6, as some are expecting, it will be at least 500% more awesome just by virtue of running on one of those instead of a computer.Things coming in the perhaps-not-so-distant future:
- a gui version of the computer side interface
- turtles reporting more detailed information about their status (current fuel level, rough info on inventory, etc).
- temporarily suspending and resuming the running program
- remote manual control mode
- following turtles - with a modem-enabled tablet, a turtle could be instructed to stay within some distance of the player, following them around by tracking the tablet's modem without any influence from the player!
- Possibly other things not mentioned here!
Where to get it
Right here!
With http api enabled, you can use pastebin, just type
pastebin get h1hQFspz TurtleTracker
and it'll be downloaded to your turtle or computer. It's just one program for the turtle or computer sides, it detects which it runs on and acts accordingly!
Edited on 20 March 2014 - 08:37 PM