Skip to content

Pose Tracking

banghajs edited this page Dec 11, 2019 · 8 revisions

Overview

-Pose Tracking has three distinct sections that are all exclusive. Only one would normally run at once. Without uncommenting some code this node will seemingly do nothing on its own as the initial_safety function will not run until told to over the /safety_constant topic by the client.

  • The initial_safety function looks for the rider to get into the cart and remain safely seated for an amount of time. After which it informs the client that the rider is safely seated and begins its standard safety_analysis function
  • The safety_analysis function looks for if the passenger is safely in the cart or not, how well this function works or not is to be seen as it was untested during the final demo because do to its inconsistency it was not allowed to stop the cart
  • The passenger_exit function is designed to watch if the passenger exits the vehicle after reaching the destination. This function as a whole was crashing and also when not crashing would never say the passenger exited so it has been temporarily disabled and replaced with a simple timed wait.

Dependencies

OpenPose

  • (This will be updated when somebody has a chance to go through it and record steps in detail but here is a general guide)
  • Follow the online guide for installing
  • Install for python in general and specifically version 2.7 (the python version ROS uses) in the CMAKE GUI
  • Install for CUDA in the CMAKE GUI
  • (Just google how to install openpose for python 2.7 and it should help).

Pip Installables

  • pip2.7 install --user
    • python-vlc
    • scikit-learn

Other

  • cv2
  • json
  • pickle

Launching Pose Tracking

  • This node is much more complicated in terms of its launching and configuration so please make sure to read carefully and have all required devices connected

Configuration

  • Firstly Ensure that the stereo camera on the cart is connected.
  • THIS STEP IS NEED IF RUNNING THE FULL SYSTEM Run the findArduinoUSB.sh file in cart_util to get a list of connected USB devices and their port name, there will be multiple cameras, copy the name of the first of the pair from the stereo camera.
  • Go into the cart_endpoints/launch/hardware_interface.launch file and under the camera.launch line (currently line 25) change video_stream_provider's value to the USB device you found before ie "/dev/video0"

Launch

  • Each following command must be run and left running in its own terminal tab/window
  • roscore
  • roslaunch video_stream_opencv camera.launch video_stream_provider:="/dev/video0" (or whatever video port you found by using the findArduionUSB.sh step
  • rosrun cart_endpoints pose_tracking.py