PDA

View Full Version : [Question(s)] Newby Arbotix hassles



Slugman
08-12-2010, 08:04 PM
Hi guys. :sad: I was about to send the question below when I noticed that in the “Tools” pulldown menu of the Arduino program, there was no bootloader highlighted, even though the Arbotix one is in the list. I had the *ahem* smart idea of clicking on the Arbotix one – It is now “Burning bootloader to the I/O Board (This may take a minute)...” – This has been going for over 25 minutes now . . . . . . . . . . I have read posts on here about people that have interrupted it, & destroyed things. There is a black area at the bottom of the Arduino window where the notices appear – There is a number 1 on a highlighted line, that appeared a couple of seconds after I clicked on the bootloader. Moving my curser over the pulldown menus indicates that it is still thinking, & anything I do will interrupt it. Now what? If I disconnect, I brick it. :confused:
Duncan

OK, I give up - Stupid question time.
I have the Arbotix & Xbee starter kit from Trossen, with two AX-12 servos, & am trying to get the Arbotix connected directly to my computer, which is running Win 7, 64 bit. I will play with the Xbees if I can get anything to work directly.
From the instructions on the Arbotix site;
... and do the following:
1. Create a hardware folder in your Arduino sketchbook directory if it doesn't already exist
2. Copy the arbotix folder from the release into the hardware folder of your sketchbook directory
3. Copy the libraries folder from the release into your sketchbook directory.
o These are just the special libraries for the ArbotiX, you'll also want to install the robocontroller library for even more functionality.
4. You may also want to copy the folders in sketches, especially pypose, into your sketchbook directory
Looking at steps 1 & 2 above, by “sketchbook” directory, do they/you mean the “sketches” directory that appears when I install Arduino, or do I have to create a new folder called “sketchbook”, or are they referring to the root folder that Arduino was installed into as the ‘sketchbook” folder? (I have called this folder arduino-0018) I was going to include a representation of my folders here so you could see what I was talking about, but the thread collapses the tree into a list with no indents. Bah!

At the moment, I have gone through the “Getting started with Arduino on Windows” instructions, up to & including running the “Blink” program, which didn’t apprear to work – I ran Arduino, opened “Blink”, selected the board “Arbotix“, found that my Serial Port is Port 1, & uploaded to the board, but nothing actually happens. It is compiled, with no apparent errors, but nothing happens.
I have considered that since the Arbotix is not actually an Arduino, that the “Blink” program may not work on this board for whatever reason, so I have also tried to run the Pypose program – Yes, I know that the Arduino progs should work on the Arbotix, but . . . . Python has also been unsuccessful – A page flashes up on the screen for a millisecond, then disappears, whether it be Python, Pypose, or any over python program. This could be related to the folder setup above, or it could be a Win7 64bit issue, or it could be something completely different. I have worked out how to modify C++ programs to run on my computer, but Python won’t work. I have installed “python-2.5.amd64”, which is apparently the one I am supposed to be using. I would very much appreciate a bit of guidance please!
Throughout all of this, the Pololu has been frustratingly blinking with a happy little orange light, & both the Pololu & Arbotix have a green light, so I know they are getting power! (11.1v measured with a multi-meter)

Edit - PS, I have changed the "Programmers" text file in the "Arduino - Hardware - Arbotix" folder.

lnxfergy
08-13-2010, 12:49 PM
Hi guys. :sad: I was about to send the question below when I noticed that in the “Tools” pulldown menu of the Arduino program, there was no bootloader highlighted, even though the Arbotix one is in the list. I had the *ahem* smart idea of clicking on the Arbotix one – It is now “Burning bootloader to the I/O Board (This may take a minute)...” – This has been going for over 25 minutes now . . . . . . . . . . I have read posts on here about people that have interrupted it, & destroyed things. There is a black area at the bottom of the Arduino window where the notices appear – There is a number 1 on a highlighted line, that appeared a couple of seconds after I clicked on the bootloader. Moving my curser over the pulldown menus indicates that it is still thinking, & anything I do will interrupt it. Now what? If I disconnect, I brick it. :confused:

If you've got an ISP (in system programmer) you can never brick your chip! (well, if you burned the way wrong fuse settings, maybe, but within the Arduino environment, it's nearly impossible). Since your ISP doesn't appear to be connected correctly (see below), it'll just get stuck there because it can't communicate with the device.



From the instructions on the Arbotix site;
... and do the following:
1. Create a hardware folder in your Arduino sketchbook directory if it doesn't already exist
2. Copy the arbotix folder from the release into the hardware folder of your sketchbook directory
3. Copy the libraries folder from the release into your sketchbook directory.
o These are just the special libraries for the ArbotiX, you'll also want to install the robocontroller library for even more functionality.
4. You may also want to copy the folders in sketches, especially pypose, into your sketchbook directory
Looking at steps 1 & 2 above, by “sketchbook” directory, do they/you mean the “sketches” directory that appears when I install Arduino, or do I have to create a new folder called “sketchbook”, or are they referring to the root folder that Arduino was installed into as the ‘sketchbook” folder? (I have called this folder arduino-0018)


Yes, the "sketches" directory, I'll update that on the wiki. However, just as a note, we've had some issues with (I believe) Win7 -- and you may have to put them in the hardware and library folders found inside Arduino-0018 if they aren't recognized. This is a newer feature of the Arduino environment, and still a bit buggy -- works for some people in the sketchbook, but for some it just doesn't seem to want to work unless hardware configurations and libraries are in Arduino-0018.


At the moment, I have gone through the “Getting started with Arduino on Windows” instructions, up to & including running the “Blink” program, which didn’t apprear to work – I ran Arduino, opened “Blink”, selected the board “Arbotix“, found that my Serial Port is Port 1, & uploaded to the board, but nothing actually happens. It is compiled, with no apparent errors, but nothing happens. I have considered that since the Arbotix is not actually an Arduino, that the “Blink” program may not work on this board for whatever reason, so I have also tried to run the Pypose program – Yes, I know that the Arduino progs should work on the Arbotix.

Again, orange light on ISP means it's not connected correctly, so nothing is getting uploaded. To get blink to work -- make sure it's blinking the LED on pin 1 (not 13, like the regular arduino) -- this means changing one or two lines of code in the example.


Python has also been unsuccessful – A page flashes up on the screen for a millisecond, then disappears, whether it be Python, Pypose, or any over python program. This could be related to the folder setup above, or it could be a Win7 64bit issue, or it could be something completely different. I have worked out how to modify C++ programs to run on my computer, but Python won’t work. I have installed “python-2.5.amd64”, which is apparently the one I am supposed to be using. I would very much appreciate a bit of guidance please!

Try running python in a command line -- so that you can see the debugging output. If you post the output here, I'll see what we can do to get you running (typically it's something silly, like not having wxPython installed, or the wrong version, etc).


Throughout all of this, the Pololu has been frustratingly blinking with a happy little orange light, & both the Pololu & Arbotix have a green light, so I know they are getting power! (11.1v measured with a multi-meter)

Orange is not good. Are you sure that the ISP cable is plugged in the correct way? The wire should hang off the side of the board, not cross over the chip...

-Fergs

mannyr7
08-13-2010, 01:17 PM
I am also running arduino 018 under windows 7 64 bit. The best python version for me has been 2.6.4 or whatever the last 2.6 was. On my pc, the sketchbook is in "mydocuments/arduino" but mine only worked by placing the arbotix hardware stuff in the working arduino018 folder.

Slugman
08-14-2010, 07:31 PM
OK, thanks guys. :happy: I will work through it again - Probably not today, as I am at the pointy end of the hockey season & have a game in 4 hours time, but I will get back to it in the next few days. Yesterday I tried to set up my old XP machine to try everything using it instead, but discovered the spring-clip holding the heat-sink to the chip had rusted, fatigued & snapped when we moved house, so the heat-sink wasn't on the chip when I turned it on. *sigh* It was just one of those days. :sad:

