Home

Main Menu

Who's Online

We have 20 guests and 7 members online
  • Robotactor
  • JavaRN
  • i-Bot
  • joao.silva
  • SoBot
  • Kelpy
  • nunogato

Login Form






Lost Password?
No account yet? Register

Find us on Facebook

Welcome ( Log in )
Bioloid and Matlab Simulink
Goto page 1, 2  Next
 
Post new topic   Reply to topic    RoboSavvy Forum Forum Index -> Bioloid & Robotis
View previous topic :: View next topic  
Author Message
limor
Savvy Roboteer
Savvy Roboteer


Joined: 11 Oct 2004
Posts: 1295
Location: London, UK

PostPosted: Fri Jul 13, 2007 7:39 pm    Post subject: Bioloid and Matlab Simulink Reply with quote

In case you missed the announcement:

http://robosavvy.com/forum/viewtopic.php?t=1514


Pedro (rustyarmor) is putting together a summary of some of the work done at IST humanoid robot lab (in cooperation with RoboSavvy Smile.
http://humanoids.dem.ist.utl.pt
Please feel free to post any questions on this forum.

The lab is looking for Masters students for next year to research humanoid robot control. Erasmus students from other EC member states are welcome. So if you know someone who is a fan of wind/kite surfing and a roboteer in 3rd-4th year mechanical/Electrical engineering.. Lisbon's IST humanoid robotics lab should be a fun place to spend the next year.

The site (which may eventually be updated an maintained here at RoboSavvy for posterity) will include:

1) Full in-depth identification of all mechanical parts of the Bioloid including a very precise 3D model.

2) Matlab Simulink linked with Sim-Mechanics for precise offline simulation and visualization.

3) Matlab Simulink Real-time-windows target (*) serial driver implementing a proprietary simple protocol with the CM5 for control-loop (PC sends speed controls to Bioloid servos, Bioloid responds with current servo positions.)

4) Matlab Simulink EZPhysics target - to test the control loop algorithm to a physics enabled simulation of Bioloid

5) Matlab Simulink Gumstix target - to dump the control loop algorithm to a Gumstix for on-board control of the Bioloid. The gumstix will connect to the Bioloid bus using the RoboStix daughter board.



(*) RTWT - is a way to run the control loop algorithm on a Windows PC in real-time. The algorithm real-time higer priority than the Windows O/S and hence runs with a real-time clock. The disadvantage is that there are hardly any I/O drivers supported in this mode. A serial driver had to be written in order to communicate with the CM5.
Back to top
View user's profile Send private message   MSN Messenger
Biodog
Robot Builder
Robot Builder


Joined: 14 Mar 2007
Posts: 17

PostPosted: Mon Jul 16, 2007 2:14 pm    Post subject: Reply with quote

I fit can help I may give you my SolidWorks 2005 parts model (I know Rustyarmor gave a full modelisation, but I couldn't use it), knowing the fact that it's my first experience in SW so there might be mistakes/approximations.
I'm actually in Master in France and I'd be quite interested to go to Lisbon (even if I don't speak portuguese!) but it's too late, I've signed for my M2 this morning Razz by the way, I'll look forward your progress!
Back to top
View user's profile Send private message  
srobot
Savvy Roboteer
Savvy Roboteer


Joined: 10 Dec 2006
Posts: 397
Location: Deep in robot parts

PostPosted: Wed Jul 18, 2007 9:27 pm    Post subject: Reply with quote

Lovely!

What software are you using?

Is that

1 Screen) Sim

2 Screen) Graph

3 Screen) Background

I'd love any links you may have to software.

--srobot
_________________
Dell Latitude D520, Windows XP, 4 GB RAM, 80 GB HDD, Intel Core 2 Duo. The power that's needed!

RIBO Labs, Springing Robotic Development to a New Level
Back to top
View user's profile Send private message   Visit poster's website
Dimitris
Savvy Roboteer
Savvy Roboteer


Joined: 29 Jun 2006
Posts: 49
Location: Greece or UK

PostPosted: Thu Jan 17, 2008 12:24 am    Post subject: Reply with quote

Hi,

Has anyone tried to run this matlab interface? I followed all the steps and I'm oonly stuck at the end when building the simulink model Sad

Error ../PC_code.c: 110 undeclared identifier `t'
Warning ../PC_code.c: 110 Statement has no effect
Error ../PC_code.c: 110 syntax error; found `counter' expecting `;'
Warning ../PC_code.c: 109 possible usage of t before definition
Warning ../PC_code.c: 137 unreachable code

