[Mod] basic_robot [basic_robot]

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] basic_robot [basic_robot]

by hajo » Post

Fixerol wrote:another project .. https://github.com/dan200/ComputerCraft -
aka programmable robots in lua for minecraft
Well, that is not a mod - it is a project written in java.
Getting that to run with minetest would be a huge amount of work.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] basic_robot [basic_robot]

by Fixer » Post

Actually there is some mod in minetest with programmable robots, called https://github.com/minetest-mods/turtle

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] basic_robot [basic_robot]

by hajo » Post

Fixerol wrote:there is some mod in minetest with programmable robots,
called https://github.com/minetest-mods/turtle
Did you check it out lately ?
Last time I had a look (long ago), it wasn't usable.

There are turtleMiners, but as of now, they can only move & dig.

AFAIK, basic_robots is currently the only working mod
with useful, programmable robots for minetest.

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] basic_robot [basic_robot]

by bosapara » Post

Image Image Image Image

bump for preview

Code: Select all

[img]https://image.ibb.co/bUzVAn/ezgif_com_gif_maker_8_min.gif[/img] [img]https://image.ibb.co/jy9abS/ezgif_com_gif_maker_11_min.gif[/img] [img]https://image.ibb.co/eM8CO7/ezgif_com_resize_1_min.gif[/img] [img]https://image.ibb.co/k98qAn/ezgif_com_resize_min.gif[/img]

mayo
New member
Posts: 2
Joined: Mon Mar 26, 2018 12:59
Location: Struppen, Saxony, Germany

Re: [Mod] basic_robot [basic_robot]

by mayo » Post

Hi,

i have download and install the mod.
It lacks 5 png files.

see my debug.txt

Code: Select all

2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "topface.png" while building texture; Creating a dummy image
2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "legs.png" while building texture; Creating a dummy image
2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "face-back.png" while building texture; Creating a dummy image
2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "left-hand.png" while building texture; Creating a dummy image
2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "right-hand.png" while building texture; Creating a dummy image
Only face.png is present.
Can anybody help me?

Thank you

mayo

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] basic_robot [basic_robot]

by bosapara » Post

mayo wrote:Hi,

i have download and install the mod.
It lacks 5 png files.

see my debug.txt

Code: Select all

2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "topface.png" while building texture; Creating a dummy image
2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "legs.png" while building texture; Creating a dummy image
2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "face-back.png" while building texture; Creating a dummy image
2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "left-hand.png" while building texture; Creating a dummy image
2018-03-26 04:09:45: ERROR[Main]: generateImage(): Could not load image "right-hand.png" while building texture; Creating a dummy image
Only face.png is present.
Can anybody help me?

Thank you

mayo
Extract this files to textures folder:
basic robot spawner.zip
robot spawner textures
(1.84 KiB) Downloaded 75 times

mayo
New member
Posts: 2
Joined: Mon Mar 26, 2018 12:59
Location: Struppen, Saxony, Germany

Re: [Mod] basic_robot [basic_robot]

by mayo » Post

It works. Thank you. :-)

mayo

Michael Eh?
Member
Posts: 391
Joined: Sun Jan 01, 2012 17:21

Re: [Mod] basic_robot [basic_robot]

by Michael Eh? » Post

Okay problem, how does one program robot to build lets say a circle or sphere or even a dome (semi circle)

to plot a circle the formula is x^2+z^2=r^2

r=radius

Of course this assumes that you're at 0,0,0 so you'll have to offset current position.

ADHQProth
New member
Posts: 7
Joined: Fri Jul 20, 2018 20:12
GitHub: None
IRC: none
In-game: none

Re: [Mod] basic_robot [robot_code]

by ADHQProth » Post

if (i == nil) then i=0;self.label("RoadPaver") turn.left(); end move.forward() if read_node.down()=="default:desert_sand" then dig.down() end if read_node.down()=="air" then place.down("default:cobblestone") end

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] basic_robot [robot_code]

by hajo » Post

ADHQProth wrote:if (i == nil) then ...
Please use 'code' to format source code:

Code: Select all

if (i == nil) then 
  i=0; self.label("RoadPaver") turn.left(); 
end 
move.forward() 
if read_node.down()=="default:desert_sand" then 
  dig.down() 
end 
if read_node.down()=="air" then 
  place.down("default:cobblestone") 
end
Michael Eh? wrote:program robot to build lets say a circle or sphere
The above road-paver is no solution for his problem.

Emperatrox
New member
Posts: 2
Joined: Mon Oct 15, 2018 03:49
GitHub: MB3001
IRC: Emperatrox
In-game: Emperatrox

Re: [Mod] basic_robot [basic_robot]

by Emperatrox » Post

I got this error. I'm using Windows 10. I can't create a new world with this mod. Please help me.
2018-12-31 19:59:30: ERROR[Main]: ModError: Failed to load and run script from C:\Users\Usuario\Downloads\minetest-0.4.17.1-win64\bin\..\mods\basicrobot\init.lua:
2018-12-31 19:59:30: ERROR[Main]: ...\minetest-0.4.17.1-win64\bin\..\mods\basicrobot\init.lua:43: attempt to concatenate a nil value
2018-12-31 19:59:30: ERROR[Main]: stack traceback:
2018-12-31 19:59:30: ERROR[Main]: ...\minetest-0.4.17.1-win64\bin\..\mods\basicrobot\init.lua:43: in main chunk
2018-12-31 19:59:30: ERROR[Main]: Revisa debug.txt para más detalles.
It's in this code:

Code: Select all

dofile(minetest.get_modpath("basic_robot").."/robogui.lua") -- gui stuff
dofile(minetest.get_modpath("basic_robot").."/commands.lua")
Apparently this does not detect robogui.lua and commands.lua, but they are here, in the correct ubication. I'm using the 0.4.17.1 version.

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Post

