PDA

View Full Version : [Project] ROS Hexapod project Golem: MX-64 4dof



KevinO
02-23-2014, 12:36 PM
Gait test of my next project named Golem. My primary goal for the project is to learn ROS (www.ros.org (http://www.ros.org)) so I designed this platform to keep it interesting. Golem is roughly 2.5 feet (76.2 cm) in diameter and weighs 16 pounds (7.3 Kg). His body is T6 Aluminum with parts powder coated white gloss for a bit of flair. In regards to servos, the legs are MX-64s and the turret is a MX-28. The camera system isn't ready so it isn't attached at this time. It has an onboard Intel NUC D54250 motherboard that consists of a Intel 4th Gen i5 processor 8 Gig of RAM and a 120 Gig SSD. It also has a gyroscope, accelerometer and compass for bearing and orientation aide. Manual control is done by a Sony Playstation 3 controller paired to the onboard Bluetooth. It's power supply is a 6000 mAh military spec lipo battery. Much more to come but I thought I would share my current progress. I'd like to note my development of this project is in partnership with Interbotix Labs. Special thanks to Andrew for allowing me to use design elements from his Envy quad project.


http://www.youtube.com/watch?v=jfAEUkANyaA


53855386538753885389

Here is a list of the primary parts I used.

T6 aluminium parts, powder coated gloss white
www.emachineshop.com (http://www.emachineshop.com)

Dynamixel MX-64T Robot Actuator Bulk (6 pack) (x4)
http://www.trossenrobotics.com/p/mx-64T-dynamixel-actuator-6-pack.aspx

Dynamixel MX-28T
http://www.trossenrobotics.com/dynamixel-mx-28-robot-actuator.aspx

2.4GHz Dipole Swivel Antenna with RP-SMA - 5dBi (x2)
http://www.adafruit.com/products/945

RP-SMA to uFL/u.FL/IPX/IPEX RF Adapter Cable (x2)
http://www.adafruit.com/products/852

6000mAh 3-CELL/3S3P 11.1V PRO LITE MS LIPO
http://www.thunderpowerrc.com/Products/6000-mAh_2/TP6000-3S3PL

Intel NUC Core i5-4250U NUC BOXD54250WYK
http://www.intel.com/content/www/us/en/nuc/nuc-kit-d54250wyk.html

Crucial 8GB Kit (4GBx2) DDR3 1600
http://www.amazon.com/gp/product/B005LDLVAO/ref=oh_details_o02_s00_i00?ie=UTF8&psc=1

Intel Network 6235AN.HMWWB Centrino WiFi Card Half Mini PCI Express Advanced-N 6235 Dual Band Bluetooth
http://www.amazon.com/gp/product/B007QXLIWI/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1

Intel 525 Series Solid State Drive 120GB
http://www.amazon.com/gp/product/B00B5336PM/ref=oh_details_o01_s00_i00?ie=UTF8&psc=1

DC/DC 3.5-30V to 4.0-30V Booster Converter Step Up Voltage Regulator LM2587
http://www.amazon.com/gp/product/B008FLE7PA/ref=oh_details_o01_s00_i00?ie=UTF8&psc=1

X-Mini II XAM4-B Portable Capsule Speaker
http://www.amazon.com/X-Mini-XAM14-GM-Portable-Capsule-Speaker/dp/B00A0JUO48/ref=dp_ob_title_ce

Xevel's USB2AX (yes it works great for MX-64s!)
http://www.seeedstudio.com/depot/USB2AX-p-1349.html

PhidgetSpatial Precision 3/3/3 High Resolution
http://www.phidgets.com/products.php?category=5&product_id=1044_0

I'm also running Ubuntu 13.04 on the NUC

KurtEck
02-23-2014, 02:11 PM
Great looking setup and video!

My guess is that with those servos you need to be very careful where you put your fingers ;)

Kurt

KevinO
02-23-2014, 02:34 PM
I have been pinched once Kurt. They sure do have some torque! :)

jwatte
02-23-2014, 06:05 PM
Looks massive! I, too, like the T6 aluminum for brackets. Although mine's only 3DOF, and 4 legs ;-)

Th232
02-23-2014, 06:24 PM
Looking good, especially the aesthetics.

How are the tarsus servos holding up in terms of power/heat?

KevinO
02-23-2014, 11:02 PM
Th232 I've noticed no temperature change to touch after five minutes of walking around but more tests are needed. Power was solid with no drop but then again five minutes isn't that long. :)

Zenta
02-24-2014, 12:29 AM
Awesome project Kevin, looks great and big!
Looking forward to see what you are able to do with a walking PC..:p

How are you solving the movements for the tars part, mostly perpendicular to the ground?

KevinO
02-24-2014, 11:19 AM
How are you solving the movements for the tars part, mostly perpendicular to the ground?

Nothing as fancy as you did on your THex. It's just foot height offset by tarsus length, and the angle is femurAngle - tibiaAngle. I'd love to do some transitional angles like you did but I figured I should keep it simple to start. :)

jwatte
02-24-2014, 12:59 PM
How Much money

Here's how I would estimate it: Math says that 24 MX-64s are 4x$1499, or about $6k. Probably need to add another k at least for computer, batteries, brackets, horns, and other hardware. (More if not heavily DIY.)
Kevin says that Interbotix is collaborating on this, which sounds very helpful. I wouldn't know if this is mainly in knowledge, or something else.

KevinO
02-24-2014, 04:22 PM
I'd be happy to do a part list if anyone is curious of everything in it. :)

Th232
02-24-2014, 06:23 PM
I'd be happy to do a part list if anyone is curious of everything in it. :)

Please do, it might make some of us feel better about our own robots.:tongue:

TXBDan
02-25-2014, 01:05 PM
This is awesome. Nice work!

KevinO
02-25-2014, 02:27 PM
Here is a list of the primary parts I used.

T6 aluminium parts, powder coated gloss white
www.emachineshop.com (http://www.emachineshop.com)

Dynamixel MX-64T Robot Actuator Bulk (6 pack) (x4)
http://www.trossenrobotics.com/p/mx-64T-dynamixel-actuator-6-pack.aspx

Dynamixel MX-28T
http://www.trossenrobotics.com/dynamixel-mx-28-robot-actuator.aspx

2.4GHz Dipole Swivel Antenna with RP-SMA - 5dBi (x2)
http://www.adafruit.com/products/945

RP-SMA to uFL/u.FL/IPX/IPEX RF Adapter Cable (x2)
http://www.adafruit.com/products/852

6000mAh 3-CELL/3S3P 11.1V PRO LITE MS LIPO
http://www.thunderpowerrc.com/Products/6000-mAh_2/TP6000-3S3PL

Intel NUC Core i5-4250U NUC BOXD54250WYK
http://www.intel.com/content/www/us/en/nuc/nuc-kit-d54250wyk.html

Crucial 8GB Kit (4GBx2) DDR3 1600
http://www.amazon.com/gp/product/B005LDLVAO/ref=oh_details_o02_s00_i00?ie=UTF8&psc=1

Intel Network 6235AN.HMWWB Centrino WiFi Card Half Mini PCI Express Advanced-N 6235 Dual Band Bluetooth
http://www.amazon.com/gp/product/B007QXLIWI/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1

Intel 525 Series Solid State Drive 120GB
http://www.amazon.com/gp/product/B00B5336PM/ref=oh_details_o01_s00_i00?ie=UTF8&psc=1

DC/DC 3.5-30V to 4.0-30V Booster Converter Step Up Voltage Regulator LM2587
http://www.amazon.com/gp/product/B008FLE7PA/ref=oh_details_o01_s00_i00?ie=UTF8&psc=1

X-Mini II XAM4-B Portable Capsule Speaker
http://www.amazon.com/X-Mini-XAM14-GM-Portable-Capsule-Speaker/dp/B00A0JUO48/ref=dp_ob_title_ce

Xevel's USB2AX (yes it works great for MX-64s!)
http://www.seeedstudio.com/depot/USB2AX-p-1349.html

PhidgetSpatial Precision 3/3/3 High Resolution
http://www.phidgets.com/products.php?category=5&product_id=1044_0


I'm also running Ubuntu 13.04 on the NUC

KevinO
03-15-2014, 12:55 PM
So the camera/head pieces came in on Friday. Here is a picture of the test fit before I move the antenna to the top of the head and add in the camera.

5434

KurtEck
03-16-2014, 07:39 PM
Looks great, which camera are you going to use on this? I assume not the ASUS Xtion?

KevinO
03-16-2014, 08:16 PM
It will have a Point Grey Blackfly gigabit camera. http://www.edmundoptics.com/imaging/cameras/gigabit-ethernet-cameras/point-grey-blackfly-poe-gige-cameras/3619

Although I have a Primesense sensor and a ASUS Xtion I'm torn on using them. OpenNI2 is going away come April unless someone decides to fork and or host it. Although ROS will still support it for the next couple of releases unless the license is changed.

Zenta
03-17-2014, 01:42 AM
Hi Kevin,
Very cool looking head/camera, the whole hex looks great and massive! Is the head both pan and tilt?

KurtEck
03-17-2014, 08:52 AM
Although I have a Primesense sensor and a ASUS Xtion I'm torn on using them. OpenNI2 is going away come April unless someone decides to fork and or host it. Although ROS will still support it for the next couple of releases unless the license is changed.
That is sort-of sad. I did not realize that Apple bought up Primesense and sensors are no longer available and the website will be gone next month...

KevinO
03-17-2014, 12:14 PM
Very cool looking head/camera, the whole hex looks great and massive! Is the head both pan and tilt?

Right now it is just pan. Although it could be easy enough to add a tilt since I'm using the servo hole pattern to mount it to the bracket.

KevinO
03-17-2014, 02:31 PM
That is sort-of sad. I did not realize that Apple bought up Primesense and sensors are no longer available and the website will be gone next month...

It is indeed sad. It was a great sensor for its price point. Plus, openNI was a nice open source project. :( What's worse is the structure io sensor that was funded over on kickstarter uses their components. They have enough to cover their initial product release but will need to find another resource if they want to continue with that product.

KevinO
03-19-2014, 09:41 PM
Lens came today! So now I can start playing with the camera setup.

5442

KurtEck
03-20-2014, 12:36 PM
Nice looking lens!

KevinO
03-21-2014, 12:15 AM
So hardware is pretty much done. Only downside so far is it is too big to fit through normal doorways while walking. :(


5443

Th232
03-21-2014, 12:31 AM
Now that the hardware's done, what's the next step?

With doorways, any chance of being able to lift up the body and bring the feet closer in?

KevinO
03-21-2014, 01:29 AM
Now that the hardware's done, what's the next step?
This is my ROS platform so I'm taking my gait code and wrapping it in a node to use in ROS. There are a few sensors like compass, gyro and accelerometer so need to hook into them as well. I've tested each with stand alone ROS packages so I know they work. Just need to tie them all together.



With doorways, any chance of being able to lift up the body and bring the feet closer in?
Oh totally, it was more of a joke. :)

Xevel
03-21-2014, 05:02 PM
Awesome!

On an aesthetics note though, I prefered the antennas where they used to be instead of on the head ^^
Also I'm not sure about it but aren't antennas supposed to be a little bit farther apart to be happy? It might be for a totally different setting though, I'm not sure at all if it's relevant here or not.

KevinO
03-21-2014, 05:07 PM
One is Bluetooth and the other is wifi. So I should be fine... Should.

I always intended on moving them. I needed the pass through holes for the wires for the camera and such.

tician
03-21-2014, 05:17 PM
'Tis a beautiful, if massive, bot. The tab-and-slot design of the head reminds me of something, and it is really annoying me that I cannot place it. Maybe it is the slight resemblance to a dog's head that is triggering it, but I want to say it is something from a movie.

Are the black structural frames of the legs from Trossen/Robotis, or custom from emachineshop? Since you use flat pieces for all of the white powder-coated parts, I am guessing you used either 6061 or 6063 (T6 is a temper rating) which are usually inexpensive but do not like bending at room temperature.

While I certainly get the appeal of moving the antennae to the head to limit physical/visual interference with the camera, are the coaxial cables rated for that type of repeated flexing? I think I've only seen shielded coaxial cables like that used in 'stuff it into cramped quarters and never move it' or 'little bit of bending with a very large radius' scenarios. Although it tends to be made of small diameter strands, the core of coaxial is usually very low strand count (1 or 7).

DresnerRobotics
03-22-2014, 03:54 PM
Those are our custom MX-64/106 brackets in the legs. I have more designs coming soon with an emphasis on humanoid legs (think Darwin tibias and feet for 106 based humanoids).

I love that the custom brackets look close enough to the stock ROBOTIS ones that people often question it. Exactly what I'd hoped for.

KevinO
03-23-2014, 10:08 PM
Since you use flat pieces for all of the white powder-coated parts, I am guessing you used either 6061 or 6063 (T6 is a temper rating) which are usually inexpensive but do not like bending at room temperature.


6061 Good guess! :)



...are the coaxial cables rated for that type of repeated flexing? I think I've only seen shielded coaxial cables like that used in 'stuff it into cramped quarters and never move it' or 'little bit of bending with a very large radius' scenarios....


The jury is still out on that. I bought a few different styles this seemed the best and the most insulation. I'm going to just have to wait and see honestly.

DangerousThing
04-02-2014, 03:13 AM
This is truly impressive.

I'm wondering: what does 4dof legs on a hexapod give you that 3 doesn't? I'm curious and more than a bit envious.

I would like to build a large hexapod shortly, but mechanics is my weak point.

KevinO
04-02-2014, 04:18 PM
There is a bit more stability and strength with 4dof but my honest answer would be I wanted it to look cooler. :)

jwatte
04-02-2014, 08:39 PM
Technically, you get to control the angle of incidence to the ground. With 3 DOF, the angle is lower the further out the leg stretches. With 4 DOF, you can always have 90 degree angle to the ground, which (if you have rotating contact pads) means you can totally avoid slip.

DangerousThing
04-03-2014, 03:29 AM
I like both the answers above. I do want my next Groucho to have the presence associated with the name.

I have an interesting idea for a head that raises from the body to look at things on a higher level.

DangerousThing
04-03-2014, 04:03 AM
Kevin,

Have you found that any of the motors could have been replaced with MX-28s? Or conversely would some of them use higher torque?

I've seen some Hexapods use lower torque motors for the places where the motor moves primarily horizontally.

And thanks for sharing the images of Golem. I'm looking forward to seeing more of this fantastic robot.
-
A little learning is a dangerous thing.

Zenta
04-03-2014, 07:45 AM
Hi, just shooting in a comment. Using 4 DOF clearly has both con and pros. Obviously additional DOF add both weight and cost. The extra mass on each leg isn't a good factor if you want a faster hexapod though.

Having the 4. DOF also gives the leg more flexibility but the IK can be more complex due to many solutions. Keeping the tarsus constantly perpendicular to the ground is the easiest way and wouldn't require much torque either, so using a MX-28 should work just fine.

And the coolness factor increases for every DOF..:p

DangerousThing
04-03-2014, 09:23 AM
Hi, just shooting in a comment. Using 4 DOF clearly has both con and pros. Obviously additional DOF add both weight and cost. The extra mass on each leg isn't a good factor if you want a faster hexapod though.

Having the 4. DOF also gives the leg more flexibility but the IK can be more complex due to many solutions. Keeping the tarsus constantly perpendicular to the ground is the easiest way and wouldn't require much torque either, so using a MX-28 should work just fine.

And the coolness factor increases for every DOF..:p

I'll agree with the coolness factor, but only with fellow travelers. The average person, including my wife, Lee, is only annoyed by the increase in cost. :(

Does it matter where the 4th servo is? All the 4DOF legs I've seen have two servos up near the base, and two other servos down the leg. I'm trying to think how that will work out in flexibility.

And if it wouldn't be too much trouble to teach an old fogey something, can somebody define the bones/joints? I'm not used to thinking in biological terms and want to be on the same page as everybody else.

Thanks in advance.

jwatte
04-03-2014, 11:02 AM
Keeping the tarsus constantly perpendicular to the ground is the easiest way and wouldn't require much torque either

I'm not sure about the "not much torque" part. Assuming all other servos are locked, won't the joint at the foot will see the entire torque from the ground contact point to the center of the bot?


define the bones/joints

The same terminology is used in computer animation and simulation, too, btw.
The "joint" is the axis or point of rotation (axis for a single-axis servo; point for ball or universal articulation.)
The "bone" is the rigid distance between one point/axis of rotation and the next point/axis of rotation.

And, technically, you can have "sliding" or "translating" joints where the movement is linear rather than rotational; the joint is then the sliding interface (a line or plane.)

And, in math, because each object in 3D has 6 degrees of freedom (expressed for example as XYZ translation, and heading/pitch/roll rotation) you can express the joints as constrained versus drive degrees of freedom. A typical rotational servo constrains five degrees (all of translation, two of three rotation) and allows rotation in one degree of rotation. A linear actuator constrains two position degrees, and all three rotation degrees, and allows movement along one degree of translation freedom.
You can then express all of this as a set of tensors and do all kinds of cool math on it :-)

KurtEck
04-03-2014, 12:03 PM
And if it wouldn't be too much trouble to teach an old fogey something, can somebody define the bones/joints? I'm not used to thinking in biological terms and want to be on the same page as everybody else.
Yep - I know the feeling. My mental translations are:
Coxa - Hip Horizontal
Femur - Hip Vertical
Tibia - Knee
Tars - Ankle

As for 4dof - I also agree with the Coolness or Badness look of the 4ths DOF. And for a test case, I do have a 4DOF Lynxmotion Round Hexapod with their 4DOF T-Hex legs. Zenta (Kåre) has some nice demos of the T-Hex and 4DOF including:

http://www.youtube.com/watch?v=6tR0TDsWCls

Mine use HS-645mg servos which is probably pushing it, but it is fun!
Kurt

Zenta
04-03-2014, 05:40 PM
I'm not sure about the "not much torque" part. Assuming all other servos are locked, won't the joint at the foot will see the entire torque from the ground contact point to the center of the bot?
No. When the tars is perpendicular to ground the bot will kinda balance their tibias on top of the tars part. That doesn't require much torque at all. A simple explanation of the torque required is the horizontal distance from the tip of the feet to the tars joint/servo multiplied with actual vertical load on the joint (the load is determined by many factors, simplified the worst case is 1/3 of bot mass). As you can see the required torque is very little when the horizontal distance is 0.

There are other factors though, after all the tars is an extension of the tibia. Some torque is needed due to the force of momentum while walking. Not sure if that's the correct words. Tired, going to bed. .

jwatte
04-03-2014, 10:46 PM
A simple explanation of the torque required is the horizontal distance from the tip of the feet to the tars joint/servo multiplied with actual vertical load on the joint

I guess the question is how many feet are on the ground :-)
If all the servos are doing their jobs, then they look like rigid connections to all the other servos.
And, I can put a perfectly rigid plate on top of tall, narrow, wooden blocks.
The torque expressed by the block/plate joint is very little. Yet, it balances. This is the situation you're suggesting.
The reason all the weight does not translate to torque is that most of the weight translates to force perpendicular to the axis of rotation, and it does this because the servo/contact on the other side of the center turns the rotation into translation.
if there was a servo in the center of the bot, it would also see the full torque.

Now, if you start rotating the ground contact, such as when a lot of legs are in the air, the plate-on-blocks analogy breaks down; there is real torque acting on the servo.
Imagine that you nailed the servo sideways to the ground, and tried to lift the entire bot with that servo. That would be the worst case, and the full torque of weight times distance-to-center would act on the servo.

In actual walk, the servo reaches neither of the extremes, but I'd suggest that assuming that the servo will only ever be in the "plate on blocks" situation is too optimistic.

Zenta
04-04-2014, 03:55 AM
My case was tripod, standing on three feet on level/flat floor.


Imagine that you nailed the servo sideways to the ground, and tried to lift the entire bot with that servo. That would be the worst case, and the full torque of weight times distance-to-center would act on the servo.
Seriously? I wouldn't call that a case at all. If so, even the MX-64 wouldn't work.
One extreme case that's more realistic is when the hex is standing on three legs spread far out (all three leg sections almost horizontal). In that case the femur would require most torque and the tars would require much less torque.




In actual walk, the servo reaches neither of the extremes, but I'd suggest that assuming that the servo will only ever be in the "plate on blocks" situation is too optimistic.
True. The question was if any of the MX-64 could be replaced with MX-28. I'm pretty sure that actually torque/amp measurements would say that the femur and tibia servos would require much more torque. I believe the MX-28 should work just fine for the tars part.

Enough said. Kevin didn't do anything wrong using all MX-64 though.

jwatte
04-04-2014, 11:28 AM
I believe the MX-28 should work just fine for the tars part.

I think you're probably right!

KevinO
04-22-2014, 11:27 AM
Quick update: I've been a bit busy this month at work. We are wrapping up How to Train You Dragon 2 which releases in June! Take your kids! :)
Still moving along. As I've said before I use google translate to convert my message to audio on the fly. A friend at the office wanted to hear what it sounded like so I shot this quick video. You might have to turn up the sound a bit since I didn't have it up to loud in order to not wake my son up down the hall. :)


https://www.youtube.com/watch?v=zJ3oN1HnyOU&

KurtEck
04-22-2014, 04:13 PM
Hi Kevin,

Looks (sounds) good. The voice does sound a bit better than the voices I get when I am using Espeak with my robot, to tell which Gait is selected and the like. I need to get back to the Linux version. But right now doing just a little more Teensy work. (Have Lynxmotion SQ3 quad with HS645mg servos being driven and controlled directly from my Teensy board... But that is a different topic.

jwatte
04-22-2014, 05:17 PM
I was just waiting for it to say "I'm completely operational, and all my circuits are functioning perfectly."
:-)
Also: Yes, I'll take the kids!

KevinO
05-13-2014, 12:00 PM
Well I still missed having a depth sensor on this project and since the structure io sensor is still not out of its kickstarter phase I grabbed one of my Primesense sensors. I feel it looks a bit odd now but I really like the sensor. :)

5585

KurtEck
05-14-2014, 07:50 AM
Looks good. Maybe you need to build a new bracket/housing for it it to make it blend in with the rest of it. :happy:

Sure looks studly! How heavy is it these days? (I know I just need to go back a page or two to find that out ) Probably a bit more than I would trust to put on some CD spindles to test things out with.

Again looking great!

KevinO
05-14-2014, 11:36 AM
How heavy is it these days?



2.5 feet (76.2 cm) in diameter and weighs 16 pounds (7.3 Kg)

ArduTank
05-14-2014, 03:20 PM
Phew. Heavy. How do you get him off the floor for testing??

KevinO
05-14-2014, 03:33 PM
Phew. Heavy. How do you get him off the floor for testing??

I am not sure what you mean? Its weight is within the capabilities of the MX-64s if that is what you mean.

JonathanK
05-14-2014, 04:11 PM
Very neat project. I've been following the forums silently for the past few months, but I think it's about time to make an account.

This project interests me because Kevin said this was going to be a platform for learning ROS. I've used ROS for quadrotors before, but not walking robots which is what I'm interested in the most. I currently have a PhantomX Quad and I've gotten the stock code and Phoenix code (thanks Kurt) working on the Arbotix uC. My current goal is to get the quad working with an Intel NUC (same one as this project) and ROS. I just got the new USB2AX v3.2a working with the AX-12s + the dynamixel_motor ROS package (http://wiki.ros.org/dynamixel_motor) and right now I'm trying to mount everything to the quad frame. The quad frame is really small so the NUC takes up all the space on top. I'm hoping I won't have weight issues since they are just AX-12s.

I was wondering if the videos I've seen of this robot are running ROS or just regular code that talks to the servos with a USB2AX. I'm currently running ROS Hydro with Ubuntu 12.04.

Keep up the awesome work!

KurtEck
05-14-2014, 04:42 PM
I was going to answer, as probably very carefully :lol:

But I think he may have been asking, do you have a special stand or the like that you use to hold him up, while you do testing. I personally would not do it with my fingers too close. ;)

Kurt

KevinO
05-14-2014, 05:22 PM
But I think he may have been asking, do you have a special stand or the like that you use to hold him up, while you do testing. I personally would not do it with my fingers too close.
Kurt

I don't actually! When I was building it I tested each leg on its own before attachment. Other than that there hasn't been any need for testing really. The first time I turned it on in a complete state I just ssh in and ran the test from across the room! I suppose being the forth hex I've built I've become a bit care free. :P

KevinO
05-14-2014, 05:35 PM
I was wondering if the videos I've seen of this robot are running ROS or just regular code that talks to the servos with a USB2AX.

In the videos I have posted it is just my code. Although I run roscore and rviz at the same time for sensor testing and such. I have been pulling ROS packages in Indigo as they become available since I'm in 14.04. (Most of the core packages are done already and as of Tuesday nearly all are done. )

I'm slowly working on my own node for locomotion but I got sidetracked playing around with SDF and Gazebo to build my own simulation for the hex. :)

Ron
06-05-2014, 10:04 AM
Excellent work.

KevinO
09-18-2014, 07:54 PM
Although it has been a while since I posted on this project it is still very active. Still working with ROS and such although the summer slows down my hobby time. I've went ahead and moved my locomotion demo code into my public gitHub. It will work with either a USB2AX or USB2Dynamixel depending on which dxl_hal lib you are using. Should run on any linux distribution including distro's for the raspi and bbb as long as it has pthread and the joystick libs installed and can handle float point The joystick class should work with any game controller although it is possible the axis and buttons would be different from brand to brand so be careful when starting out.

