InsectBot Home | ANU Home | Search ANU | HORUS | Staff Home
The Australian National University NICTA
InsectBot - Usage




Home > Usage

Acquiring InsectBot and Client Source Code

On this page you will find calls referring to "ib_client/*", which are InsectBot client programs. All this source code is from the InsectBot package located in SVN on robot.anu.edu.au. To acquire the latest package simply do:

svn co svn+ssh://<username>@robot.anu.edu.au/home/repos/insectbot

WebSVN: Their is a web-based viewer for the insectbot svn repository which can be found here.

NOTE: If you do not have a user account on robot.anu.edu.au, contact Luke Cole or Shaun Press.

Download: insectbot-9.05.01.tgz

Controlling InsectBot

  1. Turn on the robot power, via pressing the "Robot Power" button, which will illuminate the "Power LED".
  2. (Optional) To automatically have the robot home the lift-platform during bootup, ensure "E-Stop" is disabled, which will illuminate the "E-Stop LED". Now wait for the lift-platform controller to be ready, which is indicated by the lift-platform controller status LEDs both going green for HV and ST.
    NOTE: If "E-Stop" is enabled before bootup, you will need to manually home the lift-platform to control it. After computer bootup simply run the run the following on a computer:
    ib_client/ib_utils -H <INSECTBOT_IP> -L
  3. Bootup the InsectBot computer, via pressing "Computer Power" button, which will illuminate the "Computer Power LED". You will hear 1 beep after you press the "Computer Power" button and will hear 4 beeps when the robot is ready to be used.
    NOTE0: The InsectBot NIC will attempt to get a IP from a DHCP server. Within NICTA, this will be a static IP 203.143.173.251
    NOTE1: When the insectbot boots up it will automatically run the following (which calls "ib/init.sh 30"):
    /etc/init.d/bootup-insectbot start
  4. Now you can run your InsectBot clients. Or simply use one of the provided programs:
    ib_client/js_ctrl
    ib_client/ib_utils
    

Connecting your Laptop directly to InsectBot

  1. Plug a cross-over cable from the InsectBot computer NIC to your laptop NIC.
  2. On your laptop, ensure you have a DHCP installed and set a static IP (generally 10.0.0.200) for the InsectBot MAC address (ie. 00:40:63:e2:f2:c2). To install a DHCP server:
    sudo apt-get install dhcp3-server
    
  3. Now start the DHCP server via the following script:
    sudo ib_client/init_network_laptop.sh
    
    OR do it yourself, via:
    sudo ifconfig eth0 10.0.0.1
    sudo /etc/init.d/dhcp3-server restart
    
  4. Now turn on the InsectBot and bootup its computer (see above).
  5. When finished, you can disable the DHCP server by the script:
    sudo ib_client/init_network_laptop-disable.sh
    
    OR do it yourself, via:
    sudo /etc/init.d/dhcp3-server stop
    sudo ifdown eth0
    sudo ifup eth0
    

Programming InsectBot Clients

Simply include the following files in your code:

  • lib/ib_api.c
  • lib/ib_api.h

Then you must first call the routine:

int ib_init_client(char *insectbot_ip, int ip_port_drive, int ip_port_lp, int ip_port_vision);

And then you can call any of the following routines:

int ib_drive_send(int *motor_speeds, int *motor_dirs, int motor_nums);
int ib_drive_send_exit();
int ib_lp_send(double vel, double accel, double deaccel, int pos);
int ib_lp_send_home();
int ib_lp_send_exit();
int ib_vision_recv(IplImage **imgs, int *imgs_count);

Please refer to the source code for descriptions of routines and arguments, or simply view the documentation generated via doxygen of ib_api.c and ib_api.h.

Example InsectBot clients:

  • ib_client/ib_utils.c - a basic program to use the InsectBot features.
  • ib_client/js_ctrl.c - a program to control the drive and lift-platform via a side-winder joystick.

Charging the InsectBot Batteries

  1. Ensure power supply is not connected to a load (i.e. InsectBot).
  2. Set power supply voltage to 27V and set power supply current to very small.
  3. Connect power supply to InsectBot recharge connector (labelled "R").
  4. You will notice the voltage on the power supply drop, now increase the current to the desired current. (i.e. for continuous charge: use 0.36A if InsectBot is powered down and 2.5A if InsectBot powered up).

Troubleshooting

Motor(s) not behaving correctly?

Ensure you send positive motor speeds between 0 and IB_MOTOR_MAX_CL_SPEED.

Wheel/Motor not moving?

If you find a wheel/motor is not moving, then it could be one of the following problems:

  1. (Most likely) A blown motor controller fuse. To fix, simply replace the blown fuse to the effected motor controller. NOTE: The fuse holders and motor controllers are clearly labelled 0 to 3.
  2. Blown H-Bridge FETs. To fix, replace all four FETs on the effected motor controller. NOTE: this should only happen if your playing around with controlling the motors directly (i.e. without using usb_iob_motor_ctrl.c) and have a bug in your software. If this happened for any other reason contact Luke Cole asap.
  3. (Unlikely) The axle between the motor and the wheel is slipping. To fix, you must reglue (using masterbond) the motor axle to the wheel.

NOTE: Problem (1) or (2) will be indicated via an uilluminated motor controller status LED "VCCM".

Lift-Platform not moving?

If you find the lift-platform is not moving, then most likely the lift-platform controller is not ready or in an error state (indicated via non-green status LEDs, HV and ST). To fix, toggle "E-Stop" then restart the lift-platform server on InsectBot (/home/insectbot/insectbot/ib/vix250ie_lp_server), or simply restart InsectBot.

No four beeps after bootup?

If you find the startup script is not doing the four beeps, then it could be one of the following problems:

  1. The InsectBot computer did not bootup correctly (i.e. no inital single beep). To fix, turn power completly off, wait a few seconds and then try and bootup again.
  2. The Linux OS is checking the hard drive. To fix, keep waiting or just reboot.
  3. The Linux OS is broken. To fix, reinstall OS.

Inside the InsectBot

NOTE: Wheels/motors are labelled clockwise with 0 starting at 1:30 o'clock when lift-platform mechanism (opposite end to motor controllers) is closest to observer.

Inside the InsectBot

Primary buttons and LEDs for the InsectBot:

InsectBot power buttons/LEDs

Motor controller LEDs and Fuses:

InsectBot motor controllers