Slugman
08-25-2010, 06:32 AM
OK, back again. Thanks to a savvy mate who worked out that I was making things hard by trying to use 64bit when 32bit would do, I now can get the Arduino program to work, & run Pypose, but am still unable to download to the Arbotix. I am at the same stage as Suicidal Banana was in the official 'Arbotix - Pypose' thread (Around page 4 or 5 of the thread, I think - I copy whole threads out to word docs for reference when I don't have internet access, but then the page numbers no longer match)

Binary sketch size: 7798 bytes (of a 65536 byte maximum)

java.lang.NullPointerException
at processing.app.debug.AvrdudeUploader.uploadViaBoot loader(AvrdudeUploader.java:71)
at processing.app.debug.AvrdudeUploader.uploadUsingPr eferences(AvrdudeUploader.java:55)
at processing.app.Sketch.upload(Sketch.java:1498)
at processing.app.Sketch.exportApplet(Sketch.java:146 5)
at processing.app.Sketch.exportApplet(Sketch.java:142 0)
at processing.app.Editor$46.run(Editor.java:2219)
at java.lang.Thread.run(Thread.java:619)

I have tried various combinations of moving folders around, but nothing has worked so far.
I have -

avrispmkii.name=AVRISP mkII (arbotix)
avrispmkii.communication=serial
avrispmkii.protocol=stk500v2

- in the "arduino-0018\hardware\arbotix\programmers.txt file, I have made the mod to allow the ISP to work (Uncommenting one line, then commenting the next, or something like that), & I have merged the "Libraries" folder that was in the Arbotix release with the "Libraries" folder that was there after I unzipped the Arduino release to create my "arduino-0018" folder. This may be the problem, as there were conflicts within the sub-folders - I assumed that the Arbotix sourced files were the ones that I should keep, rather than the ones that came with the Arduino, so I overwrote the original Arduino ones. Step 3 of Arbotix Getting Started did say to copy the folder there though. :confused:

BTW, I have the correct LED on the ISP flashing, (The one closest to the cable on the Pololu - Apparently it is yellow, but I think it looks orange. Definitely not red tho.) & green lights on both it & the Arbotix, so I do seem to have connection to the Arbotix.

Any suggestions? :confused: It's gotta be something simple, but I just can't see it.

lnxfergy
08-25-2010, 09:17 AM
Looking at the Arduino source code (where the java.lang.NullPointerException error was generated) tells me that it's still trying to use a bootloader -- not the ISP.

The two probable culprits are: that either the boards.txt isn't quite right, or that it's not using the correct boards.txt (you did select ArbotiX from the Tools|Boards menu, right?)

If you hold down the shift key and press upload the little window at the bottom of the Arduino screen will output a verbose build -- it'll be a couple hundred lines of info, if you copy that here, we can probably figure out what's going on.

-Fergs

Slugman
08-28-2010, 08:28 PM
I finally found where this mythical Arduino sketchbook directory was – It’s in ‘F:\Users\”Username”\Documents\Arduino’ :tongue:
I hate the way Windows spreads programs around the place! - Now I know why I was overwriting files in the Library folder – I was copying it to the wrong place – Should have the Arduino Library folder in ‘F:\Program Files (x86)\Arduino\arduino-0018’ & the Arbotix Library folder in ‘F:\Users\”Username”\Documents\Arduino\hardw are\’. I removed everything & started from scratch, working through the instructions which now make perfect sense to me... . . .
Yes, I have selected 'Arbotix' from the Tools|Boards menu, & the only option in Tools|Serial Port is Com1, which is ticked. I also Sketch|Verify/Compile each time, before trying to Upload.
Now I get;



Binary sketch size: 7798 bytes (of a 65536 byte maximum)

avrdude: ser_open(): can't open device "\\.\COM1": Access is denied.

Hmmm. That's strange - I tried the 'shift' - 'Upload to I/O Board' & it just spat out the same as I posted above, which also occurs when I try to upload 'Blink.pde'. If I leave it for a couple of minutes, I get the following;

avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500_2_ReceiveMessage(): timeout

...etc etc etc – about 10 lines deleted....

avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500_2_ReceiveMessage(): timeout

avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude: stk500_2_ReceiveMessage(): timeout

...etc etc etc – about 40 lines deleted....
At least it’s different to anything I found in the Arbotix & Pypose thread. It’s nice to be special, but I'd rather not to be spethial. My PC Device Manager says that;

The drivers for this device are not installed. (Code 28)

There is no driver selected for the device information set or element.
- but under ‘Driver Details’ it says “No Driver files are required or have been loaded for this device.”
Win-7 couldn’t find any drivers for it automatically, & I also cannot see anything on the Pololu website that indicates that I need a special driver.

So far, I have tried in turn having 'programmers.txt' & 'boards.txt' in my ‘F:\Users\”Username”\Documents\Arduino\hardw are\arbotix', ‘F:\Users\”Username”\Documents\Arduino\hardw are', or ‘F:\Users\”Username”\Documents\Arduino\' folders - Tried to upload with them in each of those locations. I did notice that when I open 'programmers.txt' (My PC defaults to Notepad) it appears in one string -

avrispmkii.name=AVRISP mkII (arbotix)avrispmkii.communication=serialavrispmkii .protocol=stk500v2
but 'boards.txt' is spread over 20 lines, as you would expect.

arbotix.name=ArbotiX

arbotix.build.mcu=atmega644p

arbotix.build.f_cpu=16000000L

arbotix.build.core=arbotix

# To use an ISP: uncomment the next line, comment out the protocol line

arbotix.upload.using=avrispmkii

#arbotix.upload.protocol=stk500

arbotix.upload.speed=38400

arbotix.upload.maximum_size=65536

arbotix.bootloader.low_fuses=0xFF

arbotix.bootloader.high_fuses=0xDC

arbotix.bootloader.extended_fuses=0xFD

arbotix.bootloader.path=atmega644p

arbotix.bootloader.file=ATmegaBOOT_644P.hex

arbotix.bootloader.unlock_bits=0x3F

arbotix.bootloader.lock_bits=0x0F

arbotix.build.core=arbotix

arbotix.verbose=false
Opening them in Wordpad or Word however, shows 'programmers.txt' as being correctly separated on 3 diff lines. I edited 'programmers.txt' & put character returns in to ensure the lines are separate in wordpad, but that didn't seem to make any difference in any of the locations listed above either. (I have since changed it back)
I have tried putting Pypose.pde in different locations, just in case it makes a difference for where it is looking for libraries etc, but that doesn't work either.
I guess it might be a security issue, but I cannot find anything that would prevent me accessing COM1. Everything is run with me as Admin.

lnxfergy
08-28-2010, 09:06 PM
Yeah, the problem is that it's not opening the port (the fact that it gets there, means that it is compiling correctly, so your ArbotiX hardware & library installation appears to be correct). Sounds like a driver issue -- but I'm not a Windows user. Two places to check are the Pololu guys (about the programmer, and any drivers it needs), and possibly look to see if the Arduino environment has any known issues with opening ports under Win7.

-Fergs

elaughlin
08-29-2010, 08:43 AM
I set mine up all through windows. I had a problem at the beginning also. I will try to look back through to what I did, see if anything matches up to the problem you are having. Are you using windows 7 or XP?

Slugman
08-29-2010, 10:12 PM
Using a Win 7, 64 bit Computer - But running 32 bit versions of Python, wxpython & pyserial. Thanks for the assistance! :happy:
Hopefully my stupid questions will help someone else, when they search through here later . . . . :wink:

Adrenalynn
09-03-2010, 10:09 PM
I had to roll the JRE to the 32 bit version, and run the dev environment with administrative rights.

SteamAutomaton
09-04-2010, 05:11 AM
Sounds like a driver issue -- but I'm not a Windows user.

-Fergs
So what flavor of OS do you use?

Yours,
SA:)