It is written in c++ but I took some liberty by making the control class global (lazy) so the joystick could hook in with very little work. (In the lib version that I'm using for ROS it is not of course.) Most variables are passed by reference from function to function and I used "const" on the inputs so you can easily tell what are inputs to outputs. Pointers were kept to a minimum and are used in areas that could be dynamic like in the joystick class. Resident memory is only around 212k with shared memory around 1.1MB so it's small and should run on a embedded system just fine.

It had body rotation and translation, a pan for a camera turret and of course the travel. It is setup for a 4DOF leg, cause that is what Golem is. Also to note it is expecting MX-64 dynamixels on the legs and a MX 28 on the pan. This doesn't have any gait selection, single leg control or sequence player. I'd recommend something else if you like that kind of features. This is purely for odd people like me that likes a research platform that has six legs. :P (I wouldn't have had body kinematics but I use it in conjunction with a IMU for stabilization.) It is decently commented so hopefully that will help follow along with what it is doing.

If you see anything wrong or could be improved let me know or do a pull request of the change.

https://github.com/KevinOchs/Golem-Standalone-Locomotion

I took major inspiration from code bases from Jeroen Janssen, Kurt Eckhardt, Kåre Halvorsen and Andrew Alter have done so thank you guys for paving the way.

Cheers,
Kevin

KurtEck
09-22-2014, 12:37 PM
Thanks Kevin,

As you mentioned, I had a lot of inspiration from many of the same ones you mentioned. I was also inspired by others such as as Jim Frye and Laurent Gay who earlier developed some hexapods which were originally controlled by programs that were output by Laurent's Powerpod program.

Took a quick look through and things look good. As you mentioned, several things are much more fixed than in the Phoenix code base, like not having multiple walking gaits, but a lot of it is still there. Things like the ability to alter the body height and the like. Looks like fun.

Still have not done a complete review of the code, but it all looks reasonably familiar and easy to read. Have not found any obvious problems. Could point out minor nit, that there is code in the method servoDriver::TransmitServoPositions that can never execute, but would not hurt anything.

I like that you have broken a lot of the code up into smaller files. I keep thinking I should do the same with the Phoenix code, but sometimes resist as having lots of files in the Arduino IDE is a pain. Yes I know I can use some other Ides, and at times I do, like the Atmel Studio 6.1, but still often use the Arduino IDE as that is what most people use...

Again great stuff!

KevinO
09-22-2014, 12:53 PM
Still have not done a complete review of the code, but it all looks reasonably familiar and easy to read. Have not found any obvious problems. Could point out minor nit, that there is code in the method servoDriver::TransmitServoPositions that can never execute, but would not hurt anything.


Do tell! My eyes tend to not see things like that after staring at it for so long! It is the reason I put it on my public github!

KurtEck
09-22-2014, 01:16 PM
Again minor:
About line 171

if( curPos[i] > goalPos[i] )
{
if ( curPos[i] == goalPos[i] )
{
If it is > as the first if tests, than it wont be ==. You have the same == test (and code) in the else clause which is valid

Kurt

KevinO
09-22-2014, 02:30 PM
Ha! Yes of course. See! I didn't even notice that. :)
I think there was something else there at one time and this was where I left it. I will push the change up today or tomorrow.

KevinO
10-20-2014, 01:30 AM
So I have everything working in ROS now. I have a hexapod_locomotion node I've created based off my standalone code. It subscribes to three topics. A joystick topic, an IMU topic and a third topic to manipulate the travel coordinates directly. The pointgrey gigE camera is also functioning wonderfully! Lastly the node currently publishes the leg angles as well as the body coordinates. I'm working on a model for visualization. A bit of a learning curve but once you are in it it's pretty straight forward. ROS is pretty slick I must say.

Zenta
10-20-2014, 11:51 AM
Sounds good Kevin, glad you got it to work!:D

KevinO
10-21-2014, 11:23 AM
Thanks Zenta, Took a bit of time to get my head wrapped around the concept but it kinda clicked after a while.

KevinO
01-06-2015, 01:06 PM
So figured I'd give a update on the ROS progress. I currently have my ROS stack working. Xacro/URDF built, IMU active and publishing odom messages, the point grey camera streaming and just put on the Prime Sense depth sensor a few days ago (not in video). I am using depthimage_to_laserscan so I can use gmapping.

In regards to odometry I have had to slow the gait down a considerable bit. Below is a test of the "slow gait," it is using simple cosine and sine waves with a pretty high sample rate, so high I've lowered it a bit since this video as you will see it added a bit of shaking on the coxa joints due to rounding. I currently have one package that handles the leg motion but as far as ROS knows it is just the "base" of the robot. It simplifies the command structure to a simple Twist message for velocity. The max speed is rather slow at 8cm per second, anything higher the IMU gets to much of the impact of the legs in its readings...even with a low pass filter applied.

Next is implementing the ROS navigation stack since I have the base tf, the odometry, and the laser scan data ready. That will give me the autonomous path navigation which will be probably the end goal in the development process of this project.

The more and more I learn ROS I constantly say "Why aren't we funding this!" :P It really is a great system.

Cheers,
Kevin Ochs


https://www.youtube.com/watch?v=jlBm_V4Q55w

CogswellCogs
01-06-2015, 01:20 PM
Wow ! Really great work !

KurtEck
01-06-2015, 01:52 PM
Again great work! I like how smooth the sine/cosine version of the gait is working. Will be fun to experiment with some of that soon!

Kurt

Zenta
01-06-2015, 03:57 PM
Awesome, love smooth gait.

KevinO
01-09-2015, 12:19 AM
A couple of pics from testing tonight.

5783

5784

adammck
01-11-2015, 05:18 PM
Love that smooth slow gait. The tarsi seem to remain perfectly perpendicular to the ground throughout each step, but I can't see any jitter at all -- are you somehow setting the movement speed dynamically for each joint, or is the framerate just sufficiently high that the jitter isn't noticeable?

KevinO
01-11-2015, 07:20 PM
Love that smooth slow gait. The tarsi seem to remain perfectly perpendicular to the ground throughout each step, but I can't see any jitter at all -- are you somehow setting the movement speed dynamically for each joint, or is the framerate just sufficiently high that the jitter isn't noticeable?

Just high framerate. I sample the curve fifty times, a bit excessive but smooth. Here is a bit of the code that does it if you are interested.



void Gait::cyclePeriod( const hexapod_msgs::RootJoint &base, hexapod_msgs::FeetPositions *feet )
{
for( int leg_index = 0; leg_index <= 5; leg_index++ )
{
// Lifts the leg and move it forward
if( cycle_leg_number_[leg_index] == 0 && is_travelling_ == true )
{
feet->foot[leg_index].x = -base.x * cos( cycle_period_ * PI / cycle_length_ );
feet->foot[leg_index].y = -base.y * cos( cycle_period_ * PI / cycle_length_ );
feet->foot[leg_index].z = leg_lift_height_ * sin( cycle_period_ * PI / cycle_length_ );
feet->foot[leg_index].yaw = -base.yaw * cos( cycle_period_ * PI / cycle_length_ );
}
// Moves legs backward pushing the body forward
if( cycle_leg_number_[leg_index] == 1 )
{
feet->foot[leg_index].x = base.x * cos( cycle_period_ * PI / cycle_length_ );
feet->foot[leg_index].y = base.y * cos( cycle_period_ * PI / cycle_length_ );
feet->foot[leg_index].z = 0.0;
feet->foot[leg_index].yaw = base.yaw * cos( cycle_period_ * PI / cycle_length_ );
}
}
}

KevinO
01-24-2015, 01:01 AM
Quick video showing body leveling via the IMU readings. This is also the first video I've shot with the speech turned on.


http://www.youtube.com/watch?v=IP-1HebkZnU

jwatte
01-24-2015, 01:34 PM
Nice!

What text-to-speech engine is that?

Also, it looks like the body is not moving at a fixed velocity when it's walking. In my own gait engine, I have the same problem, even though the math tries to solve for that. Have you thought about how to make that better with the help of the sensor?

KevinO
01-24-2015, 02:17 PM
What text-to-speech engine is that?


Well after trying all the available ones. I settled on simple audio files.
I use this website to create the mp3. http://www.fromtexttospeech.com/

Then use this website to convert to ogg file format which is what ROS's audio play node prefers. http://media.io/




Also, it looks like the body is not moving at a fixed velocity when it's walking. In my own gait engine, I have the same problem, even though the math tries to solve for that. Have you thought about how to make that better with the help of the sensor?

Interesting what did you do on the math side to try and counter that? Also I never thought to use the sensor data, good idea.

Here is my IK solver, would you recommend anything different?




void Ik::calculateIK( const hexapod_msgs::FeetPositions &feet, const hexapod_msgs::BodyJoint &body, hexapod_msgs::LegsJoints *legs )
{
char sign = -1;
for( int leg_index = 0; leg_index <= 5; leg_index++ )
{
if( leg_index <= 2 )
{
sign = -1;
}
else
{
sign = 1;
}

// First calculate sinus and co-sinus for each angular axis
Trig A = getSinCos( body.yaw + feet.foot[leg_index].yaw );
Trig B = getSinCos( body.pitch );
Trig G = getSinCos( body.roll );

// Calculating totals from center of the body to the feet
double cpr_x = BODY_CENTER_TO_COXA_X[leg_index] + INIT_FOOT_POS_X[leg_index] + body.x + feet.foot[leg_index].x;
double cpr_y = BODY_CENTER_TO_COXA_Y[leg_index] + sign*( INIT_FOOT_POS_Y[leg_index] + body.y ) + feet.foot[leg_index].y;
double cpr_z = INIT_FOOT_POS_Z - TARSUS_LENGTH + body.z - feet.foot[leg_index].z;

// Calculation of angular matrix of body (Tait-Bryan angles Z, Y, X)
// http://en.wikipedia.org/wiki/Euler_angles
double body_pos_x = cpr_x - ( ( cpr_x * A.cosine * B.cosine ) +
( cpr_y * A.cosine * B.sine * G.sine - cpr_y * G.cosine * A.sine ) +
( cpr_z * A.sine * G.sine + cpr_z * A.cosine * G.cosine * B.sine )
);
double body_pos_y = cpr_y - ( ( cpr_x * B.cosine * A.sine ) +
( cpr_y * A.cosine * G.cosine + cpr_y * A.sine * B.sine * G.sine ) +
( cpr_z * G.cosine * A.sine * B.sine - cpr_z * A.cosine * G.sine )
);
double body_pos_z = cpr_z - ( ( -cpr_x * B.sine ) + ( cpr_y * B.cosine * G.sine ) + ( cpr_z * B.cosine * G.cosine ) );

// Calculate foot position
double feet_pos_x = INIT_FOOT_POS_X[leg_index] + body.x - body_pos_x + feet.foot[leg_index].x;
double feet_pos_y = INIT_FOOT_POS_Y[leg_index] + sign*( body.y - body_pos_y + feet.foot[leg_index].y );
double feet_pos_z = INIT_FOOT_POS_Z - TARSUS_LENGTH + body.z - body_pos_z - feet.foot[leg_index].z;

// Length between the Root and Foot Position ...Pythagorean theorem
double femur_to_tarsus = sqrt( pow( feet_pos_x, 2 ) + pow( feet_pos_y, 2 ) ) - COXA_LENGTH;

// Length of the sides of the triangle formed by the femur, tibia and tarsus joints.
double side_a = FEMUR_LENGTH;
double side_a_sqr = pow( FEMUR_LENGTH, 2 );

double side_b = TIBIA_LENGTH;
double side_b_sqr = pow( TIBIA_LENGTH, 2 );

double side_c = sqrt( pow( femur_to_tarsus, 2 ) + pow( feet_pos_z, 2 ) );
double side_c_sqr = pow( side_c, 2 );

// We are using the law of cosines on the triangle formed by the femur, tibia and tarsus joints.
double angle_b = acos( ( side_a_sqr - side_b_sqr + side_c_sqr ) / ( 2.0 * side_a * side_c ) );
double angle_c = acos( ( side_a_sqr + side_b_sqr - side_c_sqr ) / ( 2.0 * side_a * side_b ) );

// Angle of line between the femur and Tarsus joints with respect to feet_pos_z.
double theta = atan2( femur_to_tarsus, feet_pos_z );

// Resulting joint angles in radians.
legs->leg[leg_index].coxa = atan2( feet_pos_x, feet_pos_y ) + INIT_COXA_ANGLE[leg_index];
legs->leg[leg_index].femur = ( PI/2 ) - ( theta + angle_b );
legs->leg[leg_index].tibia = ( PI/2 ) - angle_c;
legs->leg[leg_index].tarsus = legs->leg[leg_index].femur + legs->leg[leg_index].tibia;
}
}

jwatte
01-24-2015, 11:39 PM
The IK is probably fine!

What I get a lot in a system like Nuke is that it doesn't move the legs at a constant rate. This is in part because it just runs IK once for each "point" on the gait -- front, back, top -- which introduces a lot of nonlinearity in the rotational interpolation.

What I do with Onyx is run the IK once per step frame (which is run at 60 Hz) and animate the actual movement path of the legs.
This means that the nonlinearity of rotational movement is minimized.

However, even though I do that, the body of Onyx doesn't move entirely evenly. My guess is that backlash is causing the movement to not match the math exactly.

Anyway, so, yeah -- if the point is to make the main body move smoothly (for camera and aiming purposes, say) then using the sensor, it ought to be possible to minimize lateral acceleration!

Finally -- turning MP3 to OGG is something I do with the program Audacity, and the "lame mp3" plugin. Although as long as your internet connection works, online tools probably work great :-)
The TTS engine sounds a lot like the engine used by the xtranormals.com site while it was alive. And it doesn't sound like the default Linux "espeak" engine that I use on Money Pit...

Zenta
02-01-2015, 06:18 AM
Looking good Kevin!

It's kinda creepy hearing a hexapod talk, lol. You should do a demo of the hex on a large plate/board and then tilting the board.

KevinO
02-01-2015, 05:20 PM
You should do a demo of the hex on a large plate/board and then tilting the board.

I thought about that but I didn't have anything that large sitting around. :P

KevinO
02-21-2015, 02:24 AM
Taking cues on the great work Upgrayd did on his ROS rviz simulation of his quad I now have a working version of my hex. Thanks Ryan!

5839

KurtEck
02-21-2015, 09:07 AM
Looking good. You have been busy!

Zenta
02-21-2015, 04:14 PM
Looks great Kevin. :-)

KevinO
02-22-2015, 12:53 AM
Starting to build the body section for Rviz tonight.

5841

Snoopy
02-24-2015, 06:21 PM
As I've said before I use google translate to convert my message to audio on the fly.

Kevin, very cool! How to use google translate to make a robot talks?

KevinO
03-02-2015, 01:01 AM
So getting closer to finishing the Rviz part of the project. Still more details to add but it is up and running. Base link is fixed so it could be easier to record.


https://www.youtube.com/watch?v=cf26xQHde1s

jwatte
03-02-2015, 03:42 PM
Looks almost as cool in simulation as it does in real life :-)

KevinO
04-16-2015, 01:12 AM
Writing some documentation on Golem and I'd thought I'd show a screen shot of rviz with the point cloud data with the color overlay and a sub sample of the data being registered as a laser scan at robot height. The fake laser scan allows me to use the ROS slam packages easily.

5867

Zenta
04-17-2015, 12:45 AM
Cool! Looks very interesting and fun and way over my head..:robotsurprised:

KevinO
04-17-2015, 01:11 PM
Odometry plot in rviz.

5868

Xevel
04-17-2015, 01:48 PM
That's sweet! :D

Is it pure odometry on this example? Can you easily add IMU data to account for imperfections?

KevinO
04-17-2015, 02:52 PM
This is the pure mathematical odometry. This topic and the imu topic are combined for the final odometry used by the mapping and navigation stack. I also have a third which is the visual odometry from the depth sensor. All three are then passed into a Kalman filter.

KevinO
04-23-2015, 02:46 AM
2D room mapping via slam.
5872

KurtEck
04-23-2015, 07:47 AM
Looks great!

KevinO
05-12-2015, 02:29 AM
More progress with Golem! At R3n33's encouragement I looked into 3D mapping systems in ROS. I have to admit it is way cooler. I have it setup to now record as it walks around. It does take up a chunk of hard drive so it will be interesting how it works on a smaller system or streaming across wifi.

5932

r3n33
05-12-2015, 11:03 AM
That is looking great! Once I get out of hardware land I'm looking forward to testing on the other platforms to see how it performs.

KevinO
05-20-2015, 12:25 AM
Refining the UI a bit in Rviz. I have odometry, both calculated(red) and merged(green) with the IMU via the robot_localization package. So next up is autonomous path planning.

5950

KevinO
05-22-2015, 01:01 AM
Here is the rqt_graph of the current node structure of the project.

5951

KurtEck
05-22-2015, 09:11 AM
Looks great.

I am looking foreword to having my PhantomX back in one piece with the XU3. Yesterday spent most of the day with an Experiment of switching the image from the default Ubuntu 14.04 and adding the stuff in, to trying out the prebuilt image with ROS/PCL/OpenCV/OpenNI... But I found that the builder of this image decided to remove and/or change enough things of the default image to make it challenging (change networking, remove Audio stuff, remove bluetooth stuf...)

So I switched back to the one I was building and added the stuff in... PCL sure takes a bit to build!

Anyway looks like you are having some fun!

KevinO
06-02-2015, 01:54 AM
Shot a quick video of the 3D mapping and thought I'd share. I really wanted to study it as it moved and figured a video would be an easy way.


http://www.youtube.com/watch?v=-3Ejgy1nFOg

KurtEck
06-02-2015, 08:24 AM
Kevin, that was very interesting and fun to see it walking and filling in the 3d mapping as it goes along. Again with seeing your stuff as well as Renee's progress, helps to give me a push to get mine back into one piece!

Was wondering in the video it looks like the camera is only ever looking straight foreword. Does the system ever use the pan and tilt or could one as an option simply hard mount the camera onto the robot?

Was also wondering if the mapping system understands about drop offs? That is if your robot should come up to the head of stairs, would/could it detect this and not try to walk off the cliff? Would be important in my house as many of the rooms go up or down a step or two...

Again great work!

Zenta
06-02-2015, 08:59 AM
Looks great Kevin. I assume there is a lot of data to handle since framerate is only 5 fps. Agree with Kurt, looking at yours and Renee's progress really inspire to start learning ROS.

r3n33
06-02-2015, 02:21 PM
Shot a quick video of the 3D mapping and thought I'd share. I really wanted to study it as it moved and figured a video would be an easy way.

Is that some loop closure detection I see towards the end? :D Mind if I post up a video of the rtabmap interface and the result of one of the high resolution point cloud renderings?


Was wondering in the video it looks like the camera is only ever looking straight foreword. Does the system ever use the pan and tilt or could one as an option simply hard mount the camera onto the robot?

The PhantomX branch uses pan and tilt servos to manipulate the sensor position as well as updating the tf to specify the current angle of the sensor.


Agree with Kurt, looking at yours and Renee's progress really inspire to start learning ROS.

5979

KevinO
06-02-2015, 05:03 PM
Looks great Kevin. I assume there is a lot of data to handle since framerate is only 5 fps. Agree with Kurt, looking at yours and Renee's progress really inspire to start learning ROS.

The fps slowly fades as more points are on the screen. I was using small spheres with the color applied, to much geometry I realized. Small squares or dots are options as well.

r3n33
06-02-2015, 05:08 PM
The fps slowly fades as more points are on the screen. I was using small spheres with the color applied, to much geometry I realized. Small squares or dots are options as well.

This is also the FPS on the Rviz visualization so running on a more powerful machine should help. Was that video taken from the laptop?

KevinO
06-02-2015, 05:57 PM
This is also the FPS on the Rviz visualization so running on a more powerful machine should help. Was that video taken from the laptop?

Yes, to clarify all visualization is done on a laptop. I use a multiple machine setup as described here. http://wiki.ros.org/ROS/Tutorials/MultipleMachines

m3atsauc3
06-12-2015, 11:36 AM
That is one good looking spider bot, and a very impressive ROS setup! :D

KevinO
06-14-2015, 04:01 PM
So minor update... and not really an update on developemnt. I was giving the opportunity to show Golem at the DARPA Robotics Challenge Expo with Andrew from Trossen this past weekend in the ROBOTIS booth. I was able to also walk it around the booth and even over to OSRF which is who maintains ROS.org. They even started looking at my code right there in the booth. Nothing like code review at an expo. As a side bonus it motivated me to get a proper case to hold the robot. I will attach images below. It just barely fits a Pelican 1650 case!

Anyway thanks again to Andrew again for the invite!

6031

6032

6033

Zenta
06-15-2015, 12:59 AM
Sounds like fun! Good to see your Golem got proper protection.

KevinO
06-15-2015, 02:58 AM
Thanks Zenta! It was a fun weekend!

In other news I'm trying to work through getting Gazebo up and running. Romain has made some progress on his project so I have tons of questions when he wakes up over there in France. :P

6034

TXBDan
06-15-2015, 07:56 AM
That's really cool. Nice work!

Romain
06-17-2015, 05:45 AM
I was able to also walk it around the booth and even over to OSRF which is who maintains ROS.org. They even started looking at my code right there in the booth. Nothing like code review at an expo.

Oh! Quite a nice experience :happy:
I am sure you got some nice advices :happy:



As a side bonus it motivated me to get a proper case to hold the robot. I will attach images below. It just barely fits a Pelican 1650 case!

Congratulation for your case, I love it. It looks very professional!



In other news I'm trying to work through getting Gazebo up and running. Romain has made some progress on his project so I have tons of questions when he wakes up over there in France. :P

Two days later, I'm awake! :happy:
You can ask me anything, I will try to answer.
I am sorry I did not have much time yesterday and it will be the same today because I have to finish a small Arduino project to Thrusday. But I will try to help you if needed.

DenS
10-18-2015, 07:58 AM
Very cool project!

KevinO
02-07-2016, 04:06 PM
I've made my ROS stack public. It is mostly finished with Gazebo being the last bit that isn't in there. There are example urdf's and models from Renee for the phantomX as well. She said there might be a bug in them so I will follow up or she can reply here. :)

https://github.com/KevinOchs/hexapod_ros (https://github.com/KevinOchs/ROS_hexapod)

Feel free to ask any questions. I love feedback.

Cheers,
Kevin

KurtEck
02-07-2016, 04:32 PM
Congrats on going public! Will refork it again soon!

Looking forward to playing around again.
Kurt

KurtEck
02-18-2016, 10:13 AM
Hi Kevin,

Getting ready to start playing again :D
My PhantomX MK3 upgrade shipped yesterday :D My new Odroid XU4 shipped yesterday :D (Currently have XU3-lite in MK2).

So I re-forked the project: That is when I figured out that you changed the name. Will check to see if any of the other branches on my old fork have any relevance any more. Things like maybe different IMUs...

Couple of questions/thoughts?

My assumption for now is I need to probably install: Ubuntu 14.04 and Ros Indigo on this processor. I believe the EMMC will have 15.04 installed maybe 15.10. But that would also probably imply Ros Jade. Have you tried later Ubuntus and/or Ros? Or are you waiting for the next LTE 16.04 and Ros ???

I will probably start again using USB2AX, but will probably try migrating to Arbotix-Pro. Have you tried this yet? If not will let you know how it goes.

Again thanks for all of your hard work here!

DresnerRobotics
02-18-2016, 01:17 PM
I've made my ROS stack public. It is mostly finished with Gazebo being the last bit that isn't in there. There are example urdf's and models from Renee for the phantomX as well. She said there might be a bug in them so I will follow up or she can reply here. :)

https://github.com/KevinOchs/hexapod_ros (https://github.com/KevinOchs/ROS_hexapod)

Feel free to ask any questions. I love feedback.

Cheers,
Kevin

You rock man. This code base is phenomenal.

r3n33
02-18-2016, 02:11 PM
I've made my ROS stack public. It is mostly finished with Gazebo being the last bit that isn't in there. There are example urdf's and models from Renee for the phantomX as well. She said there might be a bug in them so I will follow up or she can reply here. :)

https://github.com/KevinOchs/hexapod_ros (https://github.com/KevinOchs/ROS_hexapod)

Feel free to ask any questions. I love feedback.

Cheers,
Kevin

Oh yea! hexapod_ros is public now.

There was an issue in the URDF on the master repo that had one of the leg joints rotated 90 degrees on the PhantomX. Umm. I think my fork has been erased so I'll have to recover that data from ROSie. I'll get this to you Kevin so you can update your code base. :)

