Giter Site home page Giter Site logo

vivetracker's Introduction

ViveTracker

A ROS package to use the HTC VIVE Tracker and Lighthouse for high speed pose estimation. This solution offers an economical solution for nearly precise pose and orientation, without the need of calculated positioning of several cameras in a large area. This module was tested on an Odroid XU4 to run a Kobuki robot, without the need for any kind of communication, obtaining a computed pose estimation rate of ~300Hz.

ViveTrackerDemoChair

Usage

Clone the repositories

git clone --recurse-submodules https://github.com/abhijitmajumdar/ViveTracker.git ~/ViveTracker
cd ~/ViveTracker

Compile libsurvive

It is advised to follow instructions from the original repository https://github.com/cnlohr/libsurvive and also use it for troubleshooting. A summary of the instructions performed here are:

cd ~/ViveTracker/libsurvive
cp useful_files/81-vive.rules to /etc/udev/rules.d/
make

Might need a reboot here before connecting the tracker and running make

Compiling ROS package

cd ~/ViveTracker
source vive_tracker_ros/source_this.sh
./vive_tracker_ros/run_to_build.sh

Sourcing the file asks for root password to access permissions for USB

Running the package

Publishes position and orientations with TF, after calibration

roslaunch vive_tracker_ros_package vive_tracker_ros.launch

Uses the position from the tacker to keep the Kobuki at its initialized position

roslaunch vive_tracker_ros_package kobuki_keep_ground.launch

If ROS does not find the package, source the source_this.sh file again, or you could add it to .bashrc to do this automatically and not have to do this every time:

echo "source ~/ViveTracker/vive_tracker_ros/source_this.sh" >> ~/.bashrc

Details

This package is meant to be used with individual robots, running as a standalone module. We aimed at locally processing localization data for a robot, to avoid the need for (wireless) communication (hence avoiding issues related to it like delays), and being self sufficient in obtaining its own position.

A Lighthouse can be mounted at any raised platform without restrictions on the orientation, except that the field of view of the Lighthouse should enclose the robot(s). Each robot (Kobuki) that uses this package is intended to have a Tracker mounted making sure there are as little obstruction as possible (though the Trackers have a wide sphere of coverage ~270 degrees), connected to Odroid XU4 on the Kobuki over USB. The package is individually compiled and run on each robot to provide positioning data, which can then be used for localization. The kobuki_keep_ground launch file uses the processed pose estimation to maintain the initial position that it was started at.

This can then be extended to perform formation control with several robots by publishing to each robot the desired destination position over a communication channel.

vivetracker's People

Contributors

abhijitmajumdar avatar jonlwowski012 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vivetracker's Issues

ROS Vive Tracker terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid

Hello,
I tried to run roslaunch vive_tracker_ros_package vive_tracker_ros.launch and get the following error:"ROS Vive Tracker terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid"

Attached the log file:
[roslaunch-roman-desktop-12276.log]
(https://github.com/abhijitmajumdar/ViveTracker/files/2407793/roslaunch-roman-desktop-12276.log)

I would be grateful if you could help me solve the problem.
Thanks,
Ortal

roman@roman-desktop:~/catkin_ws/src/ViveTracker$ roslaunch vive_tracker_ros_package vive_tracker_ros.launch
... logging to /home/roman/.ros/log/b8c80d72-be60-11e8-be3b-b8aeed7e3645/roslaunch-roman-desktop-10132.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://roman-desktop:36641/

SUMMARY

PARAMETERS

  • /rosdistro: kinetic
  • /rosversion: 1.12.13
  • /vive_tracker_node/calibrate: True
  • /vive_tracker_node/config_file: /home/roman/catki...

NODES
/
vive_tracker_node (vive_tracker_ros_package/vive_tracker_ros_node)

auto-starting new master
process[master]: started with pid [10142]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to b8c80d72-be60-11e8-be3b-b8aeed7e3645
process[rosout-1]: started with pid [10155]
started core service [/rosout]
process[vive_tracker_node-2]: started with pid [10165]
ROS Vive Tracker
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
[vive_tracker_node-2] process has died [pid 10165, exit code -6, cmd /home/roman/catkin_ws/src/ViveTracker/vive_tracker_ros/vive_tracker_ros_package/vive_tracker_ros_node __name:=vive_tracker_node __log:=/home/roman/.ros/log/b8c80d72-be60-11e8-be3b-b8aeed7e3645/vive_tracker_node-2.log].
log file: /home/roman/.ros/log/b8c80d72-be60-11e8-be3b-b8aeed7e3645/vive_tracker_node-2*.log

Unable to complete calibration

First thank you. It is a great project that open so much possibilities.

I am unable to complete the calibration script. I can not see in the servive debug gui screen the location points. servive debug screen

I am using 1 lighthouse and 1 tracker.
Bellow is the ./calibrate output and the config.json file.

Thanks in advance,
Ortal

./calibrate output:
Info: Available Posers:
Info: Dummy
Info: IMU
Info: *CharlesRefine
Info: EPNP
Info: SBA
Info: Totals 5 Posers.
Info: Using 'CharlesRefine' for defaultposer
Info: Available Disambiguators:
Info: *Charles
Info: Turvey
Info: StateBased
Info: Totals 3 Disambiguators.
Info: Using 'Charles' for disambiguator
Info: Loading driver DriverRegPlayback (0x7f8c5ff38b50) (1)
Info: Driver DriverRegPlayback reports status 0
Info: Loading driver DriverRegHTCVive (0x7f8c5ff5b6f0) (2)
Info: Blacklisting -
Info: Vive starting in libusb mode.
Info: Did not find device HMD (0bb4:2c87.0)
Info: Did not find device HMD IMU & LH (28de:2000.0)
Info: Did not find device Watchman 1 (28de:2101.0)
Info: Did not find device Watchman 2 (28de:2101.1)
Info: Successfully enumerated Tracker 0 (6, 3)
Info: Did not find device Tracker 1 (28de:2300.0)
Info: Did not find device Wired Watchman 1 (28de:2012.0)
Info: All enumerated devices attached.
Info: Powered unit on.
Info: Got config data length 1865
Info: Loading config: 7604
Info: Driver DriverRegHTCVive reports status 0
Info: Loading driver DriverRegDummy (0x7f8c5ff60c80) (3)
Info: Driver DriverRegDummy reports status 0
Info: Loading driver DriverRegUDP (0x7f8c5ff61010) (4)
Info: Driver DriverRegUDP reports status 0
Info: Uncalibrated configuration detected. Attaching calibration. Please don't move tracked objects for the duration of calibration. Pass '--disable-calibrate' to skip calibration
Info: Calibration is using TR0

config.json file

"lighthousecount":"1",
"defaultposer":"CharlesRefine",
"disambiguator":"Charles",
"RequiredTrackersForCal":"TR0",
"AllowAllTrackersForCal":"0",
"ConfigPoser":"CharlesRefine",
"TurveyToriDebug":"0"
"lighthouse0":{
"index":"0",
"id":"0",
"mode":"0",
"pose":["0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000"],
"fcalphase":["0.000000","0.000000"],
"fcaltilt":["0.000000","0.000000"],
"fcalcurve":["0.000000","0.000000"],
"fcalgibpha":["0.000000","0.000000"],
"fcalgibmag":["0.000000","0.000000"],
"PositionSet":"0"
}
"lighthouse1":{
"index":"-1"
}

Error running "roslaunch vive_tracker_ros_package vive_tracker_ros.launch". The error "Can't solve for position with just 0 measurements"

Hello,

I'm trying to run "roslaunch vive_tracker_ros_package vive_tracker_ros.launch".

When I run it I get "OOTX Decoder: Bad sync bit" . The same error message I get when I try to do calibration using libsurvive cntools/libsurvive#137 . And was solved by adding the flags : disambiguator and ootx to the commend: ./calibrate --disambiguator StateBased --ootx-ignore-sync-error.
The commend output in the attached file:
commend out - Bad sync bit.txt

I made another attempt and past the config.json file that was created after the calibration using libsurvive. And get the following error:
"nfo: Can't solve for position with just 0 measurements
Info: 0.390124 original reproj error for 12 meas"
The commend output in the attached file:
roslaunch vive_tracker_ros_package vive_tracker_ros.launch log.txt

Thank you so much for all your help so far.
i appreciate it a lot.
Ortal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.