what is nil is this:
minetest.get_modpath("basic_robot")
My guess would be you didn't extract in correct folders which can be seen from path name
2018-12-31 19:59:30: ERROR[Main]: ...\minetest-0.4.17.1-win64\bin\..\mods\basicrobot\init.lua:43
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

Emperatrox
New member
Posts: 2
Joined: Mon Oct 15, 2018 03:49
GitHub: MB3001
IRC: Emperatrox
In-game: Emperatrox

Re: [Mod] basic_robot [basic_robot]

by Emperatrox » Post

I am laughing very hard about myself. I have removed the underscore of "basic_robot" to avoid problems, and instead I generated them. I already solved it XD thanks. I knew it because "basic_robot" appears in the code.

justaminetester
New member
Posts: 1
Joined: Thu Jan 24, 2019 16:00

Re: [Mod] basic_robot [basic_robot]

by justaminetester » Post

Hi,

a recent update "drop fix, commit 539144f " apparently broke harvesting wheat and others.
Before, the robot got 1 or 2 wheat and 1 or 2 seeds when digging farming:wheat_8, the same as harvesting by hand.
Since, the robot only gets exactly 1 wheat and no seeds (while harvesting by hand still works as before).

The offending change seems to be the "break" inserted at line 495 of "basic_robot/commands.lua"
Please review.

Thanks

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: [Mod] basic_robot [basic_robot]

by Sires » Post

Heyy can you add this mod to content db?
I don't have anything important to say.

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Post

I have to ask to be moved.
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

ZenNimo
New member
Posts: 1
Joined: Tue May 14, 2019 14:20

Re: [Mod] basic_robot [basic_robot]

by ZenNimo » Post

Hello, I don't understand why this program doesn't work

for count2 = 1, 4 do
for count = 1, 5 do
move.forward()
end
turn.left()
end

I'm searching a function move.forward() that moves the robot only one step
so a code like this
move.forward()
move.forward()
will make 2 steps

Or, an alternative :
for count = 1, 2 do
move.forward()
end

my question is : how to program such function in basic_robot and in which file (.mintest) can we add this
function so that it belongs to the mod from the start.

thank you very much for your answer



and

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Post

Code: Select all

for count2 = 1, 4 do
for count = 1, 5 do
move.forward()
end
turn.left()
end
This tries to move 5*4 = 20x every second (in one step), but you are only allowed 4x move in one second. To move only 1x and then stop do

Code: Select all

if not moved then
 move.forward()
 moved = true
end
If you just write move.forward() it will keep moving forward - it runs program every second. If you SAVE program it will be there always - even after server restart or whatever. Starting robot later will run the program. You can make robot start automatic when server starts, edit this inside init.lua

Code: Select all

 basic_robot.admin_bot_pos = {x=0,y=1,z=0} -- position of admin robot spawner that will be run automatically on server start 
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

piet
Member
Posts: 40
Joined: Mon May 06, 2019 10:16
In-game: piet

Re: [Mod] basic_robot [basic_robot]

by piet » Post

I have a error

Code: Select all

Failed to load and run script from /home/piet/.minetest/mods/basic_robot-master/init.lua:/home/piet/.minetest/mods/basic_robot-master/init.lua:43: attempt to concatenate a nil value stack traceback: /home/piet/.minetest/mods/basic_robot-master/init.lua:43: in main chunk look in debug.txt for details.

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Post

/home/piet/.minetest/mods/basic_robot-master/init.lua
"basic_robot-master" is wrong folder name, correct is "basic_robot"
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

piet
Member
Posts: 40
Joined: Mon May 06, 2019 10:16
In-game: piet

Re: [Mod] basic_robot [basic_robot]

by piet » Post

rnd wrote:
/home/piet/.minetest/mods/basic_robot-master/init.lua
"basic_robot-master" is wrong folder name, correct is "basic_robot"

thank you mod is working now

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] basic_robot [basic_robot]

by Linuxdirk » Post

Folder name is irrelevant when providing a name via mod.conf. I’d file a bug.

whtemple1959
Member
Posts: 18
Joined: Sun Mar 01, 2015 19:56
Location: Columbus, Ohio, USA

Re: [Mod] basic_robot [basic_robot]

by whtemple1959 » Post

Fantastic mod. I will admit it is very daunting for a non programmer type to use but trial and error is helping understand Lua. Sorry folks but my brain just does not work like a programmers. One item I am trying to find an answer for is this. I would like to use some sort of lua controller to automatically start my robot every 24 hours. So, is this possible and does any one have guidance on how to make it so?

Ignaramico
Member
Posts: 78
Joined: Fri Sep 04, 2020 21:23
GitHub: ignaramico

Re: [Mod] basic_robot [basic_robot]

by Ignaramico » Post

im using this mod, but for some reason i cant dig with it, i get this message
" robot error:144: need0.0008 energy to dig default:dirt. use machine.generate to get some energy"
im using the code from the wiki

Code: Select all

dig.forward()
 place.forward_down("default:dirt")
 --place.forward_down("default:cobble")
 move.forward()
i can place block just fine, but no dig any

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] basic_robot [basic_robot]

by hajo » Post

Ignaramico wrote:
Sun Sep 06, 2020 22:59
i cant dig with it, i get this message
"robot error:144: need 0.0008 energy to dig default:dirt. use machine.generate to get some energy"
Just as the message says - the mod is configured so that the robot needs energy to dig.
(Feature, not a bug :)

On your own server, or singleplayer, you can change the config.
Otherwise, you need some commands to generate energy with the robot first.
Might need fuel too.

Post Reply

Who is online

Users browsing this forum: No registered users and 91 guests