Simply awesome Kevin!

Zenta
02-18-2016, 02:20 PM
Congratz going public Kevin. :D

KevinO
02-18-2016, 02:32 PM
So I re-forked the project: That is when I figured out that you changed the name. Will check to see if any of the other branches on my old fork have any relevance any more. Things like maybe different IMUs...

Couple of questions/thoughts?

My assumption for now is I need to probably install: Ubuntu 14.04 and Ros Indigo on this processor. I believe the EMMC will have 15.04 installed maybe 15.10. But that would also probably imply Ros Jade. Have you tried later Ubuntus and/or Ros? Or are you waiting for the next LTE 16.04 and Ros ???

I haven't tried Jade yet. I need to work through the gazebo stuff a bit more then at that time I can look into any issues with it in Jade. Unless you want to test that for me. :)



I will probably start again using USB2AX, but will probably try migrating to Arbotix-Pro. Have you tried this yet? If not will let you know how it goes.



I have not. I really like the low latency of the USB2AX. Give it a go and let me know.



Again thanks for all of your hard work here!

Thank you for testing.

KevinO
02-18-2016, 02:48 PM
Make sure you launch with your desired launch configs.

For example:

roslaunch hexapod_bringup hexapod_full.launch config:=phantomX joy_mapping:=joystick_ds3

The param files are in the hexapod_description package if you want to look at them. This param file structure allows several different hexapods and teleops to exist without having to re-compile every time you tweak or change something.

KurtEck
02-19-2016, 09:32 AM
Thanks Kevin, looking forward to hacking again. The new MK3 parts may arrive today :D Actually trying to decide if to A) Redo MK2 with these parts (most likely), or b) Use the MK? Quad parts, plus MK3 kit plus 6 servos (need to count to see how many I have right now). Sorry off topic..

First test will be to install Arbotix-M on it and make sure Phoenix code is OK and if necessary update some of the CFG stuff...


I haven't tried Jade yet. I need to work through the gazebo stuff a bit more then at that time I can look into any issues with it in Jade. Unless you want to test that for me. :)
Will probably start with Indigo here as I know I had a working setup... In fact I can and may simply copy the EMMC from XU3 to the new XU4.

But in Early March, I want to get the new Odroid C2 board (slower than XU4, but quad 2qhz 64 bit ArmV8...), which their current images are for Ubuntu 16.04 (I assume pre-release). So my guess is will have to go to Jade and/or Kame?


I have not. I really like the low latency of the USB2AX. Give it a go and let me know.
Yes that USB2AX is great for USB communications as compared to some of the other USB adapters.

I will probably start with USB2AX to get things running again, as that was all working earlier (on earlier versions of your stuff).
Then migrate to Arbotix-Pro. I will probably test it with the USB, but will be focused on making it work using TTL serial communications, as I believe I will be able to get really fast communications, for those processor who have available USARTS Example:

