|
vicon
|
#include <ViconDriver.hpp>
Public Types | |
| enum | GetResult { UNKNOWN, SUCCESS, INVALID_SUBJECT_NAME, INVALID_SEGMENT_NAME } |
Public Member Functions | |
| Driver () | |
| bool | connect (const std::string &hostname, const unsigned int port=801) |
| bool | isConnected () |
| void | disconnect () |
| bool | getFrame (const base::Time &timeout=base::Time::fromSeconds(1.0)) |
| base::Time | getTimestamp () |
| Eigen::Affine3d | getSegmentTransform (const std::string &subjectName, const std::string &segmentName, bool &inFrame) |
| Eigen::Affine3d | getSegmentTransform (const std::string &subjectName, const std::string &segmentName) |
| GetResult | getLastResult () |
| std::vector< base::Vector3d > | getUnlabeledMarkers () |
| void | getAxesDir (int &x_dir, int &y_dir, int &z_dir) |
| Get axes direction. More... | |
| void | setAxesDir (int x_dir, int y_dir, int z_dir) |
| Set axes directions. More... | |
Definition at line 32 of file ViconDriver.hpp.
| Enumerator | |
|---|---|
| UNKNOWN | |
| SUCCESS | |
| INVALID_SUBJECT_NAME | |
| INVALID_SEGMENT_NAME | |
Definition at line 35 of file ViconDriver.hpp.
| Driver::Driver | ( | ) |
Definition at line 48 of file ViconDriver.cpp.
| bool Driver::connect | ( | const std::string & | hostname, |
| const unsigned int | port = 801 |
||
| ) |
Open a connection to the Vicon DataStream host
| hostname | name of the network host |
| port | port numer |
Definition at line 53 of file ViconDriver.cpp.
| void Driver::disconnect | ( | ) |
disconnect from the server
Definition at line 87 of file ViconDriver.cpp.
| void Driver::getAxesDir | ( | int & | x_dir, |
| int & | y_dir, | ||
| int & | z_dir | ||
| ) |
| bool Driver::getFrame | ( | const base::Time & | timeout = base::Time::fromSeconds(1.0) | ) |
Step to the next frame in the data stream. Always call this method before accessing any of the data methods.
| timeout | time in milliseconds to wait for a new frame |
Definition at line 93 of file ViconDriver.cpp.
|
inline |
Get the result o the last getSegmentTransform operation.
Definition at line 90 of file ViconDriver.hpp.
| Eigen::Affine3d Driver::getSegmentTransform | ( | const std::string & | subjectName, |
| const std::string & | segmentName, | ||
| bool & | inFrame | ||
| ) |
Get the transformation which transforms the given segment from the local to the global coordinate frame.
| subjectName | name of the subject |
| segmentName | name of the segment in the subject |
| inFrame | is true if segment is present in the current frame (not occluded). |
Definition at line 125 of file ViconDriver.cpp.
|
inline |
For backcompatibility.
Definition at line 84 of file ViconDriver.hpp.
| base::Time Driver::getTimestamp | ( | ) |
Definition at line 119 of file ViconDriver.cpp.
| std::vector< base::Vector3d > Driver::getUnlabeledMarkers | ( | ) |
Returns a list of unlabeled markers found by the system in global coordinates.
Definition at line 166 of file ViconDriver.cpp.
| bool Driver::isConnected | ( | ) |
Definition at line 82 of file ViconDriver.cpp.
| void Driver::setAxesDir | ( | int | x_dir, |
| int | y_dir, | ||
| int | z_dir | ||
| ) |
Set axes directions.
Mapping is as follows: Forward=1, Backward=-1, Left=2, Right=-2, Up=3, Down=-3
Definition at line 196 of file ViconDriver.cpp.
1.8.11