lnxfergy
09-04-2010, 11:30 AM
So what flavor of OS do you use?

Yours,
SA:)

Linux. Typically, Ubuntu.

-Fergs

Slugman
09-09-2010, 07:58 PM
I have managed to get things almost working, if that makes sense. Still not entirely sure if it was the Win7 Firewall (that was actively preventing pythonw working) or my Admin permissions, or even something else (I had a look in the Bios - The Com Port is definitely set up), but I now seem to be able to load PyPose to the Arbotix – I no longer get the Com1 - Access Denied error. Even a broken watch is right twice a day.....:wink:

I open PyPose, create a new project, tell it that I only have a measly two servos, & activate Com3 (The only option in there). I compile, then upload to the Arbotix – So far so good. Change the ISP over from the Arbotix + XBee to the Explorer + XBee, & run Pypose.

I cannot do anything to affect the servos – I get; Failed read - It must therefore be the Baud rate – I run X-CTU & work through the XBee Basics Tute.

Select USB Serial Port (Com3) – Check.
Select Baud 38400 – Check.
Test / Query – Fail!
“Unable to communicate with modem”
I click on the “Enable API” checkbox under the Host Setup Tab (This isn’t in the Tute, but I found it in something called “Using X-CTU to Download Firmware and Profiles to XBee RF Modules”) & Test again – Check – I get the following;
Communication with Modem..OK

Modem = Name unknown (ID = ‘very large number’)

Modem firmware version =
Following the Trossen Tute again, I click on the ‘Modem Configuration’ tab & click ‘Read’.

‘Modem’ remains UNKNOWN. ‘Function set’ remains blank, as does ‘Version’.

Underneath the text box, near the bottom of the screen, I get the following;
Failed to enter command mode

Unable to read Version (AVTR)

Read parameters..Failed
I use the pulldown under the Modem to manually select XB24, which brings up the Function set etc, then click ‘Read’ – It changes back to UNKNOWN.

I cannot continue with the Tute, as I don't have any function sets to select, in order to change the Baud.
Any ideas? :confused:

