VOXL ToF Sensor User Guide
Table of contents
Requirements
- VOXL or VOXL-Flight with VOXL System Image 2.3.0 or newer
- VOXL ToF Sensor (available here)
- Linux with Rviz
- Setup ROS on Host PC
- Setup ROS on VOXL
Hardware
- Ensure VOXL/VOXL-Flight is powered off
- Connect to VOXL/VOXL-Flight connector
J3
as shown
Guide
Below describes a method to quickly validate the hardware connections and system.
Connect to VOXL Over Wi-Fi
- Setup and connect VOXL/VOXL-Flight as an access point
- SSH onto the target:
ssh root@192.168.8.1
oelinux123
Start roscore on VOXL
On VOXL:
# view network information
ifconfig
- This will give you the IP address of the VOXL, configure ROS with this:
export ROS_IP=IP-ADDR-OF-VOXL
source /opt/ros/indigo/setup.bash
roscore &
- This will print a line that should read something like this: ROS_MASTER_URI=http://AAA.BBB.CCC.DDD:XYZUV/
- Note: The HTTP address will be different
Conifugre Cameras on VOXL
On VOXL:
- Ensure the environment variables are setup by runnin the following commands:
bash
setprop persist.camera.modalai.tof 1
voxl-configure-cameras
- Select the option that best fits your setup, For camera-id please check here
- Note: for standalone testing, you can select option 5
tof + tracking
- Note: for standalone testing, you can select option 5
- Update environment:
exec bash
Configure ROS On Desktop
On Linux desktop:
- Find IP address
# view network information
ifconfig
- Configure ROS environment variables, where the ROS_MASTER_URI is what you saw on the VOXL when you ran
roscore &
in the above step
export ROS_IP=IP-ADDR-OF-PC
export ROS_MASTER_URI=http://AAA.BBB.CCC.DDD:XYZUV/
- source variables, where xxxxxx is the ROS version you have installed
source /opt/ros/xxxxx/setup.bash
- The 2 transforms (for both laser scan and point cloud) are in the tof.launch file
- In RViz choose Fixed Frame toption as /base_link instead of map
- Open your .rviz file (by default in /home/xxx/.rviz/default.rviz)
vi /home/xxx/.rviz/default.rviz
- Change the “Fixed Frame:” option from “map” to “base_link”
- Global Options: Fixed Frame: /base_link
Launch ToF Node on VOXL
roslaunch /opt/ros/indigo/share/voxl_hal3_tof_cam_ros/launch/tof.launch
- Ensure the ROS node launches OK:
Launch RViz on Desktop
- On the host computer, run RViz
rviz
- On the leftmost column click on the “Add” button
- In the pop-up options click on “Image”
- Change Display Name to “IR-Image”
- In the left column under “IR-Image” tab select type in Image Topic as /voxl_ir_image_raw
- Click on the “Add” button again
- In the pop-up options click on “Image”
- Change Display Name to “Depth-Image”
- In the left column under “Depth-Image” tab select type in Image Topic as /voxl_depth_image_raw
- “Add” PointCloud2 with Topic as “/voxl_point_cloud”
- “Add” LaserScan with Topic as “/voxl_laser_scan”