Skip to content

Sensor_setup

Aniket Gupta edited this page Jul 30, 2025 · 4 revisions

Sensor Setup

IMU

We are using VN-100 mdoule

Hardware Setup - We connect the 5V output from the USB to the 5V input of the IMU. The ground lines are all connected together, including a branch to the GPS ground. The RX and TX lines between the IMU and GPS are connected. Additionally, the GPS PPS (Pulse Per Second) signal is connected to the IMU’s TimeSyncIn input. TimeSyncOut is disconnected.

Inside vectornav.yaml, in the BO1 settings change:

  • baud rate: 921600
  • asyncMode: 2
  • rateDivsor: 4

Ouster Lidar

πŸ”„ Update & Discovering the Sensor

After plugging in the Ouster:

avahi-browse -lrt _roger._tcp

This will help you identify the IP address of the sensor.


πŸ”Œ Network Interface Setup

Once the Ouster is plugged in:

  • It will appear as enx... in ifconfig, or check with:
nmcli connection show
  • Try pinging the hostname (replace with actual serial number on your Ouster):
ping os-<SERIAL_NUMBER>.local

Example result:

PING os-122145304889.local (<ouster_ip>)

🌐 Set a Static IP on Host (Jetson or PC)

sudo nmcli connection modify "Wired connection 1" ipv4.addresses 192.168.1.10/24 ipv4.method manual
sudo nmcli connection down "Wired connection 1"
sudo nmcli connection up "Wired connection 1"

You should now be able to:

  • Ping the Ouster at <ouster_ip>
  • Access its web UI by visiting: http://<ouster_ip> in a browser

πŸš€ Boost Network Buffer Size

sudo sysctl -w net.core.rmem_max=26214400
sudo sysctl -w net.core.rmem_default=26214400

Adjust the value to the maximum supported by your system.


πŸ”§ Hardware Configuration (Wiring)

Signal GPS Pin Ouster Pin
Ground GPS GND Ouster GND
UART NMEA GPS TX2 Ouster Multipurpose_IO
PPS Pulse GPS TP2 Ouster sync_in

πŸ› οΈ Ouster Config UI Settings

Set the following values in the web interface:

  • Timestamp Mode: TIME_FROM_SYNC_PULSE_IN
  • Multipurpose IO Mode: INPUT_NMEA_UART
  • NMEA Baud Rate: BAUD_115200

Click Apply Config, and if everything is working, click Persist Active Config.


πŸ§ͺ Testing in ROS 2

Run:

ros2 topic echo --field header.stamp /ouster/points

If properly synced with GPS, you should see epoch timestamps:

---
sec: 1749413166
nanosec: 188819712
---
sec: 1749413166
nanosec: 288812288
---
sec: 1749413166
nanosec: 388752128

⚠️ Without a GPS fix, the timestamps may default to a PTP clock or a large meaningless value (often interpreted as 1969-12-31).


FLIR Cameras

πŸ“₯ Download Spinner SDK (Ubuntu 22.04, ARM64)

Manually download the Spinner SDK for Linux Ubuntu 22.04 (ARM64) from the FLIR website. This would require making an account. Otherwise ask either Aniket or Andrew for the downloaded binaries.

During installation, make sure to:

  • βœ… Add your user to the flirimaging group
  • βœ… Set USB FS memory to 1000MB
  • βœ… Add Examples to PATH
  • βœ… Register the GenTL producer

This should be straightforward as these are the default options.

Then:

sudo reboot

Use the SpinView GUI tool (included with the SDK):

spinview

You should be able to see and interact with the camera and also get their serial numbers.


πŸš€ ROS 2 Camera Driver Launch

Navigate to the launch file and update the serial numbers in line 37.

/spinnaker_synchronized_camera_driver/launch/follower_example.launch.py

Run the launch command:

ros2 launch spinnaker_synchronized_camera_driver follower_example.launch.py
  • Changing the camera ID in the launch file should be sufficient to start streaming.
  • Other parameters (e.g., exposure, gain, frame rate) can be modified if needed.

πŸ› οΈ Troubleshooting

Issue: Log shows very large or very small gain values
Fix: Reset the camera configuration in SpinView.

  1. Open spinview
  2. Select your camera
  3. Go to User Device Control
  4. Click Load Default
  5. Execute both default load commands

UBlox GPS

βš™οΈ GPS Configuration with U-Center

Tool Used: U-Center v25.03 (Windows only). For Linux, PyGPSClient can also be used.

  1. Run U-Center as Administrator
  2. Connect to your GPS device
  3. Navigate to:
    View β†’ Generation 9 Configuration View β†’ Advanced Configuration
    

⏱️ Time-Pulse (TP) Configuration

Set these parameters under CFG-TP.
After each setting change, click:

  • βœ… Set in RAM
  • βœ… Set in BBR
  • βœ… Set in Flash

πŸ”§ TP1 (1Hz Yellow LED)

Parameter Value
CFG-TP-TP1_ENA 1
CFG-TP-USE_LOCKED_TP1 0
CFG-TP-PERIOD_TP1 1000000
CFG-TP-LEN_TP1 50000
CFG-TP-ALIGN_TO_TOW_TP1 1 (default)
CFG-TP-POL_TP1 1 (default)
CFG-TP-TIMEGRID_TP1 1 (default)

πŸ”§ TP2 (20Hz Green LED)

Parameter Value
CFG-TP-TP2_ENA 1
CFG-TP-USE_LOCKED_TP2 0
CFG-TP-PERIOD_TP2 50000
CFG-TP-LEN_TP2 25000
CFG-TP-ALIGN_TO_TOW_TP2 1 (default)
CFG-TP-POL_TP2 1 (default)
CFG-TP-TIMEGRID_TP2 1 (default)

βœ… After all are set, click Send config changes
β†’ You should now see:

  • Yellow LED blinking at 1Hz (PPS)
  • Green LED blinking at 20Hz (NMEA)

πŸ“‘ UART2 (NMEA Serial) Configuration

πŸ”§ CFG-UART2

  • CFG-UART2-BRAUDRATE: 115200

πŸ”§ CFG-UART2INPROT

  • Set all inputs to 0 (UART2 will not be used for input)

πŸ”§ CFG-UART2OUTPROT

  • Set only: NMEA = 1

πŸ”§ CFG-NMEA

  • CFG-NMEA-MAINTALKER = 1 β†’ GP (default talker ID)

πŸ”§ CFG-MSGOUT: NMEA Sentence Selection

Enable only the following NMEA messages on UART2:

Message Value
CFG-MSGOUT-NMEA_ID_GGA_UART2 1
CFG-MSGOUT-NMEA_ID_GSA_UART2 1
CFG-MSGOUT-NMEA_ID_GSV_UART2 1
CFG-MSGOUT-NMEA_ID_RMC_UART2 1

πŸ”‡ Disable the rest (e.g., GLL, VTG, ZDA)


πŸ§ͺ Testing GPS NMEA Output

πŸ”Œ Wiring

GPS Pin Jetson Pin Description
GND PIN 6 Ground
TX2 PIN 10 UART RXD

πŸ–₯️ Test with minicom

sudo apt install minicom
ls -l /dev/ttyTHS*       # should be /dev/ttyTHS1
sudo minicom -b 115200 -D /dev/ttyTHS1

Expected output (1Hz NMEA):

$GPRMC,200737.00,A,4220.24878,N,07105.24422,W,0.019,,080625,,,A,V*1C
$GPRMC,200738.00,A,4220.24880,N,07105.24416,W,0.028,,080625,,,A,V*11
$GPRMC,200739.00,A,4220.24882,N,07105.24411,W,0.082,,080625,,,A,V*15

Each line updates every second if GPS is functioning correctly.


Doodle Labs Radio

πŸ–₯️ Static IP Configuration on Jetson

Go to:

Settings β†’ Network β†’ USB Ethernet (click βš™οΈ gear icon) β†’ IPv4

Set the following manually:

Method: Manual

Addresses:

Address 1

  • IP Address: 10.19.30.X (choose X based on payload)
  • Netmask: 255.255.255.0
  • Gateway: 10.19.30.1

Address 2

  • IP Address: 10.223.100.100
  • Netmask: 255.255.0.0

DNS: 10.19.30.1


🌐 Doodle Labs Web UI Setup

  1. Open browser and go to:
    http://<IP_LISTED_ON_DOODLE_LABS_RADIO>

  2. In the web UI:

    • Click on the three-dot menu β†’ Settings
    • Go to Simple Configuration
  3. Apply the following settings:

Option Value
DHCP/br-wan Disabled
Number of devices 6–10
MeshID mini-mesh
Password minimesh

⚠️ Browser Issues (Firefox/Chromium)

Once connected to the Doodle Labs mesh network and with static IP set, you may run into security or certificate errors in browsers like Firefox or Chromium.

Even though Jetson has internet access (you can ping google.com), browser access may be restricted due to snap-related policies or SELinux.

Fix:

sudo snap revert snapd   # If you encounter SELinux or snap confinement errors
Clone this wiki locally