mannyr7
09-10-2010, 07:49 PM
Are you doing a ADWR to flash your changes to the XBee module? Double check that X-CTU is configged to send at 9600 and then try a "Read" again. Perhaps the change didn't take. "Enable API" shouldn't need to be checked, however I recommend checking "Always update Firmware" before you do your Read.

Edit: oops! I meant to type ATWR using the X-CTU terminal.

Slugman
09-19-2010, 09:12 PM
Thanks Manny :veryhappy: – I ticked the “Always update firmware” & unticked the "Enable API", & that seems to make a difference when I also used Baud = 9600. I managed to ‘Write’ to the XBee at 9600 to tell it that it was an XB24 (I think this is what you mean by ADWR), but I had missed the part in the XBee Tute that had the Firmware version = 1084 - I selected the bottom one in the X-CTU picklist – From memory, it was CD10. From there, I was unable to change it to Baud = 38400, until I stopped the X-CTU program, then ran it again - Changing the Baud then worked - I have no idea why, but it took me hours of stuffing around before I found it. Discovered I cannot use X-CTU to change the XBee settings on the Arbotix, but can change the settings of the XBee on the Explorer, so I transferred them over to the Explorer in turn to change them. I still cannot change the version from CD10 to anything else though – It drops out every time – Maybe it is supposed to be that one . . . . . I don’t know.

I can now change the Channel, PAN ID, Destination High, Destination Low, and Source Address, but I don’t know what Channel or Source Address to use. The Channel was set to “A” by default, which means nothing to me, unless it is referring to the a, b, g, & n protocols, in which case I thought I was supposed to be using “A”. The “Channel (ATID) = 1111” used in the tute would not work – The text in X-CTU kept turning red, & drops out when I try to Write it to the XBee.

Wiki “IEEE 802.11” is very interesting, but not actually helpful in determining what I need to put in there. I have found that these instructions assume a great deal of knowledge on my part, that simply isn’t there yet – I am still getting “Failed Read”s in PyPose, but that is probably due to me leaving the Source Address at zero. (I realize now that what I thought was ‘Destination High’ & ‘Destination Low’ in the Tute was supposed to be ‘Destination Low’ & ‘Source Address’ – ATID, ATMY, ATDL & ATBD are not acronyms I think about every day)

Lower down in the tute, the screen-shot in the XBee Tute of the X-CTU settings show;

Channel = 13
Pan ID = 4779
Source Address = 4700
Destination High = 0
Destination Low = 4701

Which are very different numbers to the XBee Tute example higher up that shows a working linked pair of XBees. I tried to use the working settings of;


XBee 1 ------- XBee2
Channel = 1111 ------- Channel = 1111
Pan ID = 888 ------- Pan ID = 888
Destination High = 0 ------- Destination High = 0
Destination Low = 11 ------- Destination Low = 10
Source Address = 10 ------- Source Address = 11
Interface Data Rate = 38400 ------- Interface Data Rate = 38400

& as I said above, the Channel wouldn’t accept that number. I tried with Channel = A, & again with Channel = B, but given my stuff-up with the Destination / Source settings, it couldn’t work anyway, even if one of them was correct – I will have another go tonight – Still not sure if I am supposed to be putting a letter or a number in the Channel.

Given that I am not an expert on the ins & outs of the 2.4GHz range, is there somewhere I can go to find handy tips on what channel or source address to use? I.E. X channel is bad, as cordless phones are crammed in there too, Y channel is OK but limited by proximity to Microwaves, Z channel is useful outdoors etc etc. The only hint I have for the Channel is from Wiki that talks about channels that are used by various countries, & refers to numbers from 1 to 14, & I see that the screen-shot has used channel = 13. Is channel 13 a decent one to try, or do I just have to pick random numbers until I discover that I am interfering with Joe Bloggs pacemaker down the road . . . . . The ‘List of WLAN channels’ link in Wiki is again interesting, but not helpful for this specific situation.

Thanks for even bothering to read all this, let alone answering any questions, I know it’s another long post . . . . . . .

Pi Robot
09-20-2010, 09:04 AM
When you are configuring the XBee using X-CTU, and you click on the Channel field in the Modem Configuration tab, look toward the bottom of the window and you will see something like:

Range: 0x0B-0x1A

which translates to 11-26 in decimal. I find that entering the channel in decimal seems to work (I currently have 13 entered). However, I do not know which channel might be best for your situation. If you have two explorer modules, you can run a range test for each channel. But I only have one explorer so I cannot say how well that works.

--patrick

Slugman
09-20-2010, 06:13 PM
Before I start, thanks Pi Robot, if I ever get to the stage of setting the channel, I will do that - Thanks. :happy:

Last night, I checked in Device Manager that the Com-port had a Baud of 38400. Both XBees are at Baud = 38400, but both had source address set to zero. I changed the settings of an XBee to;


Channel = B
PAN – ID = 888
Destination Address High = 0
Destination Address Low = 10
Source Address = 11

Done! :happy: I took the XBee (Now called XBee 2) from the Explorer & swapped it with the one on the Arbotix. Read it to make sure I have comms – Yes.

Tried to alter the other XBee, to create XBee 1, which would have stayed on the Explorer – Cannot write to the XBee. It always ends up with the same error;

Getting modem type....OK
Programming modem...Lost communication with modem
Write Parameters...Failed

Closed X-CTU, then opened it again (As Admin) – Nope – Same error. Turned off Windows Firewall – Same error. Tried a few more times – Same error. Pressed the ‘Restore’ button to get it back to base settings – That worked! Read it to make sure – Yes! (This changes the XBee Baud back to 9600 though) Changed Baud rate of Com-port in Device Manager back to 9600. In X-CTU, clicked “Test/Query” to confirm comms – Yes. Tried to write to it again – Nope, same error. Tried changing just one setting at a time – Same error. Removed the X-CTU program, then re-installed it to a different location – Same error.
Put the good XBee (No.2) back in the Explorer & changed the Com-port baud, read it in X-CTU to check that it was still the same, then saved the profile onto the hard drive. Swapped the XBees & bauds back again, & loaded the saved profile. Tried to write it to XBee 1 – Nope, same error again. Changed over to a diff USB port on the PC – Same error.
Swapped XBees again, (& Baud rate) to put the good one back in. Read it - Yes. Tried to change the PAN-ID – Nope, same error!!!!!! :genmad:

I now have one good XBee, that has all the correct settings (apart from the channel) as far as I can tell, & one that is back to base settings, but I cannot change the settings of either. I will try to get a new cable today, & see if that makes a difference. Does anyone have a set of instructions for these? I don’t mean the XBee Tute which gives a good lesson on how it all works, I mean basic step by step instructions. I.E. Press this, do that, remove this, install that, type this, check that. :confused:

Slugman
09-21-2010, 05:30 PM
First off - It works!!!! :veryhappy:
I got a new mini-USB cable, which didn't do anything new, but in desperation I unchecked the "Update Firmware" box & it suddenly allowed me to write to the XBee! Sorry Manny, I know this is opposite to what you said above - I think a gremlin crept into the X-CTU program somehow, since it affected both XBees, & changing the mini-USB cable didn't fix it. I suspect that if I check that box again, it would still work OK - It just needed a digital version of 'Percussive maintenance', even though re-installing the program didn't work - Probably a Win 7 issue.
Once it was communicating again, I changed the settings on both XBees using channel 13 (Thanks Pi Robot) & even though I get a few errors in PyPose which I will sort out, the servo moves to the position I select on the slider. Might experiment later with diff numbers, but I doubt I will fly around to your side of the world just to be in a position where I might affect another bots signal, so these settings will stay for a while.
Thanks everyone! Today is a good day. :cool: I also just got conformation that my Axis M1011-W camera is on its way, so I better check my piggy-bank to see how many more servos I can get. Trossen will def be getting another sales order in a week or two. :wink:

Slugman
09-26-2010, 07:32 PM
Hi All. Getting another weird one, unless I am doing something wrong, again. Currently have both servos set at ID = 253 so I am trying to change their IDs. Can anyone follow what I am doing & let me know if my procedure is right? I thought it should be pretty straightforward.

Connect only one servo to Arbotix. Power robot on. Pypose on - Config – Set Port correctly. Move slider & ‘Set’ servo to get ‘ID found’ from the Text box = 253. Open Pypose Terminal. Set port again (not sure if I have to but I did it anyway). Type “mv 253 2”in Terminal then hit enter – Get an “OK” from the Terminal. Open Pypose Pose Editor – Set port. Move slider & ‘Set’ servo, then look at ‘ID found’ from text box = 253 again.

The servo didn’t take the change in ID. :confused:

lnxfergy
09-26-2010, 07:59 PM
Hi All. Getting another weird one, unless I am doing something wrong, again. Currently have both servos set at ID = 253 so I am trying to change their IDs. Can anyone follow what I am doing & let me know if my procedure is right? I thought it should be pretty straightforward.

Connect only one servo to Arbotix. Power robot on. Pypose on - Config – Set Port correctly. Move slider & ‘Set’ servo to get ‘ID found’ from the Text box = 253. Open Pypose Terminal. Set port again (not sure if I have to but I did it anyway). Type “mv 253 2”in Terminal then hit enter – Get an “OK” from the Terminal. Open Pypose Pose Editor – Set port. Move slider & ‘Set’ servo, then look at ‘ID found’ from text box = 253 again.

The servo didn’t take the change in ID. :confused:

253 is the address the ArbotiX uses internally (for accessing IO and loading poses/sequences to play). Any command sent to 253 won't be passed through to the Dynamixel bus.

To be able to access those servos, you're going to have to open the pypose.pde sketch, change 253 to something else, load the sketch, move the servos, and the reload the original sketch so that poses/sequences will work (and never move a servo to 253 again, or you'll have to go through this again).

-Fergs

Slugman
09-26-2010, 09:12 PM
OK, thanks. I didn't set them to 253, they seem to have arrived like that, unless I somehow managed to do it when I was stuffing about before. The text I get is like this, from memory;

ID found: 253
Length found: 2
Error level found: 0
Checksum computed: 255

I looks like I will have to step outside my comfort zone once more.... I have been putting off looking at the sketches until now.... :happy:
BTW - If you are looking at a wireless IP camera that is better (More $$$) than the Trendnet, but don't want to pay the $1,600+ for an n camera - I suggest looking at the Axis M1011-W in the b/g range. Played with the image overlay on the weekend - I will make a picture to surround the live image so it looks like a proper Mech cockpit - Hoping to combine it with PyMechCam at some stage to get the dials in the cockpit to actually work.... :veryhappy: Just need to upgrade my PC viewer a bit so I can use the better H.264 compression.

Slugman
11-14-2010, 03:49 AM
Back again :happy: I got it going (Pypose still shows ID 253 when moving servos, but it worked once I assumed that Andrew had sent me servos set to ID=1 - Take note everyone, Trust Trossen!) I used my 12 servos to make a biped (4 servos for 2 legs - Waddled like a duck!), then made a 6-DOF pair of legs (Top-heavy, needs arms for balance), then finally a quad - This is where I get into trouble with NUKE. Pypose works fine - I can loop a sequence to walk forwards nicely, but I wanted a simple RF robot controlled from my computer, not a hand-held remote - This led me to NUKE, where I can use the Test Drive function to drive it around. Well, that's the idea...