Initially I got the above error, which seemed to be due to a random 't' at the end of a loop, which must have been a typo. So I remove it and re-build and end up with this error:

pc_code.obj .text: undefined reference to '_outp'
pc_code.obj .text: undefined reference to '_inp'
gmake: *** [../diagram.exe] Error 0x10
gmake: *** Deleting file `../diagram.exe'
### Real-Time Workshop build procedure for model: 'diagram' aborted due to an error.

... and the error message dialog gives:

Error using ==> RTW.genMakefileAndBuild

Sad

Anyone any ideas???
_________________
Sign Language Glove
-====-
Homepage
Back to top
View user's profile Send private message [ Hidden ] Visit poster's website MSN Messenger
Dimitris
Savvy Roboteer
Savvy Roboteer


Joined: 29 Jun 2006
Posts: 49
Location: Greece or UK

PostPosted: Thu Jan 17, 2008 2:31 am    Post subject: Reply with quote

--
_________________
Sign Language Glove
-====-
Homepage


Last edited by Dimitris on Sat Jan 19, 2008 5:26 am; edited 2 times in total
Back to top
View user's profile Send private message [ Hidden ] Visit poster's website MSN Messenger
limor
Savvy Roboteer
Savvy Roboteer


Joined: 11 Oct 2004
Posts: 1295
Location: London, UK

PostPosted: Fri Jan 18, 2008 12:09 am    Post subject: Reply with quote

Hi Dimitris,

I will ask Pedro to respond to your query.
Back to top
View user's profile Send private message   MSN Messenger
rustyarmor
Robot Builder
Robot Builder


Joined: 20 Oct 2006
Posts: 19

PostPosted: Sat Jan 19, 2008 1:28 am    Post subject: Reply with quote

Hi Dimitris,

The code should work. The tutorial has been tested successfully, so no reasons to worry, you will have matlab controlling the servo.

For what you say, the problem seems to be inside the PC_code.c. Copy again all the code and verify that matlab doesn't split lines. The code has been tested and it really should work. Wink

If, after doing this, the problem maintains, try to use then, the original PC_code.c . See the following file:
http://robosavvy.com/site/Builders/rustyarmor/Application.rar Very Happy

Pedro
Back to top
View user's profile Send private message  
Dimitris
Savvy Roboteer
Savvy Roboteer


Joined: 29 Jun 2006
Posts: 49
Location: Greece or UK

PostPosted: Sat Jan 19, 2008 5:42 am    Post subject: Reply with quote

Hi,

Thanks for the code! I spotted a small difference in the code you gave me, which has a 'mux1' instead of a 'mux' simulink block, but I don't think that has any significance. Anyway I used the downloaded diagram and it built successfully!
I also noticed that the CM5 code chose servo id as 16 instead of 1, but in both cases what I got as a scope output was unfortunately a servo position (violet line) which did not follow the input but just stayed fixed at 65535
:S
_________________
Sign Language Glove
-====-
Homepage
Back to top
View user's profile Send private message [ Hidden ] Visit poster's website MSN Messenger
rustyarmor
Robot Builder
Robot Builder


Joined: 20 Oct 2006
Posts: 19

PostPosted: Sat Jan 19, 2008 12:45 pm    Post subject: Reply with quote

Hi Dimitris,

mux1 or mux are just names for the block. So don’t worry about their names.

In order to work it is necessary only to change the id of the servo that you are using in the mcu code.

Code:

/**************************************
  *         code to be inserted        *
  **************************************/
 
  //servo to be used
  bID = 1;


65535 as the step response means that it has occurred an error in reading the servo. Therefore try to redo this:

Before testing the application, verify if the CM5 is plugged to the PC and if it is OFF.
Then, attach your servo to the CM5.
Finally, turn on the CM5 and then press the play button.

If everything went right you must see something similar to the next graph. The initial position of the servo is in 800 encoders (violet line) and it can be seen its response to a step (yellow line).


The reason you only see the violet line, is because it is a constant value at 65535 which is much higher than 800 (the step value). To see the step zoom it.

Hope it helps, Wink

Pedro
Back to top
View user's profile Send private message  
Dimitris
Savvy Roboteer
Savvy Roboteer


Joined: 29 Jun 2006
Posts: 49
Location: Greece or UK

PostPosted: Sat Jan 19, 2008 6:00 pm    Post subject: Reply with quote

Hi,
This is the code I'm currently using.
http://robosavvy.com/Builders/Dimitris/Application.zip

It's the code you recommended downloading, I've changed servo ID to 1, rebuilt everything and also made sure that my servo has id 01 and is working properly. I downloaded the code to the cm5 and made sure I disconnected after.
I also made sure cm5 was off and plugged in to pc (why is this?) while attaching servo. Also had disconnected all other servos. Then I turned on the cm5 power. Next before pressing play on the simulink I have to click 'Connect to target' button right next to 'play' before this becomes enabled. Then I can see the step (yellow line) but the servo response remains at 65535.
_________________
Sign Language Glove
-====-
Homepage
Back to top
View user's profile Send private message [ Hidden ] Visit poster's website MSN Messenger
rustyarmor
Robot Builder
Robot Builder


Joined: 20 Oct 2006
Posts: 19

PostPosted: Sat Jan 19, 2008 6:19 pm    Post subject: Reply with quote

Hi,

Did the servo reacts, moves to any direction?
Back to top
View user's profile Send private message  
Dimitris
Savvy Roboteer
Savvy Roboteer


Joined: 29 Jun 2006
Posts: 49
Location: Greece or UK

PostPosted: Sat Jan 19, 2008 6:35 pm    Post subject: Reply with quote

No movement at all! but led flashes when cm5 is turned on. Plus I just tested that the servo works fine with other programs. And its Id is definitely 01.
_________________
Sign Language Glove
-====-
Homepage
Back to top
View user's profile Send private message [ Hidden ] Visit poster's website MSN Messenger
rustyarmor
Robot Builder
Robot Builder


Joined: 20 Oct 2006
Posts: 19

PostPosted: Sat Jan 19, 2008 7:13 pm    Post subject: Reply with quote

Hi Dimitris,

Try with servo 18. (Change the mcu code)

and try this:
1 disconect the com after changing the mcu code.
2 turn off cm5 and plug the servo 18.
3 in simulink press Incremental build button to build the model and wait until the play button becomes enable
4 turn on cm5
5 press the play button

The error maintains, no servo response??
Back to top
View user's profile Send private message  
Dimitris
Savvy Roboteer
Savvy Roboteer


Joined: 29 Jun 2006
Posts: 49
Location: Greece or UK

PostPosted: Sat Jan 19, 2008 7:54 pm    Post subject: Reply with quote

yeah, same results. But the play button is not enabled immediately after the incremental build, as I first have to click 'connect to target'. I'm using 'external' simulation mode as in the tutorial.
_________________
Sign Language Glove
-====-
Homepage
Back to top
View user's profile Send private message [ Hidden ] Visit poster's website MSN Messenger
rustyarmor
Robot Builder
Robot Builder


Joined: 20 Oct 2006
Posts: 19

PostPosted: Tue Jan 22, 2008 3:39 pm    Post subject: Reply with quote

Hi Dimitris,

Try this one

http://robosavvy.com/Builders/rustyarmor/Application_r.rar

Try also change the sample time to 0.02s

Hope it helps

Pedro
Back to top
View user's profile Send private message  
Display posts from previous:   
Post new topic   Reply to topic    RoboSavvy Forum Forum Index -> Bioloid & Robotis All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Robonova Humanoid Bioloid Comprehensive Kit Robobuilder 5710K Humanoid Robobuilder 5720T Humanoid MechRC ShadowStalker KHR 1 HV and KHR 2 HV Humanoids KHR 3HV Humanoid Kit
Robonova-I
Intro | Forum | Buy
Bioloid
Intro | Forum | Buy
Robobuilder 5710K
Intro | Forum | Buy
Robobuilder 5720T
Intro | Forum | Buy
MechRC
Intro | Forum | Buy
KHR 1HV & 2HV
1HV 2HV | Forum | Buy
KHR 3HV
Intro | Forum | Buy
POBbot Wheeled Platforms (POB) POPbot Arduino Wheeled Robot Microcamp Atmega8 Activity / Introductory Kit Robobox 3 Educational Robot Kit Robotis OLLO - Starter Robotics Kits Sparkfun Products Roboard X86 Embedded Robot Board
Edu Robots
Intro | Buy
Arduino Robot
Intro | Buy
Cheap Robot
Intro | Buy
Wheeled Robot
Intro | Buy
Kids Robots
Intro | Buy
Sparkfun Electronics
Buy
x86 Robot Board
Intro | Forum | Buy



Powered by phpBB ©

In Our Store

 

SparkFun - Triple-Axis Digital-Output Gyroscope - ITG-3200
£19.61   £23.04 inc. VAT
 

GoogleSearch

Google
robosavvy.com
Web


© 2010 RoboSavvy
All rights reserved. Privacy Policy.