Skip to content

Commit

Permalink
cisstRobot and cisstParameterTypes: added code for backward compatibi…
Browse files Browse the repository at this point in the history
…lity using cmnJointType.
  • Loading branch information
adeguet1 committed May 9, 2024
1 parent 2d30088 commit 29e89c5
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cisstParameterTypes/code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ set (SOURCE_FILES

prmVelocityJointGet.cpp
prmVelocityJointSet.cpp

prmVelocityCartesianSet.cpp
prmForceCartesianGet.cpp
prmForceCartesianSet.cpp

prmActuatorState.cpp
prmRobotState.cpp
prmActuatorParameters.cpp

prmInputDataConverter.cpp
prmOperatingState.cpp

prmClassServices.cpp
)

Expand All @@ -71,17 +71,18 @@ set (HEADER_FILES

prmVelocityJointGet.h
prmVelocityJointSet.h

prmVelocityCartesianSet.h
prmForceCartesianGet.h
prmForceCartesianSet.h

prmMaskedVector.h
prmActuatorState.h
prmRobotState.h
prmActuatorParameters.h
prmGainParameters.h


prmJointType.h
prmInputDataConverter.h
)

Expand Down
1 change: 1 addition & 0 deletions cisstParameterTypes/prmConfigurationJoint.cdg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ inline-header {
#include <cisstCommon/cmnJointType.h>
#include <cisstVector/vctDynamicVectorTypes.h>
#include <cisstMultiTask/mtsGenericObject.h>
#include <cisstParameterTypes/prmJointType.h>
// Always include last
#include <cisstParameterTypes/prmExport.h>
}
Expand Down
40 changes: 40 additions & 0 deletions cisstParameterTypes/prmJointType.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */

/*
Author(s): Anton Deguet
Created on: 2008-04-08
(C) Copyright 2024 Johns Hopkins University (JHU), All Rights Reserved.
--- begin cisst license - do not edit ---
This software is provided "as is" under an open source license, with
no warranty. The complete license can be found in license.txt and
http://www.cisst.org/cisst/license.txt.
--- end cisst license ---
*/


/*!
\file
\brief For backward compatibility, cmnJointType should be used instead
*/


#ifndef _prmJointType_h
#define _prmJointType_h

#include <cisstCommon/cmnJointType.h>

typedef cmnJointType prmJointType;

#define PRM_JOINT_UNDEFINED CMN_JOINT_UNDEFINED
#define PRM_JOINT_PRISMATIC CMN_JOINT_PRISMATIC
#define PRM_JOINT_REVOLUTE CMN_JOINT_REVOLUTE
#define PRM_JOINT_INACTIVE CMN_JOINT_INACTIVE

#define prmJointTypeToFactor cmnJointTypeToFactor

#endif // _prmJointType_h
8 changes: 8 additions & 0 deletions cisstRobot/robJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ class CISST_EXPORT robJoint {

public:

// for backward compatibility
typedef cmnJointType Type;
static const cmnJointType UNDEFINED = CMN_JOINT_UNDEFINED;
static const cmnJointType HINGE = CMN_JOINT_REVOLUTE;
static const cmnJointType SLIDER = CMN_JOINT_PRISMATIC;
static const cmnJointType UNIVERSAL = CMN_JOINT_UNIVERSAL;
static const cmnJointType BALLSOCKET = CMN_JOINT_BALL_SOCKET;

//! Joint modes
/**
Each joint can be active (powered by a motor) or passive
Expand Down

0 comments on commit 29e89c5

Please sign in to comment.