I finally got to watch the video (Cannot see it at work, & home connection hasn't been good), & even though I set the servo numbers differently to the vid, I am sure I am doing it correctly as I set them in NUKE the same as what is on the bot. Unfortunately NUKE goes nuts when I get to the 'test sign' stage. I only got the coxas on all 4 legs to work correctly by flipping the LHS ones over, but the Femur & Tibias on the left side fold under the bot - Femurs approx 45deg down, & the Tibias go past their limits, hit the femurs & flash red due to exceeding the stall torque.
I made sure that the servo limits I set were not outside the control range, & the neutral pose was definitely within the max & min servo limits (I have no need for the Femur servo to go higher than horizontal, but made the limit higher in case the neutral pose was accidentally set slightly out of the max limit)

If no-one has any better ideas, I am going to pull the whole thing apart again, & set the servos in the same numbering pattern as on the NUKE video of Issy & see how that goes, but I am sure I shouldn't need to start flipping servos over to match what the program wants. It's just strange that Pypose works fine, but NUKE goes nuts, even to the extent of exceeding the servo limits. :confused: I just created a new project, & went through it all again, but it still does it, so having poses already set in Pypose doesn't affect the NUKE side of things at all, which is what I expected TBH.

lnxfergy
11-14-2010, 10:38 AM
Could you post your .ppr file? I'd also be interested in seeing the messages that include servo ID 253 if you could copy them over here.

-Fergs

Slugman
11-14-2010, 03:59 PM
No worries - Am at work at the moment, but in about 10 hours I will post it up. :happy:
Just so this particular newbie is clear - You mean the text that appears in the other window - the one that looks like DOS computers used to, when Pypose/NUKE is running, don't you? :o

lnxfergy
11-14-2010, 04:54 PM
No worries - Am at work at the moment, but in about 10 hours I will post it up. :happy:
Just so this particular newbie is clear - You mean the text that appears in the other window - the one that looks like DOS computers used to, when Pypose/NUKE is running, don't you? :o

Yup, that's exactly what I'm looking for. The debugging output should tell us exactly what is going on. The .ppr file that you save with your project information gives me the other part of it.

-Fergs

darkback2
11-14-2010, 07:11 PM
Not sure if this is the appropriate place to link this, but fergs and upgrade got me up and running controlling/looping sequences from my computer keyboard with X, seams like you could get the same thing going with a little bit of editing.

Here it is. (http://forums.trossenrobotics.com/showpost.php?p=41986&postcount=40)

Hope this helps,

DB

Slugman
11-15-2010, 12:05 AM
Actually, it is exactly what I want to end up doing, so as far as I am concerned, it is very helpful - It just means I have less excuses for not getting started on programming........ I always intended on making my interface like a first-person shooter game for the bot. :happy: Thanks DB.
I will start printing out code so I can start trawling through it to work out what I am doing, but I will still get a copy of the ppr file tonight. I can't be the only idio-I mean newbie to have this issue. Well, OK,....... I just might be the only one after all. I know that at some point I will be dumping reams of txt files on the doorstep of a programming mate of mine & begging for help, but at least I can pull all my hair out in frustration first, so he knows I have worked on it. :tongue:

Slugman
11-15-2010, 06:28 AM
OK, that took a little longer than I expected – My turning servos over had stuffed up my poses, so I had to fix them first – It was at this point that I found something that....how shall I put this....I am finding too embarrassing to share with the 6 billion people out there who might have access to this post, but suffice to say that my problems with NUKE no longer include one pair of legs curling under the bot, & now I only have to find the correct location to save the export file to so I can compile the program correctly, (It is unable to find the AX12 file when I compile from the current location) but that’s OK, I will watch the instructions again & work that out. :o:o:o:sad: Not tonight though, or I will have to sleep on the couch... :rolleyes:

Now for the strange “ID found: 253” thing which caused my confusion when setting up the Arbotix in the first place... :confused: Which you are probably still interested in.
I opened the Sequence editor first, set the Com port, ran the poses called “Standing still, 1, 3, 5” which is the sequence of poses that allow the quad to walk forwards. I then halted the sequence, & opened the Pose editor, & set the bot to each pose in turn, starting with “Standing still”. I have typed in the info I see in the text box, as I cannot copy it, with the occasional comment to say what I was doing. I came to the conclusion that I should just ignore the IDs, as I used the Terminal & "ls 38400" command to find the correct number & the "MV x y" command to set the correct number. I didn't do it below, but the LS 38400 command in the Terminal function lists the correct servo IDs when they are all connected.

PyPose starting...
Opening: blah blah blah file location\Cowabunga.ppr
Opening port: COM3
Run sequence...
Setting pose size at 12
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
Sending pose Standing still to position 0
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
Sending pose 1 to position 1
0xff NOT found, restart: 32
0xff NOT found, restart: 80
0xff NOT found, restart: 111
0xff NOT found, restart: 115
0xff NOT found, restart: 101
0xff NOT found, restart: 58
0xff NOT found, restart: 13
0xff NOT found, restart: 10
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
Sending pose 3 to position 2
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
Sending pose 5 to position 3
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
Sending sequence: [0, 244, 1, 1, 244, 1, 2, 244, 1, 3, 244, 1, 255, 0, 0]
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
Halt sequence...

# At this point I go back to the Pose editor, set the Com port & set it to “Standing still”.

Opening port: COM3
Setting Pose...
Setting pose size at 12
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255

# I then set it to Pose 1

Setting Pose...
Setting pose size at 12
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255

# I then set it to Pose 3

Setting Pose...
Setting pose size at 12
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255

# I then set it to Pose 5 – I see a pattern here...

Setting Pose...
Setting pose size at 12
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255
0xff found
0xff found
ID found: 253
Length found: 2
Error level found: 0
Checksum found: 0
Checksum computed: 255

lnxfergy
11-15-2010, 08:52 AM
Ok,

The "253" occurring there is normal (the commands to set the # of servos and play sequences indeed go to the arbotix itself, not onto any particular servo) -- if you see it when doing an "ls" in the terminal, we've got problems.

Now, onto your .ppr file. I notice that your minimum value is almost (or exactly) the same as your neutral for servos 3, 6, 9, and 12. The neutral is also out of range for servos 5 and 11. These issues would definitely cause the robot to bug out during the sign test (as the neutral itself is out of range on 2 servos). So, I would suggest going back and recapturing your neutral pose -- make sure it is correct. Then do the limit capture again -- the one thing to be careful (and this is on the wiki, but not in the video) is to make sure you don't go outside the 300 degree range of the servo (or your limits will be incorrect).

-Fergs