Web version: https://hackmd.io/@cocobird231/BkmIsPa5n
Updated: 2024/04/26
The package installer for sensor depends on NVIDIA Jetson.
System requirements:
- OS: Ubuntu 18.04 or higher (64-bit recommend)
- RAM: 4G or higher
Now supported sensor types:
- ZED stereo camera (the ZED and ZED X were tested)
- The ZED SDK 4.1 will be automatically downloaded and installed.
Run the pre-install script get-jetson-sensors-install.sh
to grab git controlled directory (renamed as jetson_sensors
). Make sure Jetson is connected to the internet before installation start.
curl -fsSL ftp://61.220.23.239/rv-12/get-jetson-sensors-install.sh | bash
The new directory jetson_sensors
will be created under $HOME
.
:::warning
The static_ip
option not support yet. Always set to dhcp
or ignore it.
:::
- Run the script
install.sh
underjetson_sensors
to install package for selected module.Select a number for module installation. ~/jetson_sensors/install.sh
- Determine the network interface and IP for program to execute.
- Reboot while installation finished. The program will be running at startup automatically.
- The installation will automatically detect version and install ROS2, then create ROS2 workspace under
$HOME/ros2_ws
. - The packages will be built and installed under
$HOME/ros2_ws
.
:::warning Effects After Installation
- Files Creation:
- Under
$HOME/jetson_sensors
run.sh.tmp
.modulename
(selected module pack name).moduleinterface
(interface setting).modulename
(IP setting)ros2_startup.desktop.tmp
(may be deleted)common.yaml
(linked to module package under ROS2 workspace)service.json
(linked to module package under ROS2 workspace)
- Under
$HOME/ros2_ws
build
install
log
src
- Under System Environment
/etc/xdg/autostart/ros2_startup.desktop
(startup file)
- Under
- Dependencies Installation
- Determined by
install_dependencies.sh
:::
- Determined by
- Run the script
install.sh
underjetson_sensors
directory and enteru
for update process.. install.sh # Enter 'u' for update process
- The update process will update
codePack
underjetson_sensors
by pulling repositories from git server. - After pulling, the module package will start rebuilding if module package had been installed before.
- Run the script
install.sh
underjetson_sensors
directory and enterr
for package remove process.. install.sh # Enter 'r' for update process
The files which describes under Effects After Installation section will be removed except the files installed from install_dependencies.sh
.
Settings may be varient in different sensors, but there are some common parameters need to be changed:
- Device node name (under
generic_prop
tag) - Device ID (under
generic_prop
tag) - Topic name (may be one or more)
- Publish interval (Need to be float, e.g. not
1
but1.0
)
Modify the settings under $HOME/jetson_sensors/common.yaml
and reboot device.
:::success
The install.sh
now supported parser installation. (2023/07/25)
:::
The package installation, updating and removal functions can be done by adding some arguments while running install.sh
.
. install.sh [[-i|--install] <package_name>] [--interface <network_interface>] [--ip [<static_ip>|dhcp]] [-rm|--remove] [-u|--update] [-p|--preserve]
- Command explanation
-i|--install
: install specific package from codePack to ROS2 workspace.-rm|--remove
: remove installed packages and environment settings.-u|--update
: update codePack without install packages.-p|--preserve
: preservecommon.yaml
file during installation.--interface
: determine the network interface during installation.--ip
: determine the network ip during installation.
- Variable explanation
- package_name: real package name under codePack. If variable set to
auto
, the process will automatically detect current installed module settings, then install the packages. - network_interface: the network interface to detect network or internet connection, e.g.
eth0
orwlan0
. - static_ip: the format should be like
ip/mask
, e.g.192.168.1.10/16
.
- package_name: real package name under codePack. If variable set to
:::info
- For Commands
The three commands -i
, -u
and -rm
can be work independently. The priority order of the three commands from high to low are: -rm
> -u
> -i
. That is, if three commands exists at the same time, the process will be:
- Remove installed packages, ROS2 workspace and environment settings.
- Update codePack without install any packages.
- Install packages from codePack to ROS2 workspace.
The flag -p
tells the installer to keep old common.yaml
file. If -p
set but -i
not set, the -p
will be ignored. If -p
set but the common.yaml
file not found, the preservation will be ignored.
The --interface
determines the network interface for network detection or internet detection while installed program startup. The --interface
will be ignored if -i
not set. The --interface
is not necessary and will be set to default eth0
.
The --ip
currently not support and will always set to dhcp
. The --ip
is not necessary and will be set to default dhcp
.
:::
:::warning
- For Variables
The default value of the variables describes as following:
package_name
:NONE
network_interface
:eth0
static_ip
:NONE
The package_name
is necessary if -i
set. The valid name of package_name
were shown under codePack. If the package had installed before, set package_name
to auto
is valid for process to auto detect the package name.
If package_name
set to auto
, the process will ignored --interface
and --ip
settings.
The network_interface
is necessary if --interface
set. The network_interface
do not have any valid check mechanism, be careful of the mistyping.
The static_ip
is necessary if --ip
not set to dhcp
. The static_ip
currently not support.
:::
- Install package
. install.sh -i <package_name> [--interface <network_interface>] [--ip [<static_ip> | dhcp]]
- Update codePack
. install.sh -u
- Update codePack then install package
. install.sh -i <package_name> [--interface <network_interface>] [--ip [<static_ip> | dhcp]] -u
- Update current package while preserve
common.yaml
. install.sh -u -i auto -p
- Remove current package
. install.sh -rm
- Remove current package, update codePack and install package
. install.sh -rm -u -i <package_name> [--interface <network_interface>] [--ip [<static_ip> | dhcp]]