JanuszBedkowski / mandeye_controller

MIT License
25 stars 4 forks source link

mandeye_controller

Hardware documementation

3D Model

The source design is available on Onshape, and you can access it here.

The design files for 3D printing are available in the repository's 3mf directory. You can find the file ScannerAssembly.3mf containing the models to be printed.

For optimal results, we recommend printing the assembly with PLA. Don't forget to adjust the 3MF file according to your printer specifications. If you need assistance with this, consider including a brief guide or tips on printer adjustments.

Scanner Assembly

Additionally, we recommend printing a protective cap for Livox Mid-360, which you can find in the LivoxCap.3mf file.

Livox Cap

Feel free to reach out if you have any questions or need further assistance!

Bill of Materials

Click here to BIM

Bill of Materials

Wiring manual

Software

Update system

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential cmake git rapidjson-dev debhelper build-essential ntfs-3g libserial-dev

Static IP for eth0

sudo nano /etc/dhcpcd.conf

And add in the end:

interface eth0
static ip_address=192.168.1.5/24
static routers=0.0.0.0    

Clone and build app

git clone https://github.com/JanuszBedkowski/mandeye_controller.git
cd mandeye_controller
git submodule init
git submodule update
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4

Set USB mount

Follow manual for build and configuration of USB mount https://gist.github.com/michalpelka/82d44a21c29f34ee5320c349f8bbf683

cd /tmp
git clone https://github.com/rbrito/usbmount.git
cd usbmount
dpkg-buildpackage -us -uc -b
cd ..
sudo apt install ./usbmount_0.0.24_all.deb

Edit config sudo nano /etc/usbmount/usbmount.conf: by changing keys:

FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus ntfs fuseblk"
FS_MOUNTOPTIONS="-fstype=vfat,users,rw,umask=000 -fstype=exfat,users,rw,umask=000"
VERBOSE=yes

Install udev rules:

sudo mkdir /etc/systemd/system/systemd-udevd.service.d
sudo nano -w /etc/systemd/system/systemd-udevd.service.d/00-my-custom-mountflags.conf

and add content:

[Service]
PrivateMounts=no

Restart udev:

sudo systemctl daemon-reexec
sudo service systemd-udevd restart

Verify if usb mount works correclty:

touch /media/usb/test
tail -f /var/log/syslog

Setup systemctl for autostart

Create a file /usr/lib/systemd/system/mandeye.service with content. Note that you need to adjust your user's name:

[Unit]
Description=Mandeye
After=multi-user.target

[Service]
ExecStartPre=/bin/sleep 20
ExecStart=/home/robot/mandeye_controller/build/control_program
Restart=always

[Install]
WantedBy=multi-user.target

Next reload daemons, enable and start the service`

sudo systemctl daemon-reload
sudo systemctl enable mandeye.service
sudo systemctl start mandeye.service

You can check status of the service with:

sudo systemctl status mandeye.service