Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add selection based on serial_number + cleanup #12

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jtaveau
Copy link

@jtaveau jtaveau commented Jul 23, 2024

Hi,
This PR is meant to do few things:

  • Cleanup the overall package architecture, as I want to use the package in an existing workspace, not clone the entire catkin_ws
  • Fix building issues
  • Add the possibility to select cameras based on their serial number, which is easier and more scalable than defining a name for a camera

Other remark

I had to change a few things in the Arena_SDK_Linux_x64.conf, same goes for the Arm SDK, as I was getting issues with ffmpeg. Check this link.

#!/bin/bash

CURRENTDIR=${PWD}
CONF_FILE=Arena_SDK.conf

echo
echo "Arena SDK configuration script"
echo "Usage: Arena_SDK_Linux_x64.conf [-r] [-cti]"
echo "-r: Remove existing $CONF_FILE before add new paths"
echo "-cti: Append GENICAM_GENTL64_PATH environment variable to /etc/environment"
echo

if [ "$1" = "-r" ]; then
    echo "Removing existing $CONF_FILE"
    sudo rm -f /etc/ld.so.conf.d/$CONF_FILE
    echo
fi

if [ "$1" = "-cti" ]; then
    echo
    echo "Appending the GenTL .cti environment variable to /etc/environment:"
    echo
    sh -c "echo GENICAM_GENTL64_PATH=$GENICAM_GENTL64_PATH:$CURRENTDIR/lib64 >> /etc/environment"
    echo "GENICAM_GENTL64_PATH=$GENICAM_GENTL64_PATH"
    echo
    echo "Please reboot PC before run .cti"
    echo
fi

echo "Adding the following Arena SDK library paths to /etc/ld.so.conf.d/$CONF_FILE:"
echo
echo "$CURRENTDIR/lib64"
echo "$CURRENTDIR/GenICam/library/lib/Linux64_x64"
echo "/usr/lib/x86_64-linux-gnu"

sh -c "echo $CURRENTDIR/lib64 > /etc/ld.so.conf.d/$CONF_FILE"
sh -c "echo $CURRENTDIR/GenICam/library/lib/Linux64_x64 >> /etc/ld.so.conf.d/$CONF_FILE"
sh -c "echo /usr/lib/x86_64-linux-gnu >> /etc/ld.so.conf.d/$CONF_FILE"

echo "Installing runtime dependencies"
sudo apt-get -y install libibverbs1 librdmacm1

echo
echo "Please remember to install these packages if not already installed before proceeding:"
echo "- g++ 5 or higher"
echo "- make"
echo

ldconfig

Something that could be nice is a script installing the SDK under /opt/arena, not lying in ~/Downloads, and one last thing, is there a link to download directly the SDK to be able to use wget in my install script?

@jtaveau jtaveau changed the title Cleanup Add selection based on serial_number + cleanup Jul 23, 2024
@jtaveau
Copy link
Author

jtaveau commented Aug 30, 2024

Hey @lucidvisionlabs, any time lines on the review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant