找回密码
 马上注册

QQ登录

只需一步,快速开始

查看: 20652|回复: 18

魔方机器人

  [复制链接]
发表于 2009-7-27 10:27:54 | 显示全部楼层 |阅读模式
按照http://tiltedtwister.com/ 的图纸搭建了一个魔方机器人,试着运行了一下,运行基本正常,就是解出来的结果不对,我用的是光电传感器,回到网站仔细一看,原来还有这么多的注意事项,贴出来供大家一起参考。对于你的魔方是不是符合条件,里面有测试程序,我测了一下我的cube,是解决不了的,只能自己粘贴色彩了。据说色彩传感器就没有这么多的麻烦!

   顺便把程序包也传上来了!


   http://tiltedtwister.com/download/tiltedtwister.pdf
Tilted Twister - Instructions

http://tiltedtwister.com

Getting started

Read all of this page.
Run the calibration program.
Run the tiltedtwister program. Youshould use an unscrambled cube the first time you run the program. Theprogram should calculate a solution of zero moves. If not, abort theprogram and adjust what needs to be adjusted.
Scramble the cube and let Tilted Twister solve it.

Building instructions
Cut out a piece of thin cardboard 70 x 70 mm and cut out the corners 8 x 15 mm.
Placeit on the turntable so that the cube rests on a flat surface. It'simportant that the cube slides easily on the surface when tilted.

Connect the wiring as follows:
1 - Touch sensor
2 - Light sensor or HiTechnic color sensor
3 - Ultrasonic sensor
A - Turntable motor
B - Tilter arm motor
C - Light/color sensor motor


Rubik's cube
Unfortunately the yellow and the white colors of a standard Rubik's cube gives the same readings from the light sensor.
Ifyou don't have a color sensor you have to replace some of the colors ofthe cube. Cubesmith.com has replacement stickers in all sorts of colors.
Onmy cube, I have replaced yellow with flourescent yellow, blue withlight blue and orange with gold mylar, I have also replaced the whiterubik's cube logo sticker with a plain white sticker.
You could try using other colors as long as the light sensor readings differentiates.
Use the colortest program to try out different colors. Use the cube tester program to verify a cube.
If you do have a HiTechnic color sensor you don't have to replace any stickers at all.


Important
The position of the light/colorsensor is crucial. If it's too close to the cube's surface the readingsmay be inaccurate. It is possible to adjust the height position of thesensor by gently bending up the sensor arm. It should be approx 3mmabove the top of the cube.
The gap of the grabber must not be too tight around the cube. Otherwise it will drag the cube back with it.
If your cube is stiff, you could lubricate it with silicone spray. After lubrication you must work the cube for a few minutes.
Make sure the turntable is aligned before starting the program.
Make sure the tilter arm is fully retracted before starting the program.
Avoid having a strong light source right above the robot.

Calibration
Before you let the robot solve ascrambled cube you should calibrate it. The calibrate programcalibrates the position of the scanner arm. If you are using theHiTechnic color sensor, it also calibrates the values of the colors ofyour cube (and so the cube must be unscrambled when running thecalibrate program).
Run the calibrate program and read theinstructions on the NXT-display. When the program asks you to positionthe sensor above center of cube, you should turn it so that theemitting light hits the center piece of the top of the cube. Tip: Dimthe lights of the room to better see where the light from the sensorhits the cube.


Cube tester (only for use with light sensor)
Run this program to check if the colors of a cube can be sorted out using the light sensor.
Placean unscrambled cube on the turntable. The robot scans the faces of thecube. It then displays the minimum and maximum light sensor values ofthe colors for each cube face and tells whether the cube is qualifiedor not.
If the color ranges overlaps the program says the cube isnot OK. But if the overlap is small it might work anyway because of thecolor resolve algorithm of the tiltedtwister program.


Color tester (only for use with light sensor)
This program shows the current light sensor value. Use it to try out your own set of colors.

HiTechnic Color sensor
Requires LEGO MINDSTORMS NXT Firmware v1.05 or later.
See separate buildings instructions for the sensor arm with color sensor.


