Home arrow Forums
914 PC Bots Forum  


JohnO
User

Gold Boarder
Posts: 45
graphgraph
Karma: 2  
"Command Line" - 2008/01/31 05:55 So, I'm driving my robot around, testing the range of a cheap SMC USB 802.11g plug that sticks out the back of the mobo. (Not bad! about 60 feet through office space.) I'm driving with the camera and a Remote Desktop connection, it's way over on the other side of a big room, out of sight.

The latency is big, making corners a little rough. It's easy to rotate WAY too far. (Must be a taste for what the Mars rover controllers are going through.) I have to slow way down, click the left arrow, then click stop and hope for the best. Slow is the key.

And I'm thinking...what if I could just type a command...MOVE LEFT 30 or ROTATE CCW 10. That would be cool. Or, maybe that works and I don't have the syntax worked out.

I've been controlling the robot from a laptop and Remote Desktop, and an ad-hoc WiFi connection. The laptop's PC Card slots are busted, so I've been using a really old Addtron 802.11b USB NIC. It's been working relatively well. I've been hoping to get a g NIC to speed things up, but then I learned this week that 802.11g ad-hoc connections are only 11 Mbps. Yep, it's in the spec, unfortunately. Now I need 802.11n stuff. I wonder how that works ad-hoc...


Post edited by: JohnO, at: 2008/01/30 22:00
  | | The administrator has disabled public write access.
c6jones720
User

Platinum Boarder
Posts: 350
graphgraph
Karma: 3  
Re:"Command Line" - 2008/01/31 22:00 you can do that if your robot uses odometry + there are easier ways to do it on a 914 than type it in.
  | | The administrator has disabled public write access.
JohnO
User

Gold Boarder
Posts: 45
graphgraph
Karma: 2  
Re:"Command Line" - 2008/02/01 01:23 Well, my feeling that I was missing something was partially correct. There's a limit setting for the rotate button, which I hadn't seen before. It was set to 90, I reset it to 45. Now it makes a 45-degree rotation when I click the button, less if I stop it sooner. Very nice!
  | | The administrator has disabled public write access.
lilytherobot
User

Platinum Boarder
Posts: 189
graphgraph
Karma: 4  
Re:"Command Line" - 2008/02/05 08:15 That's right, with B.R.A.I.N. you can use the GUI to control the robot, or create scripts (command) to very precisely control movement.

Move forward 11mm
Rotate right 4 degress
Turn on headlights
go backward 2 feet
etc
etc.


Dave...
  | | The administrator has disabled public write access.
JohnO
User

Gold Boarder
Posts: 45
graphgraph
Karma: 2  
Re:"Command Line" - 2008/02/06 06:07 Yeah, no doubt the scripting is powerful. I'm not a scripter/programmer, but i can see how this is a huge feature.

What typed-in commands might give is precise control when driving around remotely. I don't think I can write a script for every possible degree turn I'll need, nor distance, so that's where being able to run individual commands might be useful. Hmmmm, Or maybe something in-between...some stock scripts with commands such as:

RR 5
RR 10
RL 5
RL 10

(RR= rotate right, RL= rotate left)

MF 100
MF 200

(MF = move forward, distances in milliyards)

So, if I write a pile of such scripts, I can save as a file and send them to someone else, right?
  | | The administrator has disabled public write access.
lilytherobot
User

Platinum Boarder
Posts: 189
graphgraph
Karma: 4  
Re:"Command Line" - 2008/02/06 06:35 Exactly. Scripts are nothing more than text files. Useful scripts can be saved as "script components" and used in larger scripts. Scripts can even call other scripts etc. Because they are text files, they can be easily shared with others.

Generally scripts are tied to commands, where a single command executes one or more lines of a script.

For example, the command "dance" might run a script that does:

say I'm dancing.
move forward 20i
rotate left 45
move backward 20i
etc...

I'm adding a feature where you will be able to type in discete commands without having to write scripts first...
  | | The administrator has disabled public write access.