LeKiwi camera config help

23 views
Skip to first unread message

Steve " 'dillo" Okay

unread,
Nov 23, 2025, 6:40:27 PM (9 days ago) Nov 23
to HomeBrew Robotics Club
I spent today buckling down on getting my LeKiwi install in shape. 
One issue is that the cameras are being enumerated wrong in the ReRun visualizer. The physical base camera(A Logitech WebCam) is being treated as the "wrist camera" and the physical wristcam is showing up as the logical base cam, but rotated 90-degrees clockwise. 

it's hard to tell if this is a ReRun config problem or one on the LeRobot side. There don't appear to be obvious config files where you set this or a specific tool to run in the LeRobot codebase. 
(Claude, et. al are also pretty useless here too.)

I mean, I guess I could write a udev rule to assign each camera to a given /dev/video* device, but that seems inelegant and I'm not sure how it would persist inside the LeRobot/ReRun systems either. 

I'm wondering if others here who've been working with the LeKiwi/LeRobot environment have run into this and what you did to fix it ? 

Thanks, 
'dillo

Marco Walther

unread,
Nov 23, 2025, 8:53:32 PM (9 days ago) Nov 23
to hbrob...@googlegroups.com, Steve " 'dillo" Okay
On 11/23/25 15:40, Steve " 'dillo" Okay wrote:
> I spent today buckling down on getting my LeKiwi install in shape.
> One issue is that the cameras are being enumerated wrong in the ReRun
> visualizer. The physical base camera(A Logitech WebCam) is being treated
> as the "wrist camera" and the physical wristcam is showing up as the
> logical base cam, but rotated 90-degrees clockwise.

Are both cameras 'USB web cams'? Potentially even the same models?

USB enumerations are not deterministic:-( So, the only way would be to
create additional symlinks:-(

You could try to switch the 'plug positions' and hope for the best:-(
>
> it's hard to tell if this is a ReRun config problem or one on the
> LeRobot side. There don't appear to be obvious config files where you
> set this or a specific tool to run in the LeRobot codebase.
> (Claude, et. al are also pretty useless here too.)
>
> I mean, I guess I could write a udev rule to assign each camera to a
> given /dev/video* device, but that seems inelegant and I'm not sure how
> it would persist inside the LeRobot/ReRun systems either.
>
> I'm wondering if others here who've been working with the LeKiwi/LeRobot
> environment have run into this and what you did to fix it ?
Sorry, no LeKiwi/LeRobot here:-(-- Marco
>
> Thanks,
> 'dillo
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> hbrobotics/4fde68ba-63d6-4212-acf0-035223ff7b00n%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/4fde68ba-63d6-4212-
> acf0-035223ff7b00n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Sergei Grichine

unread,
Nov 23, 2025, 9:30:11 PM (9 days ago) Nov 23
to hbrob...@googlegroups.com, Steve 'dillo Okay
Here is how to make USB links persistent:


I hope this helps with the cameras too.

Best Regards,
-- Sergei


To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hbrobotics/61dd0898-e0ee-40c7-a78c-a8a1699bfd54%40gmail.com.

Michael Wimble

unread,
Nov 23, 2025, 10:15:05 PM (9 days ago) Nov 23
to hbrob...@googlegroups.com
For identical devices, I try to plug them into different usb controllers. For a pi you could plug one into a usb2 port and the other into a usb3 port. Then you can write a udev rule using the bus number. In my opinion, udev rules should be used a lot, not avoided. Linux rules for naming devices are a problem to be avoided. I include udev rules in my GitHub.

Marco Walther

unread,
Nov 24, 2025, 12:17:49 AM (9 days ago) Nov 24
to hbrob...@googlegroups.com, Michael Wimble
On 11/23/25 19:14, Michael Wimble wrote:
> For identical devices, I try to plug them into different usb controllers. For a pi you could plug one into a usb2 port and the other into a usb3 port. Then you can write a udev rule using the bus number. In my opinion, udev rules should be used a lot, not avoided. Linux rules for naming devices are a problem to be avoided. I include udev rules in my GitHub.

For *identical* devices, my first preference of avoiding bus numbers and
socket positions does not work. But my Logitec web cam has at least a
serial number which could be used. I prefer vendor and device IDs,
something like

marcow@feather7:/etc/udev/rules.d$ cat 69-mw-serial.rules
ACTION=="add", KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0",
ATTRS{idProduct}=="0483", SYMLINK+="teensy32"
ACTION=="add", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403",
ATTRS{idProduct}=="6015", SYMLINK+="ublox_f10"

But overall, I think, the udev rules are a good way to create specific
devices names.

-- Marco

Steve " 'dillo" Okay

unread,
Nov 24, 2025, 12:34:47 AM (9 days ago) Nov 24
to HomeBrew Robotics Club
On Sunday, November 23, 2025 at 5:53:32 PM UTC-8 Marco Walther wrote:
On 11/23/25 15:40, Steve " 'dillo" Okay wrote:
> I spent today buckling down on getting my LeKiwi install in shape.
> One issue is that the cameras are being enumerated wrong in the ReRun
> visualizer. The physical base camera(A Logitech WebCam) is being treated
> as the "wrist camera" and the physical wristcam is showing up as the
> logical base cam, but rotated 90-degrees clockwise.

Are both cameras 'USB web cams'? Potentially even the same models?

No, one is a Logitech C920 webcam(The front camera) and the other is a IMX477 ArduCam-alike. 
 

USB enumerations are not deterministic:-( So, the only way would be to
create additional symlinks:-(

Yeah, it turns out it's not a system-level issue, but an application-level one.  
You can either hunt down what config file where has the camera config stored in it or use command-line arguments. 
I chose the latter because I really don't like the idea of code-as-config. 

LeRobot is structured around the idea of "robot" and "teleop", where the "robot" is the Follower/host and "teleop" is the Leader(and the system it's connected to). 
So my current workaround is:
python -m lerobot.teleoperate \
    --robot.type=lekiwi \
    --robot.port=/dev/ttyACM0 \
    --robot.id=neovenator \
    --robot.cameras="{ front: {type: opencv, index_or_path: "/dev/video2", width: 640, height: 480, fps: 30},wrist:{type: opencv, index_or_path: "/dev/video0", width: 640, height: 480, fps: 30} }"

Which is totally getting wrapped in a shell script or some other bit of Python, but that will do for now. 
'dillo

Nathan Lewis

unread,
Nov 24, 2025, 1:26:51 AM (9 days ago) Nov 24
to hbrob...@googlegroups.com
My pull request is languishing, but since one of your cameras is using the a CSI port, you could check out a modification I made to lerobot to enable the use of Pi cameras without the legacy camera stack.

I do need to rebase it though…


- Nathan
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.

Nathan Lewis

unread,
Nov 24, 2025, 1:30:13 AM (9 days ago) Nov 24
to hbrob...@googlegroups.com
Forgot to add, the reason I thought that might be relevant is that Pi camera enumeration is deterministic, and you’d use the opencv camera for the one usb camera.

- Nathan
Reply all
Reply to author
Forward
0 new messages