6453
The above LA output, shows the AX Buss on the first line, the TTL Serial output from Odroid XU3 on 2nd line and the TTL Serial input to the Odroid on the third line. This one has all of them at 1mbs. This is a query from the Arbotix Pro for 10 registers. The current firmware echoes everything on AXBuss (which in this case is not needed), but not sure if it actually slowed anything down. Note: my current updated firmware did not echo the response packet back on AX-Buss, may look to also do like others and try to catch the packets meant for it and not echo them... Also will change Baud rate to 2mbs to/from ODroid.

2nd part of converting to Arbotix-Pro is can/should the Gyro/Accel parts of it be used instead of another external IMU...

I know I should probably continue this on a new thread.

Again great stuff!

Mayur
02-23-2016, 02:42 AM
Congrats Kevin, this stack really is awesome!


I haven't tried Jade yet. I need to work through the gazebo stuff a bit more then at that time I can look into any issues with it in Jade. Unless you want to test that for me. :)

It seems like the gazebo-ros-control packages are still not available for Jade, so Indigo is probably the best bet at the moment:
http://answers.gazebosim.org/question/8802/installing-ros-jade-with-gazebo-501/
Indigo seems to work quite well with Gazebo5 though, if you would like to play around with that. I followed the answer in the link below and it looks to be running smoothly:
http://answers.gazebosim.org/question/8598/how-to-install-ros-indigo-gazebo-ros-control-with-gazebo-5/

Thanks again for making this code public!:D

KurtEck
02-23-2016, 08:47 AM
Thanks Mayur,

Looks like I will be setting up XU4 with 14.04 and Indigo. Yesterday I tried to install Jade (from sources) on 15.10 and it failed

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
rosconsole: No definition of [boost] for OS version [wily]
rosparam: No definition of [python-yaml] for OS version [wily]
rospack: No definition of [python-coverage] for OS version [wily]
rosgraph: No definition of [python-mock] for OS version [wily]
...

I might be able to trick it, but it just reinforced the idea that I am probably better off just going with what I know works...

Mayur
02-23-2016, 02:11 PM
Ah, sorry to hear about the problems with Jade and 15.10 Kurt. You're probably right about being better off with the more stable option for now...

Looking forward to seeing your Mk3 up and running!

KurtEck
03-01-2016, 10:19 AM
Thanks, I now have 14.04 and Indigo installed.

MK3 is more or less in one piece right now, currently with Arbotix-m installed to test Arduino stuff (different thread). Will be updating to Linux stuff very soon. Will then test out some of my non ROS stuff.

But I am currently trying to build up my XU4 image with Kevin's latest stuff and find myself ROS challenged (rusty) again. I went back to my old cheat sheet (from r3n33), and I do:


sudo apt-get install ros-indigo-sound-play ros-indigo-diagnostic-updater ros-indigo-xacro ros-indigo-openni2-launch ros-indigo-depthimage-to-laserscan ros-indigo-joy ros-indigo-robot-localization libusb-1.0-0-dev ros-indigo-robot-state-publisher

cd ~/
git clone https://github.com/KevinOchs/ROS_hexapod.git
cd ROS_hexapod
catkin_make

I change the git clone command as the project changed... likewise the cd.

But now the catkin_make fails as there is no src directory... So need to figure out (or remember) how to resolve this now, that the project layout has changed. Hints?

Thanks

Mayur
03-01-2016, 10:59 AM
Great to hear your MK3 is alive:p

I see you're cloning into the home folder, have you initialized this as the catkin workspace? If not, I think you'll first need to initialize a catkin workspace and source the setup file. The example below is from the ROS tutorials (http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment):


mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
catkin_make
source devel/setup.bash


Then clone the repo into the src folder and catkin_make from the root folder of your workspace rather than the hexapod_ros folder (I also did that initially and got the same error about no src directory), e.g.:


cd ~/catkin_ws/src
git clone https://github.com/KevinOchs/hexapod_ros.git
cd ..
catkin_make


I hope this helps!

KevinO
03-01-2016, 11:08 AM
Don't forget the "."!
git clone https://github.com/KevinOchs/hexapod_ros.git .

This way it won't create the parent directory!

KurtEck
03-01-2016, 11:17 AM
Thanks, yep that helps.

Now I just need to work through reducing how much of it tries to build (at least initially). As not all of the ROS Indigo packages are available (or at least easily) with the ARM install. Example:

-- ==> add_subdirectory(hexapod_ros/hexapod_gazebo)
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
Could not find a package configuration file provided by "gazebo_ros" with
any of the following names:

gazebo_rosConfig.cmake
gazebo_ros-config.cmake

Add the installation prefix of "gazebo_ros" to CMAKE_PREFIX_PATH or set
"gazebo_ros_DIR" to a directory containing one of the above files. If
"gazebo_ros" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
hexapod_ros/hexapod_gazebo/CMakeLists.txt:7 (find_package)

I believe I resolved this earlier on my XU3-lite by adding an empty file: .../hexapod_gazebo/CATKIN_IGNORE

Thanks again

Mayur
03-01-2016, 11:32 AM
Don't forget the "."!
git clone https://github.com/KevinOchs/hexapod_ros.git .

This way it won't create the parent directory!
Oh yeah, thanks Kevin! I've left the parent directory in my workspace to keep the hexapod_ros packages together (I also have the HumaRobotics packages in my catkin workspace) and it still compiles without a problem. Although I suppose there's no need for Kurt to keep the parent directory on his XU4.



I believe I resolved this earlier on my XU3-lite by adding an empty file: .../hexapod_gazebo/CATKIN_IGNORE

Kurt I guess you wouldn't need the gazebo package on the XU4 anyway because you probably won't be simulating the robot from onboard the robot itself. What if you get rid of that package altogether from the XU4?

KevinO
03-01-2016, 11:34 AM
You can just remove the gazebo package. It isn't totally ready yet anyway...

rm -r hexapod_gazebo/

KevinO
03-01-2016, 11:38 AM
(I also have the HumaRobotics packages in my catkin workspace) and it still compiles without a problem.

Did HumaRobotics make a hexapod stack too?

Mayur
03-01-2016, 11:49 AM
Did HumaRobotics make a hexapod stack too?
No they made a Gazebo simulation of the PhantomX, but it was created by modifying code for their Darwin-OP humanoid simulation so it's a bit buggy. Also it doesn't use a gait engine based on foot trajectories and inverse kinematics, but rather directly sweeps all the joints through sinusoidal motions.

I think Romain said he also used their packages as a starting point for his Gazebo work, maybe he can add some more info?:) You can check out the packages here:
https://github.com/HumaRobotics/phantomx_gazebo

https://github.com/HumaRobotics/phantomx_description

https://github.com/HumaRobotics/phantomx_control

KevinO
03-01-2016, 11:54 AM
Mayur and Kurt. I just realized I didn't merge in Renee's fix to the xacro file for the phantomX. I will get to that. Unless of course Renee or someone does a pull request and I can merge it that way from work. :P

KevinO
03-01-2016, 11:57 AM
No they made a Gazebo simulation of the PhantomX, but it was created by modifying code for their Darwin-OP humanoid simulation so it's a bit buggy. Also it doesn't use a gait engine based on foot trajectories and inverse kinematics, but rather directly sweeps all the joints through sinusoidal motions.

Not the route I'd take but I suppose it did get them something.

KurtEck
03-01-2016, 12:06 PM
Thanks again,

I did like Mayur mentioned and it appears to build OK with the top directory there. Not sure if it hurts anything or not.

I put the CATKIN_IGNORE in and it now appears to build fully. May later rm it, but this is maybe easier as then I will still by syncing in any changes you make. As you mentioned maybe won't simulate it on the XU4 itself, not sure how doable it is on the XU4 yet.

Once I get ready to test this, it looks like I need to bring over the PhantomX launch files that were in the older version of the code base.

Also need to figure out what I want to do for IMU. I still have the Razor, which I was using on MK2, could start again with this, but wonder if I go with Arbotix Pro if we should try setting up to use the stuff of it... Or later I will use my use my own controller, which will have the DSO055 on it...

Likewise you are using DS3 and earlier I was using DS4, will see which one I get working on this image again...

Should be fun!

KevinO
03-01-2016, 12:50 PM
Once I get ready to test this, it looks like I need to bring over the PhantomX launch files that were in the older version of the code base.


Do not do that. Those old launch files won't work and would possibly cause bad things to happen to your physical hex. Tons of changes have happened since then. All the PhantomX stuff is in the current stack. Simply launch with the proper config arguments.

For example.



roslaunch hexapod_bringup hexapod_full.launch config:=phantomX joy_mapping:=joystick_ds3


or




roslaunch hexapod_bringup hexapod_full.launch config:=phantomX joy_mapping:=joystick_ds4


It can take any nearly any customization now without recompiling. Most everything is in the param files now...

KevinO
03-01-2016, 12:57 PM
All the config files currently installed are in this package.

https://github.com/KevinOchs/hexapod_ros/tree/master/hexapod_description/params

KurtEck
03-01-2016, 01:30 PM
Thanks Kevin

Mayur
03-02-2016, 03:28 AM
Mayur and Kurt. I just realized I didn't merge in Renee's fix to the xacro file for the phantomX. I will get to that.
Thanks Kevin!


Not the route I'd take but I suppose it did get them something.
I agree, controlling foot positions gives a much more natural gait and allows for greater control of posture etc. for uneven terrain. But I think the HumaRobotics guys did do some pretty good work characterising the PhantomX, especially in terms of inertial properties etc. so that's really helpful.


I did like Mayur mentioned and it appears to build OK with the top directory there. Not sure if it hurts anything or not.
I would also be interested to know if it's a problem, maybe I've been doing things wrong this whole time!

_ADAM_
05-04-2016, 12:39 PM
Awesome project - very impressive. Congrats on your success. It's great that you published your code as well.

KevinO
05-05-2016, 11:10 AM
Awesome project - very impressive. Congrats on your success. It's great that you published your code as well.

Thanks Adam! If you have any questions on the code feel free to ask.

CreedyNZ
07-10-2016, 07:23 AM
Hi
After many months forced absence from robot building due to work commitments, today I finally got back into the getting JimBob mobile again. Having been impressed by your work on Golem for some time, I thought I'd give your Hexapod ROS stack a go on my PhantomX.

All when smoothly for a first day's effort - JimBob is fully mobile again powered by ROS running on my RPi2. Thanks for sharing the code.

Still to do is getting the sound working, but more importantly proper navigation. I don't have a depth sensing camera, but I do have a Neato XV11 lidar, which I managed to get working again today and produced some rudimentary maps.

Do you think it's practical to use something like Hector Slam (which I know will run with the XV11) in conjunction with your Hexapod stack or better to reconfigure the navigation code in your Hexapod ROS stack to use the laserscan data directly rather than from a 3D camera image? Maybe someone has already done this?

Alternatively, am I better to get spend authority from the boss for a primesense or Xtion etc?

Any advice greatly appreciated.

KevinO
07-12-2016, 11:39 AM
Which version of ROS are you using? Indigo? I'm currently creating a branch for Kinetic and was curious if you found any issues. You don't really need Hector Slam although feel free to use it. It is pretty simple to reconfigure to laser scan in the current stack.

CreedyNZ
07-12-2016, 01:52 PM
Currently using Indigo with no problems found so far. Hector mapping is working for me now, but I'll have a go at reconfiguring the current stack to use the laser scan - I just got a bit lost on what to do with the RTABMAP without a Kinect like camera? Revert to gmapping maybe? I'll experiment over the next few days. Sound is working now too.

KurtEck
07-12-2016, 02:01 PM
FYI - I installed Ubuntu 16.04 on an Odroid Xu4 and then install Ros Kinetic on it. I also downloaded my fork of the hexapod_ros code and I was able to build the whole thing. I did have to download the sources for sound_play as that did not appear to be available.

I have not tried running it yet. To busy with other things, like Teensy 3.5 testing...

CreedyNZ
08-07-2016, 05:35 AM
Currently using Indigo with no problems found so far. Hector mapping is working for me now, but I'll have a go at reconfiguring the current stack to use the laser scan - I just got a bit lost on what to do with the RTABMAP without a Kinect like camera? Revert to gmapping maybe? I'll experiment over the next few days. Sound is working now too.

Managed to find some time over the weekend so had a go at getting RTABMAP going on my Hexapod with a PrimeSense I managed to get hold of. Things are sort of working, but still have a couple of unresolved problems.

The first is that although I'm getting nice looking laser scans and 3D images, I can't seem to produce a 2D map and/or map frame.
The second issue is the rolling Hexapod - I have no IMU so have tried to disable the relevant code, but now have this odd odom behaviour where the image of the hexapod in RVIZ slowly rotates and turns upside down.
Other transforms seem to work OK though, with the RVIZ model moving in sync with the real world.
Any suggestions on where to look next to try a resolve the mapping and rolling issues?

66496650

KevinO
08-07-2016, 10:36 PM
Managed to find some time over the weekend so had a go at getting RTABMAP going on my Hexapod with a PrimeSense I managed to get hold of. Things are sort of working, but still have a couple of unresolved problems.

The first is that although I'm getting nice looking laser scans and 3D images, I can't seem to produce a 2D map and/or map frame.
The second issue is the rolling Hexapod - I have no IMU so have tried to disable the relevant code, but now have this odd odom behaviour where the image of the hexapod in RVIZ slowly rotates and turns upside down.
Other transforms seem to work OK though, with the RVIZ model moving in sync with the real world.
Any suggestions on where to look next to try a resolve the mapping and rolling issues?

66496650


What packages did you disable? Or did you mean actual lines of code? It sounds like the kalman filter is still trying to do something. Not having a IMU will possibly cause issues. Although the odometry should be accurate for flat, smooth floors. Any sliding of the feet will cause it's position to be off without a IMU to compensate the odometry.

KevinO
08-07-2016, 10:41 PM
If you rviz screenshot is accurate it appears you are still using calculated odometry fused with IMU odometry. Switch your odometry mappings to rtab_map to calculated odometry.

Your fixed frame is also set to base_link it should be map.

CreedyNZ
08-08-2016, 05:32 AM
If you rviz screenshot is accurate it appears you are still using calculated odometry fused with IMU odometry. Switch your odometry mappings to rtab_map to calculated odometry.

Your fixed frame is also set to base_link it should be map.

Thanks Kevin,

I'll give your suggestions a try when I return home in a couple of days.

To disable the IMU functions I commented out the references to IMU in the launch files. I'll revert back to the original code as I may have introduced new problems by doing this?

I don't have a fixed frame map appearing in RVIZ, so haven't been able to set map as the fixed frame - part of my problem of the 2D map not being created maybe.

I'll let you know how things go.

Also just set up an XBox 360 controller which so far is working fine with minor changes to the urdf.

Andrew

KurtEck
08-23-2016, 11:34 AM
Quick note: I received my Up board and in between playing with Teensy beta stuff, I have installed Win10/Ubuntu 16.04 and have installed ROS Kinetec on it.

I created catkin_ws and under catkin_ws/src I git forked the hexapod_ros into it. I used the:
apt-get install ... steps in the readme file

And then did catkin_make. First failure was for Ros sound. So I git forked in the ROS project audio_common into my catkin/src directory.
I knew from before I did not need all of this, so I added some CATKIN_IGNORE statements.
[quote][email protected]:~/catkin_ws/src$ find | grep CATKIN_IGNORE
./audio_common/audio_play/CATKIN_IGNORE
./audio_common/audio_capture/CATKIN_IGNORE
[email protected]:~/catkin_ws/src$[/code]

Did catkin_make again failed in the gazebo ros control. Was able to fix by:

sudo apt-get install ros-kinetic-gazebo-ros-control
Now Catkin_make builds the whole thing. (You might want to add that one to readme)