Skip to content

Tips and Tricks

Simeon ADEBOLA edited this page Dec 4, 2019 · 14 revisions

Updating to Latest Version

For Manual Installation:

  1. Follow instructions here if you want to backup current information for later restoration.

  2. Clone the repo:

    cd ~/workspace/ros/src
    git clone https://github.com/openptrack/open_ptrack_v2 open_ptrack

  3. Compile the project:

    rm -rf ~/workspace/ros/build/open_ptrack
    cd ~/workspace/ros
    catkin_make

Quitting a Process

ROS has many layers. Simply using Ctrl-c in a sensor window will often not stop a detection node entirely. Rather than rebooting to ensure a clean start, one may simply:

pkill -f ros; pkill -f nodelet; pkill -f XnSensor  

ROS Tricks

  • realtime parametric modification:

      rosrun rqt_reconfigure rqt_reconfigure
    
  • record detection and tracking messages:

      rosbag record -b0 /tf /detector/detections /tracker/tracks
    
  • record a given Kinect sensor:

      roslaunch opt_calibration sensor_<kinect_name>.launch
      rosbag record -b0 /tf <kinect_name>/depth_registered/image_raw <kinect_name>/depth_registered/camera_info <kinect_name>/rgb/image_raw <kinect_name>/rgb/camera_info <kinect_name>/depth_registered/disparity 
    
  • record a given Swiss Ranger:

      rosbag record -b0 /tf <swissranger_name>/confidence/image_raw <swissranger_name>/camera_info <swissranger_name>/pointcloud2_raw
    
  • playback a rosbag recording:

      rosbag play <filename>.bag
    
  • view all topics being published:

      rostopic list
    
  • view info of any rosbag:

      rosbag info <bag_name> 
    
  • fps of a given topic:

      rostopic hz /Kinect1/rgb/image_rect_color
    
  • view tracking broadcast / json data:

      roslaunch opt_utils udp_listener.launch
    
  • inspect each sensor’s detection:

      rostopic hz /<camera_name>/ground_based_people_detector_<camera_name>/detections
    

N.B.: It is also possible to subscribe to a detections topic, and then the Rviz view is correlated with a sensor by color. See Multi-camera Detection Visualization (below).

Multi-camera Detection Visualization

In order to make the debugging process easier for a multi-node system, visualizing the detections coming from every sensor is made possible with the ROS visualizer in the master node, or any PC in the network by running rosrun rviz rviz, then loading the appropriate Rviz file, as already done for tracking information. It is possible to visualize:

  1. markers showing the current detection positions from every camera;
  2. detection trajectories for every camera.

N.B.: Detections coming from different cameras are shown with different colors.

In more detail (see the image below as a reference):

  1. Press Add, then select MarkerArray, and press OK. Then, select/write in the Marker Topic field: /detector/markers_array. To inspect only the detections/markers coming from a specific camera, enlarge the Namespaces menu and then select only the camera/cameras of interest.
  2. Press Add, then select PointCloud2, and press OK. Then, select/write in the Topic field: /detector/history. Please note that the length of these trajectories depends on the detection_history_size parameter in the following file: https://github.com/OpenPTrack/open_ptrack_v2/blob/master/tracking/conf/tracker_multicamera.yaml.

Detection Bug

Backup/Restore Information (For Example to Download A New Branch/Update)

You may want to backup old information (e.g. calibration/refinement information or custom object templates) for restoring later.

For Manual Installation:

  1. To create the backup:
    mv ~/workspace/ros/src/open_ptrack ~/open_ptrack_tmp

  2. To restore the files:

    a. If you want to restore calibration information:
    cp -R ~/open_ptrack_tmp/opt_calibration/* ~/workspace/ros/src/open_ptrack/opt_calibration/

    b. If you want to restore object files:
    cp -R ~/open_ptrack_tmp/yolo_detector/* ~/workspace/ros/src/open_ptrack/yolo_detector/

  3. (optional) Remove the backup:
    mv ~/open_ptrack_tmp ~/.local/share/Trash/files/

For Docker Images:
This should be done on the host machine.

  1. To create the backup:
    mv ~/open_ptrack_docker_config/multi_camera_tracking/open_ptrack_config ~/open_ptrack_config_tmp

  2. To restore the files:

    a. If you want to restore calibration information:
    cp -R ~/open_ptrack_config_tmp/opt_calibration/* ~/open_ptrack_docker_config/multi_camera_tracking/open_ptrack_config/opt_calibration/

    b. If you want to restore object files:
    cp -R ~/open_ptrack_config_tmp/yolo_detector/* ~/open_ptrack_docker_config/multi_camera_tracking/open_ptrack_config/yolo_detector/

  3. (optional) Remove the backup:
    mv ~/open_ptrack_config_tmp ~/.local/share/Trash/files/

Setting Up an OpenPTrack v2 System:

Running OpenPTrack v2:

Tracking GUI

How to receive tracking data in:

  1. Tested Hardware
  2. Network Configuration
  3. Imager Mounting and Placement
  4. Calibration in Practice
  5. Quick Start Example
  6. Imager Settings
  7. Manual Ground Plane
  8. Calibration Refinement (Person-Based)
  9. Calibration Refinement (Manual)

OPT on the NVidia Jetson

Clone this wiki locally