Commit d767847d authored by Alex Kushleyev's avatar Alex Kushleyev
Browse files

update readme

parent dd9afb9e
Pipeline #241438164 passed with stage
in 1 minute and 4 seconds
......@@ -2,7 +2,7 @@
Hal3 Tof app that gets RAW TOF data from the camera module. The app then calls the PMD libs to do the post-processing of the RAW data. The post-processed data like IR Image, Depth Image etc is published to ROS topics that can be viewed using the RViz tool.
## Build sample project:
## Build the project using `voxl-emulator`:
- Clone project:
......@@ -39,51 +39,73 @@ This will generate a binary in "devel/lib/voxl_hal3_tof_cam_ros/voxl_hal3_tof_ca
./install_on_voxl.sh
```
## Visualization
### On VOXL
## Build and install the project on VOXL:
```
# view network information
ifconfig
bash
mkdir -p /home/root/git
cd /home/root/git
git clone https://gitlab.com/voxl-public/voxl-hal3-tof-cam-ros.git
cd voxl-hal3-tof-cam-ros
./build.sh
./make_package.sh
opkg install ./voxl-hal3-tof-cam-ros_0.0.3.ipk
```
- This will give you the IP address of the VOXL
## Run TOF Application on VOXL
### Determine VOXL IP Address
- For WiFi setup, instructions found [here](https://docs.modalai.com/wifi-setup/)
- Run `ifconfig` in a terminal
- Check `inet addr` value for `wlan0` (if using wifi), this will give you the IP address of VOXL
- `hostname -i` also works
```
export ROS_IP=IP-ADDR-OF-VOXL
### Start TOF ROS Node
- If needed, open a new terminal on VOXL (use adb or ssh)
- Make sure your terminal is using bash (when in doubt just run `bash` after opening the terminal)
- Identify the correct camera ID to use for TOF sensor
- For camera-id please check [here](https://docs.modalai.com/camera-connections/#configurations)
- Export TOF_CAM_ID in your environment before running the TOF application, for example
- e.g. `export TOF_CAM_ID=1`
- starting with release 0.0.3, you can choose to autodetect TOF camera id
- `export TOF_CAM_ID=-1` will tell the application to attempt to autodetect TOF camera id
- By default all outputs are enabled i.e. IR-Image, Depth-Image, Point-Cloud (see `tof.launch`)
- When running package installed to /opt/ros/indigo use:
```
bash
export ROS_IP=`hostname -i`
export TOF_CAM_ID=-1
source /opt/ros/indigo/setup.bash
roscore &
roslaunch /opt/ros/indigo/share/voxl_hal3_tof_cam_ros/launch/tof.launch
```
- This will print a line that should read something like this: `ROS_MASTER_URI=http://AAA.BBB.CCC.DDD:XYZUV/`
- The http address will be different
### On Desktop
- When running a custom build of the package use (assuming it's in `/home/root/git/voxl-hal3-tof-cam-ros`):
```
# view network information
ifconfig
bash
export ROS_IP=`hostname -i`
export TOF_CAM_ID=-1
cd /home/root/git/voxl-hal3-tof-cam-ros
./clean.sh
./build.sh
source ./devel/setup.bash
roslaunch ./source/launch/tof.launch
```
- This will give you the IP address of the PC
```
export ROS_IP=IP-ADDR-OF-PC
export ROS_MASTER_URI=http://AAA.BBB.CCC.DDD:XYZUV/
```
## Visualization
- The ROS_MASTER_URI is what you saw on the VOXL when you ran `roscore &` in the above step
### On VOXL
- Run the launch file per instructions above
- Use the VOXL ip address to determine `ROS_MASTER_URI=http://<voxl-ip>:11311/`
### On Desktop
- Determine IP address of the machine using `ifconfig`
```
source /opt/ros/xxxxx/setup.bash
bash
export ROS_IP=IP-ADDR-OF-PC
export ROS_MASTER_URI=http://<voxl-ip>:11311/
source /opt/ros/<ros-version>/setup.bash
```
- xxxxxx is the ROS version you have installed
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)
......@@ -96,7 +118,6 @@ vi /home/xxx/.rviz/default.rviz
- Global Options:
- Fixed Frame: /base_link
```
rviz
```
......@@ -113,17 +134,3 @@ Start the `rviz` program on your desktop
- 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"
### On VOXL
- Identify the correct camera ID to use for TOF sensor
- For camera-id please check [here](https://docs.modalai.com/camera-connections/#configurations)
- export TOF_CAM_ID in your environment before running the TOF application, for example
- export TOF_CAM_ID=1
- Launch file `tof.launch` will read this environment variable and use to access appropriate camera id
```
roslaunch /opt/ros/indigo/share/voxl_hal3_tof_cam_ros/launch/tof.launch
```
- By default all outputs are enabled i.e. IR-Image, Depth-Image, Point-Cloud
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment