PDA

View Full Version : My Phidgets servo control



Semicton
04-10-2008, 12:13 PM
Hello, I've built the SES, and the Lynx 6 robotic arms and I've been working mostly on a custom drawn user control using C# and GDI+. I think it is much nicer looking and more functional than a standard track bar for control.

My video shows me using the control that I added to a form. I wired up some events to stop the movement and continue onto the next position depending on a touch sensor value. This particular video is controlling the gripper on my SES robotic arm. The red circles are sliders to create minimum and maximum positions for the servo, but I forgot to change them for this video.

I'm getting ready to share the source code for this control, and hopefully create a more pleasant experience for people new to programming or using Phidgets. Next, I have to get my arm to actually do something hehe.

Any comments or suggestions very much appreciated!


http://www.youtube.com/watch?v=8wpU8_Gln2c

Droid Works
04-10-2008, 06:43 PM
Awesome work! And great page. Do you mind if I add a link to your page in the PC Robotics section of my web site?

Semicton
04-10-2008, 07:43 PM
Thanks Droid Works! Please add a link to my page in your PC Robotics section of your website. Thats cool! and thanks for doing so when you do! It's been a lonely journey learning programming and robotics and I would love to participate and chat with great people like you and everyone else here and in the robotics community.

I'm still working out some bad logic in the sensor change events of my small project. But as soon as I do, I want to share it with others.

Thanks!

Matt
04-10-2008, 09:26 PM
Um, WOW. I'm knocked over by this. I'll be emailing you to talk about some things ;)

Adrenalynn
04-10-2008, 09:49 PM
Hey Husko,

This is nice work on the GUI. Very useful and attractive!

I'm working on forward/inverse kinematics the next couple weekends. I don't do UI - and I tend to shy away from C#. But it seems to me that maybe we should chat about an opensource project to replace RIOS? I plan on working on something more embeddable and reliable. Maybe Pocket PC, maybe straight to an embedded processor, regardless, I intend to keep the kinematics library clean, portable, and open. My background is largely in algorithm design...

Alex
04-11-2008, 11:39 AM
I'm still working out some bad logic in the sensor change events of my small project.

If you need some help with this, don't hesitate to post in the software and programming forums (http://forums.trossenrobotics.com/forumdisplay.php?f=21). I can certainly offer my "expertise"; C# is my language of choice:D

Semicton
04-16-2008, 12:48 AM
Thanks everyone.

Alex, I'm not sure If I should be posting this in the Programming/Software forums or here in the Projects forum.

My logic problem isn't exactly with the control itself. It's with relation to a sensor value that doesn't change how I expected. I need a lot of work on my robotics skills :(

For example my my gripper with a sensor can grip something and create a value of, let's say, 400. I can release the sensor but the value doesn't always drop exactly as expected because of the way the object was gripped, and I think the foam density is part of the problem as well. But as you pointed out, the programming/Software forum will be a great place for me to ask questions about that, and will do so for sure, and keep my ramblings of my project here hehe :)

For my post here in the Project forum:

I've been playing around at home and added a main sensor property to the servo control to get rid of an independent progress bar. It's basically a progress bar that runs along the length of the servo arm position height lighted in yellow. I also added visual feedback of the servos sensor by creating a red hint to the control bar and the position bar, as well as the servo disk, but I'm not sure that is a good idea. btw, for this demo, I was manually pressing on the touch sensor.

I'm displaying the values of the selected position and the sensor position in the center of the control.

After viewing the video I made of the features in this control, I realised 5 things and questioned 1:

Realizations:

I need to align sensor and servo values to the center.
I need to update and display the user input value. (This might not be immediately apparent in this video because I am only clicking on the control arm. I am not dragging it. Sorry, I was in a hurry while making the video.)
I need to display the position of the actual servo value in the center.
I need to separate the values with horizontal lines.
I need stop with all the colors :P


Questions:

Does a servo control need a sensor progress bar?




http://www.youtube.com/watch?v=64kbSE3JUR0

edeetjen
04-16-2008, 12:39 PM
I'm pretty new to this whole robotics game so just by looking at the GUI I'm unsure what program laguage you were using. Currently I'm doing a school project to make a semi-automated boat. I've done most of the programing in C++ which is my preffered language. The device I was given to use as a sensor for depth and distance only has sample code in PBasic. It's from Parallax.com. Does anyone have experience in these coding that could help. It would be much appreciated.

Thanks,
Eric

Adrenalynn
04-16-2008, 01:26 PM
He was using .NET and C# with the GDI+ extensions.

If you know C++ you could pick up .NET with C# in a matter of minutes.

edeetjen
04-16-2008, 01:33 PM
I'm not sure how to make PBasic code work the an phidget IFK because I believe the IFK only takes C.

Adrenalynn
04-16-2008, 01:37 PM
I'm not sure I understand the question. Phidgets generally have multi-language libraries.

If you code in C++ the point is that you'll be able to quickly learn C# and that opens a lot of the microsoft world up to you.