Skip to content

Commit a565e10

Browse files
markasselinlassoan
authored andcommitted
re #242: Renamed RunMotiveInBackground to AttachToRunningMotive to be more descriptive
1 parent 37accaf commit a565e10

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/Documentation/UserManual/DeviceOptiTrack.dox

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
- 2: Save the calibration as a Motive project file.
3838
- 2: In Motive's 3D view, select all the markers corresponding to a rigid body and right click. Cursor "Rigid Body" then click "Create From Selected Markers".
3939
- 3: Select the newly created rigid body in the "Project" tab and change the rigid body's "Name" attribute to something descriptive of the rigid body. This will be the rigid body's ID in the PLUS config file.
40-
- 4: Right click the rigid body's name in the "Project" tab and click "Export Rigid Body". Save the resulting file in the PLUS config file directory. We reccomend naming this file <Motive-name>.tra, replacing <Motive-name> with the name attribute of the rigid body.
40+
- 4: Right click the rigid body's name in the "Project" tab and click "Export Rigid Body". Save the resulting file in the PLUS config file directory. We recommend naming this file <Motive-name>.tra, replacing <Motive-name> with the name attribute of the rigid body.
4141
- 6: Modify the sample PLUS calibration file PlusDeviceSet_Server_OptiTrack_TTPandTRA.xml to reflect the name of your Motive project file and update the DataSources element to contain one entry for each rigid body (with the same ID as the rigid body's Motive name attribute, and TRA file containing the relative path of the rigid body's associated TRA file).
4242

4343
\section OptiTrackConfigSettings Device configuration settings
4444
- \xmlAtt \ref DeviceType "Type" = \c "OptiTrack" \RequiredAtt
4545
- \xmlAtt \ref ToolReferenceFrame \OptionalAtt{Tracker}
4646

4747
- \xmlAtt \b ProjectFile The Motive project file (.TTP) to load. \RequiredAtt
48-
- \xmlAtt \b RunMotiveInBackground If true, will run Motive in the background. If false, you must run Motive on the same PC as PLUS is running on. \RequiredAtt
49-
- \xmlAtt \b MotiveDataDescriptionsUpdateTimeSec Only used if Motive GUI is shown. Defines time how frequently list of tools is queried from Motive. Each update consumes a small amount of memory, therefore it is recommended to only use >=0 value only during development. If set to a negative value, tool descriptions are only updated when connecting to the device.\OptionalAtt{1.0}
48+
- \xmlAtt \b AttachToRunningMotive Set to TRUE to make Plus connect to an already running instance of Motive application (on the same computer where Plus is running). If set to FALSE, PLUS will internally start Motive application with its graphical user interface hidden. \RequiredAtt
49+
- \xmlAtt \b MotiveDataDescriptionsUpdateTimeSec Only used if Motive GUI is shown. Defines time how frequently list of tools is queried from Motive. Each update consumes a small amount of memory, therefore it is recommended to use >=0 value only during development. If set to a negative value, tool descriptions are only updated when connecting to the device.\OptionalAtt{1.0}
5050
- \xmlElem \ref DataSources One \c DataSource child element is required for each rigid body to be tracked. \RequiredAtt
5151
- \xmlElem \ref DataSource \RequiredAtt
5252
- \xmlAtt \b Id The rigid body name. The same name should be assigned to the rigid body in Motive. \RequiredAtt

src/PlusDataCollection/OptiTrack/vtkPlusOptiTrack.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class vtkPlusOptiTrack::vtkInternal
5555
std::map<int, PlusTransformName> MapRBNameToTransform;
5656

5757
// Flag to run Motive in background if user doesn't need GUI
58-
bool RunMotiveInBackground;
58+
bool AttachToRunningMotive;
5959

6060
// Time of last tool update
6161
double LastMotiveDataDescriptionsUpdateTimestamp;
@@ -129,7 +129,7 @@ PlusStatus vtkPlusOptiTrack::ReadConfiguration(vtkXMLDataElement* rootConfigElem
129129
XML_FIND_DEVICE_ELEMENT_REQUIRED_FOR_READING(deviceConfig, rootConfigElement);
130130

131131
XML_READ_STRING_ATTRIBUTE_NONMEMBER_REQUIRED(ProjectFile, this->Internal->ProjectFile, deviceConfig);
132-
XML_READ_BOOL_ATTRIBUTE_NONMEMBER_REQUIRED(RunMotiveInBackground, this->Internal->RunMotiveInBackground, deviceConfig);
132+
XML_READ_BOOL_ATTRIBUTE_NONMEMBER_REQUIRED(AttachToRunningMotive, this->Internal->AttachToRunningMotive, deviceConfig);
133133
XML_READ_SCALAR_ATTRIBUTE_NONMEMBER_OPTIONAL(double, MotiveDataDescriptionsUpdateTimeSec, this->Internal->MotiveDataDescriptionsUpdateTimeSec, deviceConfig);
134134

135135
XML_FIND_NESTED_ELEMENT_REQUIRED(dataSourcesElement, deviceConfig, "DataSources");
@@ -185,7 +185,7 @@ PlusStatus vtkPlusOptiTrack::Probe()
185185
PlusStatus vtkPlusOptiTrack::InternalConnect()
186186
{
187187
LOG_TRACE("vtkPlusOptiTrack::InternalConnect");
188-
if (this->Internal->RunMotiveInBackground == true)
188+
if (!this->Internal->AttachToRunningMotive)
189189
{
190190
// RUN MOTIVE IN BACKGROUND
191191
// initialize the API
@@ -257,7 +257,7 @@ PlusStatus vtkPlusOptiTrack::InternalConnect()
257257
else
258258
{
259259
// Fail if motive is not running
260-
LOG_ERROR("Failed to connect to Motive. Please either set RunMotiveInBackground=TRUE or ensure that Motive is running and streaming is enabled.");
260+
LOG_ERROR("Failed to connect to Motive. Please either set AttachToRunningMotive=FALSE or ensure that Motive is running and streaming is enabled.");
261261
return PLUS_FAIL;
262262
}
263263

@@ -289,7 +289,7 @@ PlusStatus vtkPlusOptiTrack::InternalConnect()
289289
PlusStatus vtkPlusOptiTrack::InternalDisconnect()
290290
{
291291
LOG_TRACE("vtkPlusOptiTrack::InternalDisconnect")
292-
if (this->Internal->RunMotiveInBackground)
292+
if (!this->Internal->AttachToRunningMotive)
293293
{
294294
TT_Shutdown();
295295
}
@@ -331,7 +331,7 @@ PlusStatus vtkPlusOptiTrack::InternalCallback(sFrameOfMocapData* data)
331331
this->Internal->UpdateMotiveDataDescriptions();
332332
}
333333

334-
if (!this->Internal->RunMotiveInBackground && this->Internal->MotiveDataDescriptionsUpdateTimeSec >= 0)
334+
if (this->Internal->AttachToRunningMotive && this->Internal->MotiveDataDescriptionsUpdateTimeSec >= 0)
335335
{
336336
double timeSinceMotiveDataDescriptionsUpdate = unfilteredTimestamp - this->Internal->LastMotiveDataDescriptionsUpdateTimestamp;
337337
if (timeSinceMotiveDataDescriptionsUpdate > this->Internal->MotiveDataDescriptionsUpdateTimeSec)

0 commit comments

Comments
 (0)