Author Topic: my first hexapod project: bioloid spider king in C++. help needed!  (Read 3302 times)

0 Members and 1 Guest are viewing this topic.

Offline animaniacTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
hi roboteers, first of all I am quite good at math and physics, but I did very little programming in my life. I plan to build a gamepad controlled hexapod and post regular updates with code. actually, I don't even know how to create a new project, I just modified one of the examples from the dynamixel sdk!

however, progress is going well and I managed to control one leg (or any leg if there are many) with inverse kinematics. I created a function that moves a given leg to a given position in a given time. my next goal is to control the position in real time: continuously move left if I keep a key pressed, same for right, up, etc... I tried to do it this way:

key pressed -> increment leg tip position 1mm -> check moving done -> move leg -> loop

it doesn't work well since the leg stops after each increment, is there a "proper" way to do it in robotics? I tried to look it up, but programming oriented tutorials on robotics are scarce.

I hope there are bioloid enthusiasts, I have tons of questions: how to start a new project in visual C++, reference books, making an interface in excel etc...

thanks!

Offline klims

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Re: my first hexapod project: bioloid spider king in C++. help needed!
« Reply #1 on: October 19, 2011, 12:00:06 AM »
it doesn't work well since the leg stops after each increment, is there a "proper" way to do it in robotics?
I don't know if there is a proper way to do it, but I would think about reducing the increment level when the button is held down to allow for smoother motion. Eg: if a button press and release has been registered within 0.5 seconds move 1mm, however if not move 0.1mm until the button has been released. Another idea might be to set the position to 10mm, or something larger(maybe even max?) and stop the motion where it is when the button is released.

Good luck!

Offline animaniacTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: my first hexapod project: bioloid spider king in C++. help needed!
« Reply #2 on: October 19, 2011, 11:00:24 AM »
thanks, actually I'm just trying to understand the basic principles of real time control: robot books focus mostly on assembly and kinematics, and I couldn't find books on robot programming about this. I already improved my code by replacing the moving check by a pause equal to the time needed for moving the leg: this way when the function for moving the leg is looped, it computes the IK angles and sends them right when the leg stops moving. it's still not perfect, so I think I'll replace it with a timer. I am experimenting with functions gettickcount, queryperformance etc...

Offline animaniacTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: my first hexapod project: bioloid spider king in C++. help needed!
« Reply #3 on: November 13, 2011, 07:13:05 AM »
It's alive! ALIVE!

http://www.youtube.com/watch?v=QAdo9RNeOUo#ws

my idea is to build and control the second set of legs the same way as this one, and control each set with behaviors (legs on ground, legs up, legs limit reached...), do you have any advice/ resource for programming parallel events and behaviors? is there a software with a graphic interface, to organize short programs along a tree?

 


Get Your Ad Here