Coasting Blues...

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: 99jonathan, roger, imaqine

Coasting Blues...

Postby 700 Tnega Terces » Thu Feb 12, 2009 3:08 am

I am working on making a SLAM (simultaneous localization and mapping) robot using the NXT, and one of the things I would like for it to have a "Fifth-Wheel Tachometer", i.e. an independent, un-powered wheel who's sole job is to measure distance. I was hoping that a fifth wheel design would be more reliable, as not only would the fifth wheel never move if the robot wasn't, but I was hoping that it might slip up differently from the powered wheels, allowing for a more precise measurement via cross comparison.

The trouble is, I can't get my third NXT motor to "coast" and let the fifth wheel turn freely. Is there a way to get it to do this, or do I need to use some other sensor for the fifth wheel (if so, which do you suggest)?
"The name's Jond, Bames Jond..."
700 Tnega Terces
New User
 
Posts: 21
Joined: Thu Feb 05, 2009 1:13 am

Postby gloomyandy » Thu Feb 12, 2009 8:33 am

A few things to try...
1. Disable speed regulation on the motor.
2. Set the motor into float mode.

You probably need to do both... You should notice that it is much easier to turn the motor when you have done the above... But the motor may still not run freely enough to be used as a coasting wheel...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3892
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby 700 Tnega Terces » Thu Feb 12, 2009 8:56 pm

Anyone know of any DIY rotation sensors?
"The name's Jond, Bames Jond..."
700 Tnega Terces
New User
 
Posts: 21
Joined: Thu Feb 05, 2009 1:13 am

Postby ChrisB01 » Sun Feb 15, 2009 8:31 am

I know the RCX used to have a rotation sensor that was quite accurate and free turning. It would interface easily (hopefully) but getting your hands on one might be a bit tricky.

Chris
ChrisB01
Advanced Member
 
Posts: 189
Joined: Sat Mar 15, 2008 12:19 pm
Location: UK

Postby lawrie » Mon Feb 16, 2009 1:32 pm

We do not currently have a driver for the RCX Rotation sensor. It needs support either in the firmware or possibly a Java thread to count rotations as the sensor only records its current orientation. If anyone wants to use this sensor the development team could look into supporting it.
lawrie
leJOS Team Member
 
Posts: 909
Joined: Mon Feb 05, 2007 1:27 pm

Postby 700 Tnega Terces » Mon Feb 16, 2009 6:27 pm

Is the SPLIT-Nx supported? Or any of the 3rd party sensors at: http://www.trossenrobotics.com/c/education/3rd-party-lego-accessories.aspx?
If not, and I decided I did need some of them for my project, how soon could they be supported?
"The name's Jond, Bames Jond..."
700 Tnega Terces
New User
 
Posts: 21
Joined: Thu Feb 05, 2009 1:13 am

Postby ChrisB01 » Mon Feb 16, 2009 8:15 pm

Check the lejos.nxt.addon package for all the 3rd party sensors. Most are supported but some like the Split-NX are not, I myself have a Split-NX and did once try to get it working, but failed. It is theoretically possible though and I gave up only really after a few attempts. I think for the Split-NX because it allows more than one sensor to be on one port you really need to write the code yourself to suite your own setup. The i2c addresses of the sensors need to be changed to avoid any clashes and then you need to consider power to the port.

Chris
ChrisB01
Advanced Member
 
Posts: 189
Joined: Sat Mar 15, 2008 12:19 pm
Location: UK

Postby 700 Tnega Terces » Tue Feb 17, 2009 1:08 am

ChrisB01 wrote:I think for the Split-NX because it allows more than one sensor to be on one port you really need to write the code yourself to suite your own setup.

Shouldn't there be a way to make the process generic though? Like a senor that gives you four different lines of data (or something, I don't really know anything about how ether SPLIT-Nx or leJOS works with sensors...)?
"The name's Jond, Bames Jond..."
700 Tnega Terces
New User
 
Posts: 21
Joined: Thu Feb 05, 2009 1:13 am

Postby ChrisB01 » Tue Feb 17, 2009 9:41 am

I'm not an expert on the Split-NX but as I understand it all it does is allows you to connect more than one sensor to a port. All digital sensors for the nxt use i2c, i2c devices have addresses, normally the address is hardwired in to the sensor but mindsensors sensors have changeable i2c addresses. This allows you to say put up to 128 sensors on one port as this is how many addresses you have. You can access all the data from each sensor independently. The problem is that most sensors like the ultrasonic sensor and hitechnic sensors have fixed i2c addresses. There is no easy solution but I am sure a class could be written to better manage the Split-NX and say warn you of any conflicts and the power needed for the sensors.

Chris
ChrisB01
Advanced Member
 
Posts: 189
Joined: Sat Mar 15, 2008 12:19 pm
Location: UK

Postby lawrie » Wed Feb 18, 2009 1:30 am

Is the SPLIT-Nx supported? Or any of the 3rd party sensors at: http://www.trossenrobotics.com/c/educat ... ories.aspx?


This web site seems to sell Mindsensors sensors and adapters. Most, but not all, of these are supported by leJOS. If you need a specific sensor supported, let us know.

I have a Split-Nx and use it successfully with leJOS. It is a passive device that just allows multiple sensors to be connected to a port, so it is not clear how leJOS could support it. We could have better support for changing the address of Mindsensors sensors. I am not sure that there is anything we can do if multiple sensors with the same I2C address are attached to the same port. The Split-Nx is quite useful as a hub for RS485 connections - this is in the SVN version of leJOS.

What do you want to use the Split-Nx for? As ChrisB01 says, its use is limited as some I2C sensors have fixed addresses, and it does not work very well with AD sensors or motors.
lawrie
leJOS Team Member
 
Posts: 909
Joined: Mon Feb 05, 2007 1:27 pm

Postby gudy » Wed Jun 17, 2009 3:03 am

Might be a late answer, but in case other people are interested ...
I just got an NXT, so I'm no expert with it, but I've done a fair bit of robotics a while back.
I was thinking about the same problem, and if I had to implement a free wheel to measure distances, I would do it by printing shades of gray on a disk, and I would use the light sensor to get a sense of how the wheel is turning (you'd print the shades of gray as small "pies" on the disk).
If you also want to measure direction, you'll need 2 wheels.
You'll always experience drift with a system like that (especially as your robot turns), as the error keeps on building on any turn.
You need to avoid as many slips of the wheels as possible, meaning that you need the free wheels to be as close as possible to the actual motor wheels. You'll also have to find a system which can apply some pressure on the free wheels (a rubber band could work). If your robot is meant to drive on non flat surfaces, you'll also need some mechanical flexibility to make sure that the free wheels are always in contact with the ground.
gudy
New User
 
Posts: 2
Joined: Wed Jun 17, 2009 2:52 am

Postby bbagnall » Wed Jun 17, 2009 5:58 pm

Anyone interested in trying SLAM should take a look at the lejos.localization package first (programmed by Lawrie Griffiths), which performs Monte Carlo localization quite well:
http://lejos.sourceforge.net/nxt/nxj/api/index.html

We're hoping to implement SLAM at some point in the future, based on the algorithms in the book Probabilistic Robotics by Sebastian Thrun. But don't let that stop anyone from trying out SLAM on their own. If someone makes some good progress in this area we could implement your code into the leJOS project.

http://www.amazon.com/exec/obidos/ASIN/0262201623/lejos0e-20
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm


Return to NXJ Hardware

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff