Author Topic: Bot-Making Help  (Read 897 times)

Schicko

  • Member
  • **
  • Posts: 21
  • Likes: +0/-0
    • View Profile
Bot-Making Help
« on: March 28, 2016, 11:05:28 pm »
Can someone help me with my bot please. I'd like to make it more stable somehow as it keeps moving around a lot (it hovers) but I don't know how. I'd also like to make the cannon at the bottom be able to aim depending on mouse position but I'm not sure how I'd do that or if it is even possible.

https://www.dropbox.com/s/n2oog5otwmupak7/bp_6?dl=0

MarvinMan

  • Automation Expert
  • Experienced Member
  • ***
  • Posts: 236
  • Likes: +4/-0
    • View Profile
Re: Bot-Making Help
« Reply #1 on: March 28, 2016, 11:37:46 pm »
Mechanically, that's a good stable design. In terms of the control system, the problem is that the altitude and pitch/roll control are not separate systems. You want one control loop for the altitude of one of those center continuums, and a separate pair of control loop to control the pitch and roll. This can either be done by directly measuring the pitch/roll with an accelerometer, or by taking the altitude difference between a pair of opposite jets.

You can't control things with the mouse. The closest you can get is dragging a part around to use as a target. Have a look at the combat bot threads for automatic turret designs.

Schicko

  • Member
  • **
  • Posts: 21
  • Likes: +0/-0
    • View Profile
Re: Bot-Making Help
« Reply #2 on: March 29, 2016, 12:54:09 am »
Hey thanks for your reply MarvinMan. I don't really understand what you mean by "separate systems" though. Correct me if I'm wrong, but I thought I did make the systems separate. Or at least I think I made the altitude control systems separate to the the yaw/orthogonal movement control systems.

Also I don't think I have implemented proper pitch/roll control systems yet (at least not intentionally - apparently pitch/roll control can be achieved if the right combinations of two buttons from q/w/e/a/s/d are pressed). Would it be possible for you to show me examples of implementations of the two different methods you mentioned in the form of blueprints so that I could better figure out how to implement them on mine?

As for the centre continuum control loop, where should I put the output of that to? I'm assuming to the altitude control systems? If it is, would I need to replace the individual PID loops for each of the up/down jets with control from the continuum's PID instead? Or just combine them somehow? Forgive my asking so many questions. I'm a noob afterall :D.

Ideally I would like to end up with something as stable as Trook's "TI" in
with its full degree of movement but using less parts if possible. I've tried to figure out how he did the programming but I don't really understand it. It doesn't help that I don't know which jets are connected to which programs in the video.

It's a shame that mouse control is not possible. I think I will just make the cannon keyboard controlled instead. Or perhaps replace it with rotating lasers instead.

Anyways, thanks again.
« Last Edit: March 29, 2016, 12:56:23 am by Schicko »

PressureLine

  • XFM Developer
  • Administrator
  • Experienced Member
  • *****
  • Posts: 192
  • Likes: +4/-0
    • View Profile
    • Rawbots Club Forums
Re: Bot-Making Help
« Reply #3 on: March 29, 2016, 12:55:00 am »
Take a look at the Canary bot in the ACL topic too. It has a good stable hover system that is relatively easy to scale up or down.
"Never assume that anything you've never seen before is benign. Most particularly not something that says 'MARINES' on it."

Schicko

  • Member
  • **
  • Posts: 21
  • Likes: +0/-0
    • View Profile
Re: Bot-Making Help
« Reply #4 on: March 29, 2016, 01:00:04 am »
Right, will do PressureLine. Thanks.

Wow I didn't realise there were so many blueprints in that topic. I will take a look at those too.

Oh BTW, the game crashes sometimes when I load blueprints/a new world. It will either close or the window will turn black and become unresponsive/uncloseable. Is there anyway I can prevent that?
« Last Edit: March 29, 2016, 01:29:26 am by Schicko »

PressureLine

  • XFM Developer
  • Administrator
  • Experienced Member
  • *****
  • Posts: 192
  • Likes: +4/-0
    • View Profile
    • Rawbots Club Forums
Re: Bot-Making Help
« Reply #5 on: March 29, 2016, 01:21:20 am »
The Black Screen Of Death is most likely caused by "NaN" (div0 etc) or "ħinf" errors. Use paired MIN/MAX math functions with the variable input on sample_a before your 'sensitive' functions.

'Sensitive' items include (but are not limited to):
  • Any input for a physical output (motor/elbow angle/velocity, piston position) attempting to drive them with a Nan is what causes the error.
  • Inverse trig functons can be easily persuaded to Nan, especially ATAN/ATAN2 (remember what the TAN graph looks like? Those asymptotes can be killers)
"Never assume that anything you've never seen before is benign. Most particularly not something that says 'MARINES' on it."

Schicko

  • Member
  • **
  • Posts: 21
  • Likes: +0/-0
    • View Profile
Re: Bot-Making Help
« Reply #6 on: March 29, 2016, 01:28:03 am »
I tried loading the Canary blueprint then this happened XD :

http://i.imgur.com/ZPYZbB5.jpg

It happens each time I load that blueprint, even after reloading the game. :/

PressureLine

  • XFM Developer
  • Administrator
  • Experienced Member
  • *****
  • Posts: 192
  • Likes: +4/-0
    • View Profile
    • Rawbots Club Forums
Re: Bot-Making Help
« Reply #7 on: March 29, 2016, 01:32:59 am »
You have this: http://forum.rawbots.club/index.php?topic=8.0 installed? It literally will not work without it.

Once I get home from work I'll upload my hovering target drone, which doesn't have any fancy aim code, just hovering and wall avoidance.
"Never assume that anything you've never seen before is benign. Most particularly not something that says 'MARINES' on it."

Schicko

  • Member
  • **
  • Posts: 21
  • Likes: +0/-0
    • View Profile
Re: Bot-Making Help
« Reply #8 on: March 29, 2016, 01:41:13 am »
It looks like your zip contains a Windows executable. I'll have to run the windows version of the game under wine which I've not tried before. Is there perhaps a Linux installer for it?

PressureLine

  • XFM Developer
  • Administrator
  • Experienced Member
  • *****
  • Posts: 192
  • Likes: +4/-0
    • View Profile
    • Rawbots Club Forums
Re: Bot-Making Help
« Reply #9 on: March 29, 2016, 01:51:13 am »
The executable makes the changes to the 'resources.assets' file that are required for some of the things to work (string output on math_function hexes for one) as well as the HP balancing, you could simply run that part of the update in a windows environment, and copy the modified resources.assets into your linux install.

The .dll file is the really important bit though, it contains all the revised code for Rawbots, and is absolutely essential if you want to use any of the non-legacy ACL bots (since they will likely all have at least one ASIN/ACOS/ATAN for aiming code) If i understand correctly the .dll should work in Linux no problem (I have zero experience with using Linux, of any flavor, so that may not be correct)
"Never assume that anything you've never seen before is benign. Most particularly not something that says 'MARINES' on it."

Schicko

  • Member
  • **
  • Posts: 21
  • Likes: +0/-0
    • View Profile
Re: Bot-Making Help
« Reply #10 on: March 29, 2016, 01:55:05 am »
Right, thanks. I will try that and tell you how it goes.

Edit: Awesome, copying the dll and using wine for the installer did the trick. I suspect I probably didn't need to dl the windows version as the data files look the same anyways. Oh well. At least I can load the canary now. Question though: say I were to save a blueprint/world in the modded version, would it still load in the vanilla version?
« Last Edit: March 29, 2016, 02:40:49 am by Schicko »

PressureLine

  • XFM Developer
  • Administrator
  • Experienced Member
  • *****
  • Posts: 192
  • Likes: +4/-0
    • View Profile
    • Rawbots Club Forums
Re: Bot-Making Help
« Reply #11 on: March 29, 2016, 02:45:42 am »
As long as you don't use an ACOS/ASIN/ATAN/ATAN2 type math_function, or use the string output on a math_function to drive a projector you should be ok. Everything else is pretty much just stat changes, and shouldn't cause anything to break.
"Never assume that anything you've never seen before is benign. Most particularly not something that says 'MARINES' on it."

Schicko

  • Member
  • **
  • Posts: 21
  • Likes: +0/-0
    • View Profile
Re: Bot-Making Help
« Reply #12 on: March 29, 2016, 03:02:31 am »
Right. That's good to know. I'll try to figure out the new stuff from the mod, how the canary works and how to stabilise my bot in a little while. Right now I really need some sleep haha. Thanks again for all the help.

I think ifound your hover target: https://drive.google.com/drive/folders/0B42Wtrlp8xi9dTdPa0k2S2tmTE0

I will check it out later.
« Last Edit: March 29, 2016, 03:26:31 am by Schicko »

PressureLine

  • XFM Developer
  • Administrator
  • Experienced Member
  • *****
  • Posts: 192
  • Likes: +4/-0
    • View Profile
    • Rawbots Club Forums
Re: Bot-Making Help
« Reply #13 on: March 29, 2016, 05:15:50 am »
I think ifound your hover target: (link)

I will check it out later.

I totally forgot I had that up there ;D It's probably easier to look at the hovertarget than at Canary, since the code is a lot cleaner because the hovertarget doesn't have all the code to automatically disconnect the other control blocks, or all the interlinked stuff for coloring the jets.

Just remember to take the red floater off the top before engaging the lift jets!
"Never assume that anything you've never seen before is benign. Most particularly not something that says 'MARINES' on it."

z26

  • Experienced Member
  • ***
  • Posts: 108
  • Likes: +0/-0
    • View Profile
Re: Bot-Making Help
« Reply #14 on: March 29, 2016, 05:52:31 am »
That ti bot is impressive.