107-systems / l3xz-hw-pan-tilt-head

This repository contains the design files for L3X-Zs pan/tilt colour/thermal camera head.
Creative Commons Attribution 4.0 International
0 stars 2 forks source link

[Feature Request] Design for new pan/tilt head #3

Closed aentinger closed 1 year ago

aentinger commented 1 year ago

⚡ Feature Request

For vision L3X-Z uses a pan/tilt head consisting of two Dynamixel MX-28AR with 2 x OpenMV OpenMV Cam H7 R2 cameras, one of those with a FLIR Lepton for thermal vision instead.

The camera holder is a simple 3D printed part which is mouted on the Dynamixel MX-28AR servo via screws/nuts.

All design files are contained within cad/pan_tilt_head.

Please Describe The Problem To Be Solved

In order to reduce cabling and processing requirements on the robots main control computer a Raspberry Pi Zero 2W stacked with Waveshare PoE/USB HAT will be mounted directly on the sensor head. The cameras will directly be connected to the USB Hub part of the HAT while the HAT itself will be connected to L3X-Zs PoE switch. Both communication and power will be supplied via the Ethernet connection - only a single cable connecting the robots head with the body will be necessary.

Therefore there's the need to design (or several) 3D printed parts allowing sensible mounting of both cameras as well as the computer/connectivity stack onto the back of the tilt Dynamixel MX-28AR servo.

scottdarch commented 1 year ago

Why a wireless version of the Pi Zero?

scottdarch commented 1 year ago

Also, if reducing wire-weight is a concern then is 8-wire ethernet really going to help?

aentinger commented 1 year ago

Why a wireless version of the Pi Zero?

You are right, the wireless functionality will go unused. However, the issue is that currently it seems to be impossible to purchase any Raspberry Pi Zero (or W or 22) anywhere. Since @generationmake got one lying around a Raspberry Pi Zero W is what we are going to use (Bernhard, correct me if you've got another Raspberry Pi Zero type).

Also, if reducing wire-weight is a concern then is 8-wire ethernet really going to help?

I think I mis-represented this. It's not about wire-weight but about reducing the total number of wires. And of course USB is a shitty bus for any challenging requirement.

scottdarch commented 1 year ago

Can you point me to the (manufacturer) part numbers for the pan/tilt servos and hardware? I only saw the servo listing for the "hip" rotation on the front page.

scottdarch commented 1 year ago

I see the two cameras are different sensors so I'm assuming this is not a stereo vision pair?

scottdarch commented 1 year ago

Putting all the compute out on the end of the pan/tilt fixture is a lot of weight to be swinging around. How about a design where just the OpenMP modules are out there (like you have today) but the PI is somewhere nearby like over the panning motor (i.e. centimeters from the sensors)?

aentinger commented 1 year ago

Can you point me to the (manufacturer) part numbers for the pan/tilt servos and hardware? I only saw the servo listing for the "hip" rotation on the front page.

Yes of course. The servo model of the pan/tilt servos is the same as of the hip servo: Dynamixel MX-28AR. Here you can STEP files - although they might be already checked into this repository.

I see the two cameras are different sensors so I'm assuming this is not a stereo vision pair?

Yes, you are right :wink: It's not stereo vision. One is for colour, the other one for thermal vision (a FLIR Lepton is mounted instead of a colour camera). So changing the distance between the cameras is possible, although we should try to keep it compact in terms of length as otherwise we unnecessarily constrain the range of motions, as the camera head might collide with the forward legs.

Putting all the compute out on the end of the pan/tilt fixture is a lot of weight to be swinging around. How about a design where just the OpenMP modules are out there (like you have today) but the PI is somewhere nearby like over the panning motor (i.e. centimeters from the sensors)?

It's a good point, but not really an issue. The servos are high powered (they drive the hip joints after all) and the weight is negligible.

Also here are a couple of images of the Raspberry HAT stack with Raspberry Pi Zero W (It's confirmed now, @generationmake brought it by yesterday). The headers are mounted so that might be needed to take into consideration during design.

IMG_20221202_074655_478

IMG_20221202_074713_964

IMG_20221202_074722_027

thirtytwobits commented 1 year ago

Do we have step files fort the POE hat?

aentinger commented 1 year ago

I've got none at hand, but I haven't checked yet if the manufacturer provides any. Will do that by Monday.

scottdarch commented 1 year ago

I measure about 220deg of motion available for this assembly. Can you confirm this value?

scottdarch commented 1 year ago

Does the FLIR sensor need an opening for the lens or can it image through some amount of plastic? It might be nice to design this without an opening to reduce FOD clocking up that lens.

scottdarch commented 1 year ago

FYI, this is my go-to material for FFF printing mechanical parts: https://www.prusa3d.com/product/prusament-pc-blend-carbon-fiber-black-800g-2/ and I'll be designing for this material. It's easy to print if you have an enclosure and hardened nozzle. Just print with about 30C ambient in the enclosure and anneal if the part will be in contact with hot surfaces.

aentinger commented 1 year ago

I measure about 220deg of motion available for this assembly. Can you confirm this value?

I am currently on away-from-robot so I can't guarantee a 100% but 220° of motion with a FR07-H101 bracket sounds about right 👍

aentinger commented 1 year ago

Does the FLIR sensor need an opening for the lens or can it image through some amount of plastic?

Yes, it needs a hole. There are IR transparent plastics but nothing that can be printed via 3D printer (to the best of my knowledge). @wuehr1999 do you know more about this?

aentinger commented 1 year ago

FYI, this is my go-to material for FFF printing mechanical parts: https://www.prusa3d.com/product/prusament-pc-blend-carbon-fiber-black-800g-2/ and I'll be designing for this material.

@wuehr1999 is this printable with your printer? I can order the referenced material and have it delivered to you, if needed.

wuehr1999 commented 1 year ago

Hi @aentinger, I don't know any filament, that would be suitable for the camera hole. I checked the parameters of the FFF prusament, and the parameters seem to fit for my 3D-printer. I think we should try it out.

scottdarch commented 1 year ago

I can continue with the rPI+PoE solution requested here but I don't think this is a great solution for a few reasons:

  1. It's really quite big. It add 65 cm3 on top of the raspberry pi zero and requires eight 28AWG wires
  2. it relies on pogos and test points. You are relying on the stiffness of the FR4 and the robustness of springs in the pogos to keep your Pi powered through jostles and tumbles.
  3. A lot of the additional size is going to adding USB ports that you don't want.
  4. You can't buy replacements parts. There are no rPi 2 Zero units in stock on this planet (except for scalpers on eBay)

I more elegant solution would be to use 100BaseT1 with PoE but I don't see anything ready-made that supports that. For four wires you could use 100BaseT1 + power which is going to be less wires and overall wire-weight than 8-wire ethernet. For that I see our friends at NXP have something quite nice: https://www.nxp.com/products/interfaces/ethernet-/automotive-ethernet-phy-transceivers/ethernet-media-converter-for-drones-rovers-mobile-robotics-and-automotive:RDDRONE-T1ADAPT.

Another option is the Banana Pi BPI-P2 with PoE which is implemented within 51 cm3. You still get 1000BaseT with this solution but you are back to 8 wires and you are dealing with a less-well-known AllWinner H2 SoC. One upside is you can actually buy the Banana Pi these days which is more then we can say for the rPi zero. If your Zero dies you are dead in the water, no?

Finally, if your requirements are to process all the big data on a linux computer then exchange Cyphal messages with a central computer you might not need ethernet at all? You could simply use CAN + power to an SBC and then your options really open up. For example, using https://www.newark.com/beagleboard/bb-pocket/pocket-beagle-board-arm-cortex/dp/45AC6372 and developing a CAN cape with power conditioning you could get a solution within 7 cm3.

scottdarch commented 1 year ago

Here's my first take on a rough position for the components using the pi zero + PoE:

pan-tilt_2022-Dec-04_09-47-10PM-000_CustomizedView10597155707

This configuration probably doesn't give you the full 220º of movement as show here:

61ae2bf7-9564-4b5e-accc-c138fb4a8fc8

I need the CAD files for the deck the pan servo is attached to so I can optimize to provide the full range of motion available.

aentinger commented 1 year ago

Between 2 days ago and today the recommended Prusament PC Blend Carbon Fiber Black 800g seems to have run out of stock (I just wanted to place the order). I've requested notification upon re-availability. @scottdarch can you recommend a replacement filament? Alternately we could just wait it out, as we are not operating under a tight time table yet. Opinions?

It's really quite big. It add 65 cm3 on top of the raspberry pi zero and requires eight 28AWG wires

Agreed. Still it as about the smallest COTS solution that was known to me at that point in time. One could also take a Arduino Portenta X8 and design a shield having both USB and Ethernet (as well as PoE) that's connected to the boards high-density connectors. That would result in a v e r y small formfactor but requires quite some effort in hardware design. I'm not its worth the trade-off right now, as there's a number of hardware designs that we really need (radiation sensor, power distribution blocks, RS485 power bridge, etc.) vs. one that's just convenient.

it relies on pogos and test points. You are relying on the stiffness of the FR4 and the robustness of springs in the pogos to keep your Pi powered through jostles and tumbles.

Agreed, this is not that great.

A lot of the additional size is going to adding USB ports that you don't want.

This I don't understand. I need two additional USB ports to connect to the cameras and the USB Hat of the stack provides three. Going one step further we would not need USB at all, since we could just design a custom PCB connecting to a camera via MIPI and to the FLIR via SPI (both available on the X8's high density connectors). Alas, that's even more firmware, software and hardware design that's currently (and for the foreseeable future) not on the critical path.

You can't buy replacements parts. There are no rPi 2 Zero units in stock on this planet (except for scalpers on eBay)

True. Component shortage sucks 🤷 . I got one other replacement part currently soldered in somewhere.

That being said the main purpose of the SBC connected to the cameras is to run the ROS driver for the cameras. Via its Ethernet connection it will stream those video feeds (via a PoE-Switch) to the WiFi modem which in turn will beam them to the base station. Re Banana Pi BPI-P2 Zero - it does have only one USB port.

If you are able to drum up someone doing a custom PCB board design (on a voluntary basis via open-source tooling) to create a really small camera head package based on the Arduino Portenta X8 I'll do the software 😁 . Such a design would also be my imagined final state of a nimble, yet capable camera head. Alas, I did not see it room for it on L3X-Zs roadmap for some time (lack of engineering ressources really).

aentinger commented 1 year ago

I need the CAD files for the deck the pan servo is attached to so I can optimize to provide the full range of motion available.

CAD files for the bottom plate are here, here and here :bow: .

scottdarch commented 1 year ago

I'll just respond in this issue from now on to avoid two conversations between github and element.

can you recommend a replacement filament?

Yeah. PRUSA is always running out of that filament so I use this one in a pinch: https://www.amazon.com/gp/product/B074DS3986 . The inter-layer adhesion isn't as good as a prusment but it does the job. Alternatively you can just print PLA dimensional models and when we have a design we like I'll print and ship the parts. Polycarbonate can be tricky to print.

Arduino Portenta X8

Holy shit. I didn't know there was an i.MX8 Arduino! That is a really killer dev board.

I need two additional USB ports to connect to the cameras and the USB Hat of the stack provides three. Going one step further we would not need USB at all, since we could just design a custom PCB connecting to a camera via MIPI and to the FLIR via SPI (both available on the X8's high density connectors)

I was assuming you were going to use MIPI. I understand now but the USB micro A connectors on the camera modules are a nightmare mechanically. Sometimes I just de-pop USB-micro on dev kits and solder a wire harness right to the pads; a bit of epoxy, and you don't have to worry about micro A's falling out or ripping the pads off of your PCB.

aentinger commented 1 year ago

Holy shit. I didn't know there was an i.MX8 Arduino! That is a really killer dev board.

It is :grin:

Sometimes I just de-pop USB-micro on dev kits and solder a wire harness right to the pads; a bit of epoxy, and you don't have to worry about micro A's falling out or ripping the pads off of your PCB.

What you think @generationmake, would this be within your soldering skills? (Actually I'm quite sure it is, just asking to be 100% :wink: ). Truth be told, one of the micro-usb connectors has already become partially unglued due to mechanical stress on the connector.

scottdarch commented 1 year ago

Parts are tricking in!

IMG_4103

So, when I add in the deck plates I see you are only getting about 79º side-to-side.

pan-tilt_2022-Dec-09_05-44-12AM-000_CustomizedView8403879300

What are your requirements for up and down? Do you need to look straight up? What about straight down?

aentinger commented 1 year ago

Hi Scott ☕ 👋

I love it! (especially the 3D printed Dynamixel - I forgot to mention that I'm registered with Dynamixel and I get a percentage off the store announced price, in case you'd want to get a real one (or real ones). However, even after discount they are still expensive).

Likely there's going to be even less than +/- 79° for pan due to the cameras.

For tilt: Since the robot is close to the ground its more important to be able to look up. If you can look 45° down I'd vote that sufficient. Right now I believe its possible to look both vertically up and down, although I am (once more) away from robot, to be able to check manually.

scottdarch commented 1 year ago

b7caa301aa1c7ee3e21821d81dc1ed903e680882

Looks like image of last year's event has a much higher upper deck then you have in your freecad document. What's the height that you want here?

Also, what are the FOVs for either camera?

scottdarch commented 1 year ago

FYI: https://rpilocator.com/

aentinger commented 1 year ago

Hi Scott ;) that's a useful website to know, thank you.

As for the distance I believe it to be 50mm but I'll doublecheck in around 24hrs when I'll be back from a trip.

aentinger commented 1 year ago

Looks like image of last year's event has a much higher upper deck then you have in your freecad document. What's the height that you want here?

The dimension is 70 mm.

Also, what are the FOVs for either camera?

For the colour camera: (Source)

For the thermal camera:

scottdarch commented 1 year ago

V1 design complete. Test prints and assembly ongoing...

Big Rig v10

aentinger commented 1 year ago

V1 design complete. Test prints and assembly ongoing...

Love the design 👍 everyone's other opinions that I sampled was equally positive 😁

scottdarch commented 1 year ago

Totally forgot to post the link. Sorry: https://a360.co/3jv3NId

aentinger commented 1 year ago

https://a360.co/3jv3NId

Terrific! One question that I had from looking at the design: why is the thermal imaging set back vs the colour camera?

scottdarch commented 1 year ago

why is the thermal imaging set back vs the colour camera?

I've placed the focal point of of each lens at the pivot point, at least mostly (I eyeballed it). The optical camera's focal point is further forward since it has a greater focal length. There are solids in the model for each camera's FOV so I'm confident there are no obstructions from the structures.

aentinger commented 1 year ago

Thanks for the clarification :wink: :bow:

aentinger commented 1 year ago

Also I had been thinking: This repository has become an unfocused storage location of various different hardware related files. How about relocating all files related to the new pan/tilt head into a dedicated repository, i.e. l3xz-hw_pan_tilt_head?

scottdarch commented 1 year ago

How about relocating all files related to the new pan/tilt head into a dedicated repository, i.e. l3xz-hw_pan_tilt_head

sure.

Test prints are going well. The tilt head is working just like I thought it would. The one error in my design is the panning. I was trying to get 140º of panning but, after adding the mechanical parts for vibe-mounting and fine-tuning the camera position I ended up with a measly 90º of panning:

v1 top

I've designed a longer neck version that gets us back up to 130º:

v1 longneck

... but it's a bit awkward looking. Not sure how you feel about it.

The other solution is a bit more radical; would you be open to changing the laser-cut decks to extend out the aluminum super-structure to move the pan servo out and under the tilt servo? For example:

v2 bottom

This would give you a huge range of motion increase and the Dynamixel brackets support stacking the servos (https://www.robotis.us/fr07-x101k-set/#gallery-2)

The other question would be the lidar and if the cameras would be in the way in this new configuration:

v2 side

aentinger commented 1 year ago

Thank you very much for the update :wink: Love all those rendered images :rocket:

The other solution is a bit more radical; would you be open to changing the laser-cut decks to extend out the aluminum super-structure to move the pan servo out and under the tilt servo?

To be honest, I'd rather avoid it. It would cost north of 300 € and would require to fully disassemble and reassemble the whole robot (that's what's really scaring me right now). I have a complete re-design touching everything on my roadmap, but only after ENRICH 2023.

aentinger commented 1 year ago

Forgot to mention that the longer neck does not bother me design-wise :wink:

scottdarch commented 1 year ago

First test assembly complete.

IMG_4147

aentinger commented 1 year ago

This looks delightfully sophisticated! 🙇 😄

scottdarch commented 1 year ago

I'm calling the mechanical design good now. I'm just working on the wiring. I have some shorter 90-deg USB cables on order.

IMG_4165

I'll try to get the design files merged into git this weekend.

aentinger commented 1 year ago

I love it =) Looks extremely cool =)

aentinger commented 1 year ago

Closed via #4.