Downloading programs to the brick
Unzip the download-zip to a new directory.
The files with extension .rxe are executables which should be downloadable to the brick using the lego mindstorms software:
- Create a new project (File/New)
- Press the button "NXT window"
- Select the Memory tab
- Press the download button

The files with extension .rso are sound files and should be downloadable the same way as rxe-files.
The size of the tiltedtwister program is quite big. If you are having problems when downloading tiltedtwister.rxe try the following:
- Delete other program files and sound files etc to make room.
-Update the NXT Firmware. I'm using NXT Firmware 1.05 on my brick. Youcan download and install firmware from the LEGO Mindstorms NXT software.
- Defragment the NXT filesystem. (Bricx Command Center/NXT Explorer/Defragment)


Source code
The files with extension .nxc can be edited and compiled using BricxCC (http://bricxcc.sourceforge.net).

Troubleshooting
Watch the NXT-display as it scansthe faces. When using the light sensor it displays the light value of.If you are using the color sensor it displays three values for eachscan. It's the rgb-values of the color reading.
When it has scanned all the faces it resolves the colors. The screen says "Resolving colors".
Then it calculates three solutions.
For each solution it makes a ticking sound with increasing pitch. This should take some ten seconds.

After that it starts executing the solution showing the number of remaining twists on the display.
If it fails reading the colors, one of the following things will happen:
- When calculating a solution it never stops. It keeps ticking with higher and higher pitch.
- It stops ticking and nothing happens.
- It manages to calculate a solution. But it's not the correct solution because it has resolved the colors incorrectly.



Have fun!

tiltedtwister.zip

52.15 KB, 下载次数: 475

如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
 楼主| 发表于 2009-7-27 10:31:19 | 显示全部楼层
顺便说明一下,这个程序比较大,有50多k,需要把其他的程序都删掉,还有一些声音图像文件。用
NXT来download,我用bricxcc 来download不成功。
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2009-7-27 11:56:44 | 显示全部楼层
看不懂啊?楼主看懂了吗!?简单介绍一下嘛!大家谁懂得,介绍一下。。
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2009-7-27 12:45:24 | 显示全部楼层
看不懂可以google翻译嘛,告诉楼主应该怎么使用,把里面的tiltedtwister.nxc文件用bbc打开,编译下载就可以了,不过这个机器人对传感器或魔方有要求的,要嘛是颜色传感器,要嘛你魔方表面贴纸,还有,得用点润滑油
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

 楼主| 发表于 2009-7-28 18:34:58 | 显示全部楼层
本帖最后由 wangdi 于 2009-7-28 18:37 编辑

那就简单介绍一下,纯属拿鸭子上架。
Tilted Twister - Instructions
      使用说明
    http://tiltedtwister.com

    Getting started
     开始
    Read all of this page.
     阅读本页
    Run the calibration program.
     运行校验程序,主要是调整光电传感器或者颜色传感器位置的,根据机器人提示做(把传感器移到魔方的中间位置)
    Run the tiltedtwister program. You should use an unscrambled cube the first time you run the program. The program should calculate a solution of zero moves. If not, abort the program and adjust what needs to be adjusted.
    运行tiltedtwister,第一次运行时,你最好用一个整理好的魔方,程序运算后应该给出一个零次移动的方案。如果不是,请终止程序,找出需要调整的地方并调整。
    Scramble the cube and let Tilted Twister solve it.
     调整好后,打乱魔方,让程序去解决它。
     

    Building instructions
     搭建说明
    Cut out a piece of thin cardboard 70 x 70 mm and cut out the     剪一块70*70毫米的薄硬板,并且把角剪去8*15毫米。
corners 8 x 15 mm.
    Place it on the turntable so that the cube rests on a flat     把它铺在转盘上,减小摩擦,让魔方在上面更容易的翻转,这是非常重要的。
surface. It's important that the cube slides easily on the surface when tilted.

    Connect the wiring as follows:
    连线说明如下:
    1 - Touch sensor  
    2 - Light sensor or HiTechnic color sensor
    3 - Ultrasonic sensor
    A - Turntable motor
    B - Tilter arm motor
    C - Light/color sensor motor

     

    Rubik's cube

    Unfortunately the yellow and the white colors of a standard Rubik's cube gives the same readings from the light sensor.
    不幸的是,标准的Rubik's 魔方黄色和白色在光电传感器下读到的值是相近的,无法分辨。   
If you don't have a color sensor you have to replace some of the colors of the cube. Cubesmith.com has replacement stickers in all sorts of colors.
如果你没有颜色传感器,你需要替换掉相近颜色的魔方贴纸,这个网站Cubesmith.com有各式各样颜色的贴纸。
    On my cube, I have replaced yellow with flourescent yellow, blue with light blue and orange with gold mylar, I have also replaced the white rubik's cube logo sticker with a plain white sticker.
    对于我的魔方,是用荧光黄色替代黄色,亮蓝色代替蓝色,橙色用金,我还把白色换成了存白色。
    You could try using other colors as long as the light sensor readings differentiates.
你可以试着用光电传感器读到不同颜色的贴纸来替代。
    Use the colortest program to try out different colors. Use the cube tester program to verify a cube.
你可以用colortest程序测出不同的颜色值,来校验你的魔方。
    If you do have a HiTechnic color sensor you don't have to replace any stickers at all.
    如果你有色彩传感器,你不用替换任何贴纸。
     

    Important
     注意:
    The position of the light/color sensor is crucial. If it's too close to the cube's surface the readings may be inaccurate. It is possible to adjust the height position of the sensor by gently bending up the sensor arm. It should be approx 3mm above the top of the cube.
    光电或者颜色传感器的位置是至关重要的,如果他们太靠近魔方表面,那么读到的值将不准确。你可以轻轻的调整传感器臂,使他达到合适的位置,一般是在魔方上方3毫米处即可。
    The gap of the grabber must not be too tight around the cube. Otherwise it will drag the cube back with it.
    翻转臂不能够太紧,否则会把魔方带出转盘去。
    If your cube is stiff, you could lubricate it with silicone spray. After lubrication you must work the cube for a few minutes.
    如果你的魔方很紧,很不容易翻转,移动,需要涂一下润滑油,涂完润滑油记得先手工活动几分钟。
    Make sure the turntable is aligned before starting the program.
    确认能够移动,并且都是对齐的才开始程序。
    Make sure the tilter arm is fully retracted before starting the program.
    在运行程序之前,确认翻转臂是可以伸缩自如的。
    Avoid having a strong light source right above the robot.
    切忌在机器人上方有强光源。

  下面是介绍几个测试和校验程序,就不做说明了。

评分

参与人数 1宣传 +10 收起 理由
糖伯虎 + 10 翻译辛苦了,奖励一下

查看全部评分

如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2009-8-5 14:26:38 | 显示全部楼层
感谢了,正需要这个呢
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2009-11-2 11:32:24 | 显示全部楼层
非常感谢!谢谢各位高手的无私分享!
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2010-5-3 11:22:57 | 显示全部楼层
很想试试看。
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2010-5-3 13:33:49 | 显示全部楼层
要学的太多了。先收藏了
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2010-9-6 22:52:09 | 显示全部楼层
谢谢分享!
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2010-11-6 21:38:16 | 显示全部楼层
回复 wangdi 的帖子

xiexie
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2011-1-24 12:40:16 | 显示全部楼层
谢谢,请问这是哪款lego?
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2011-1-24 13:30:46 | 显示全部楼层
谢谢楼主、五楼的无私奉献!
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2011-2-10 11:54:31 | 显示全部楼层
这个太好了, 我正在找这个呢, 谢谢楼主分享
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2011-11-8 14:26:28 | 显示全部楼层
现在遇到了问题,在论坛到处找解决方案,找不到再求助各位高手了。
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

手机版|中文乐高 ( 桂ICP备13001575号-7 )

GMT+8, 2024-12-22 20:40 , Processed in 0.256608 second(s), 23 queries .

Powered by Discuz! X3.5

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表