Offworld-Robotics / numbat_software

Off World Robotics NUMBAT Backend
5 stars 4 forks source link

Get smart servos working #5

Closed StephMc closed 10 years ago

StephMc commented 10 years ago

We borrowed some smart servos from mech blockhouse similar to the one that will be on the real drive base. We should look into how they work and get the ones we borrowed running.

Remember to document findings on the wiki!

StephMc commented 10 years ago

Its looking like we'll need servos on the husky to control either manipulators or rotate cameras. If we can use the smart servos this will make those jobs easier. Ask @yilserkabaran to get access to the smart servos.

hjed commented 10 years ago

Ok, using the ros arbotix drivers: http://wiki.ros.org/arbotix Managed to power up the arbotic board by following the instructions in the manual to use usb power http://arbotix.googlecode.com/files/arbotix-manual-draft2.pdf (note: will need to move the jumper back to original position to power servos). Now installing the firmware http://wiki.ros.org/arbotix_firmware (I checked and it doesn’t appear to have been installed already, or at least ros won't connect to it) Installed aurdrino ide, and then arbotix tools/pyPose from https://code.google.com/p/arbotix/downloads/detail?name=arbotix-0015.zip&can=2&q= IMPORTANT: the FIDI->USB cable cannot be connect whilst the XBee is on the board, I had to remove it to get it to work. So far: managed to upload pyPose to board as per tutorial. Still need to install ros libaries on it

hjed commented 10 years ago

This appears to be depricated going to try http://forums.trossenrobotics.com/showthread.php?6911-Arbotix-ros-of-arduino-code-verification-problem latter

hjed commented 10 years ago

Succesfully connect ros the arbotix chip, you need to run "rosrun arbotix_python arbotix_driver" which is not in any of the tutorials.

hjed commented 10 years ago

Managed to connect one of the servos, and detect it using arbotix_terminal. I managed to power the board by connecting it to the vin and GND pins on the arduino, as the battery doesn’t seem to work (found a power supply that worked with the arduino). (Positive terminal connects to vin). All ports appear to work for servos, but only one of the servos appears to work (I can't detect the other one no matter how I connect it, it may be broken).

To move servo: -connect serial cable -run: rosrun arbotix_python arbotix_driver _joints/aaa/id:=[id] where id is the value from "arbotix_terminal" then ls. (Should be 1) -run rostopic pub /aaa/command std_msgs/Float64 10 The motor should rotate.

A few notes -You need to add your linux user to the dialout group to use serial ports. -The XBee uses linux serial drivers, so whatever way we use it we need serial drivers -The serial port may be USB1 instead of USB0 in which case you need to add _port:=/dev/ttyUSB1

StephMc commented 10 years ago

Ok great, that's good news. I'll try it on the sabre (would you be able to put the arbotix board in the bluesat robotics draw?). The arduino works with the sabre so hopefully the arbotix board uses the same driver.

hjed commented 10 years ago

Ok, cool I will put them in the room tomorrow. If it is open. Both the XBee and the FIDI cable are identified as "FTDI USB Serial Device converter" by my linux install (and virtualbox). I haven't manage to get the XBee's working though (Tried flashing the firmware and then setting up using these instructions http://learn.trossenrobotics.com/arbotix/10-configuring-xbees-for-the-arbotix#&panel1-12), but they won't talk to each other. However as ROS treats the xbee exactly the same as the cable, we should be able to connect them easily if we get them working latter. To tell if the device is connected correctly run "arbotix_terminal" then list and the second led should flash. (If you have the cable plugged in ROS will think its connected correctly, but not do anything)

hjed commented 10 years ago

Ok, I've put it all back in the bluesat robotics draw, the servo that works is the one I've left connected to the board. I'm pretty sure the battery is dead so you may need another power source (I powered it through the audrino, using the power adaptor off my wireless router). The servo should work no matter what port it is connected to.