Skip to content

Commit

Permalink
More rename: app --> example
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Apr 22, 2016
1 parent 017e148 commit 95ad8b5
Show file tree
Hide file tree
Showing 71 changed files with 277 additions and 233 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -279,7 +279,7 @@ endfunction(dart_add_unittest)
#===============================================================================

add_subdirectory(dart)
add_subdirectory(apps EXCLUDE_FROM_ALL)
add_subdirectory(examples EXCLUDE_FROM_ALL)
add_subdirectory(tutorials EXCLUDE_FROM_ALL)

# Add a "tutorials" target to build tutorials.
Expand Down
4 changes: 2 additions & 2 deletions dart/CMakeLists.txt
@@ -1,6 +1,6 @@
# Enable multi-threaded compilation.
# We do this here and not in the root folder since the example apps
# do not have enough source files to benefit from this.
# We do this here and not in the root folder since the examples and the
# tutorialsdo not have enough source files to benefit from this.
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
Expand Down
14 changes: 7 additions & 7 deletions examples/CMakeLists.txt
@@ -1,7 +1,7 @@
# A list of applications
set_property(DIRECTORY PROPERTY FOLDER Apps)
# A list of examples
set_property(DIRECTORY PROPERTY FOLDER Examples)

# Automatically identify all directories in the apps folder
# Automatically identify all directories in the examples folder
file(GLOB children RELATIVE ${CMAKE_CURRENT_LIST_DIR} "*")
set(directories "")
foreach(child ${children})
Expand All @@ -13,7 +13,7 @@ foreach(child ${children})
endforeach(child)

# List of all the subdirectories to include
foreach(APPDIR ${directories})
add_subdirectory(${APPDIR})
dart_add_example(${APPDIR})
endforeach(APPDIR)
foreach(EXAMPLE_DIR ${directories})
add_subdirectory(${EXAMPLE_DIR})
dart_add_example(${EXAMPLE_DIR})
endforeach(EXAMPLE_DIR)
17 changes: 10 additions & 7 deletions examples/addDeleteSkels/CMakeLists.txt
@@ -1,7 +1,10 @@
###############################################
# apps/addDeleteSkels
file(GLOB addDeleteSkels_srcs "*.cpp")
file(GLOB addDeleteSkels_hdrs "*.h")
add_executable(addDeleteSkels ${addDeleteSkels_srcs} ${addDeleteSkels_hdrs})
target_link_libraries(addDeleteSkels dart dart-gui)
set_target_properties(addDeleteSkels PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
###############################################################
# This file can be used as-is in the directory of any example,#
# however you might need to specify your own dependencies in #
# target_link_libraries if your app depends on more than dart #
###############################################################
get_filename_component(example_name ${CMAKE_CURRENT_LIST_DIR} NAME)
file(GLOB ${example_name}_srcs "*.cpp" "*.h" "*.hpp")
add_executable(${example_name} ${${example_name}_srcs})
target_link_libraries(${example_name} dart dart-gui)
set_target_properties(${example_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
6 changes: 3 additions & 3 deletions examples/addDeleteSkels/MyWindow.h
Expand Up @@ -35,8 +35,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef APPS_ADDDELETESKELS_MYWINDOW_H_
#define APPS_ADDDELETESKELS_MYWINDOW_H_
#ifndef EXAMPLES_ADDDELETESKELS_MYWINDOW_H_
#define EXAMPLES_ADDDELETESKELS_MYWINDOW_H_

#include "dart/dart.h"
#include "dart/gui/gui.h"
Expand All @@ -63,4 +63,4 @@ class MyWindow : public dart::gui::SimWindow {
double _mass = 0.1);
};

#endif // APPS_ADDDELETESKELS_MYWINDOW_H_
#endif // EXAMPLES_ADDDELETESKELS_MYWINDOW_H_
18 changes: 11 additions & 7 deletions examples/atlasSimbicon/CMakeLists.txt
@@ -1,7 +1,11 @@
###############################################
# apps/atlasSimbicon
file(GLOB atlasSimbicon_srcs "*.cpp")
file(GLOB atlasSimbicon_hdrs "*.h")
add_executable(atlasSimbicon ${atlasSimbicon_srcs} ${atlasSimbicon_hdrs})
target_link_libraries(atlasSimbicon dart dart-gui dart-utils-urdf)
set_target_properties(atlasSimbicon PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
###############################################################
# This file can be used as-is in the directory of any example,#
# however you might need to specify your own dependencies in #
# target_link_libraries if your app depends on more than dart #
###############################################################
get_filename_component(example_name ${CMAKE_CURRENT_LIST_DIR} NAME)
file(GLOB ${example_name}_srcs "*.cpp" "*.h" "*.hpp")
add_executable(${example_name} ${${example_name}_srcs})
target_link_libraries(${example_name} dart dart-gui dart-utils-urdf)
set_target_properties(${example_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")

8 changes: 4 additions & 4 deletions examples/atlasSimbicon/Controller.cpp
Expand Up @@ -34,11 +34,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "apps/atlasSimbicon/Controller.h"
#include "examples/atlasSimbicon/Controller.h"

#include "apps/atlasSimbicon/State.h"
#include "apps/atlasSimbicon/StateMachine.h"
#include "apps/atlasSimbicon/TerminalCondition.h"
#include "examples/atlasSimbicon/State.h"
#include "examples/atlasSimbicon/StateMachine.h"
#include "examples/atlasSimbicon/TerminalCondition.h"

using namespace std;

Expand Down
6 changes: 3 additions & 3 deletions examples/atlasSimbicon/Controller.h
Expand Up @@ -34,8 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef APPS_ATLASROBOT_CONTROLLER_H_
#define APPS_ATLASROBOT_CONTROLLER_H_
#ifndef EXAMPLES_ATLASSIMBICON_CONTROLLER_H_
#define EXAMPLES_ATLASSIMBICON_CONTROLLER_H_

#include <vector>

Expand Down Expand Up @@ -184,4 +184,4 @@ class Controller
dart::dynamics::Skeleton::Configuration mInitialState;
};

#endif // APPS_ATLASROBOT_CONTROLLER_H_
#endif // EXAMPLES_ATLASSIMBICON_CONTROLLER_H_
4 changes: 2 additions & 2 deletions examples/atlasSimbicon/Humanoid.cpp
Expand Up @@ -34,9 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "apps/atlasSimbicon/Humanoid.h"
#include "examples/atlasSimbicon/Humanoid.h"

#include "apps/atlasSimbicon/State.h"
#include "examples/atlasSimbicon/State.h"

// Macro for functions not implemented yet
#define NOT_YET(FUNCTION) std::cout << #FUNCTION\
Expand Down
6 changes: 3 additions & 3 deletions examples/atlasSimbicon/Humanoid.h
Expand Up @@ -34,8 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef APPS_ATLASROBOT_HUMANOID_H_
#define APPS_ATLASROBOT_HUMANOID_H_
#ifndef EXAMPLES_ATLASSIMBICON_HUMANOID_H_
#define EXAMPLES_ATLASSIMBICON_HUMANOID_H_

#include <vector>
#include <string>
Expand Down Expand Up @@ -123,4 +123,4 @@ class AtlasRobot : public Humanoid
protected:
};

#endif // APPS_ATLASROBOT_HUMANOID_H_
#endif // EXAMPLES_ATLASSIMBICON_HUMANOID_H_
4 changes: 2 additions & 2 deletions examples/atlasSimbicon/Main.cpp
Expand Up @@ -39,8 +39,8 @@

#include "dart/dart.h"

#include "apps/atlasSimbicon/MyWindow.h"
#include "apps/atlasSimbicon/Controller.h"
#include "examples/atlasSimbicon/MyWindow.h"
#include "examples/atlasSimbicon/Controller.h"

using namespace std;
using namespace Eigen;
Expand Down
2 changes: 1 addition & 1 deletion examples/atlasSimbicon/MyWindow.cpp
Expand Up @@ -35,7 +35,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "apps/atlasSimbicon/MyWindow.h"
#include "examples/atlasSimbicon/MyWindow.h"

//==============================================================================
MyWindow::MyWindow(Controller* _controller)
Expand Down
8 changes: 4 additions & 4 deletions examples/atlasSimbicon/MyWindow.h
Expand Up @@ -35,13 +35,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef APPS_ATLASROBOT_MYWINDOW_H_
#define APPS_ATLASROBOT_MYWINDOW_H_
#ifndef EXAMPLES_ATLASSIMBICON_MYWINDOW_H_
#define EXAMPLES_ATLASSIMBICON_MYWINDOW_H_

#include "dart/dart.h"
#include "dart/gui/gui.h"

#include "apps/atlasSimbicon/Controller.h"
#include "examples/atlasSimbicon/Controller.h"

/// \brief class MyWindow
class MyWindow : public dart::gui::SimWindow
Expand Down Expand Up @@ -73,4 +73,4 @@ class MyWindow : public dart::gui::SimWindow
Controller* mController;
};

#endif // APPS_ATLASROBOT_MYWINDOW_H_
#endif // EXAMPLES_ATLASSIMBICON_MYWINDOW_H_
4 changes: 2 additions & 2 deletions examples/atlasSimbicon/State.cpp
Expand Up @@ -34,9 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "apps/atlasSimbicon/State.h"
#include "examples/atlasSimbicon/State.h"

#include "apps/atlasSimbicon/TerminalCondition.h"
#include "examples/atlasSimbicon/TerminalCondition.h"

// Macro for functions not implemented yet
#define NOT_YET(FUNCTION) std::cout << #FUNCTION\
Expand Down
6 changes: 3 additions & 3 deletions examples/atlasSimbicon/State.h
Expand Up @@ -34,8 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef APPS_ATLASROBOT_STATE_H_
#define APPS_ATLASROBOT_STATE_H_
#ifndef EXAMPLES_ATLASSIMBICON_STATE_H_
#define EXAMPLES_ATLASSIMBICON_STATE_H_

#include <map>
#include <vector>
Expand Down Expand Up @@ -336,4 +336,4 @@ class State
Eigen::VectorXd mDesiredJointPositionsBalance;
};

#endif // APPS_ATLASROBOT_STATE_H_
#endif // EXAMPLES_ATLASSIMBICON_STATE_H_
4 changes: 2 additions & 2 deletions examples/atlasSimbicon/StateMachine.cpp
Expand Up @@ -34,9 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "apps/atlasSimbicon/StateMachine.h"
#include "examples/atlasSimbicon/StateMachine.h"

#include "apps/atlasSimbicon/State.h"
#include "examples/atlasSimbicon/State.h"

// Macro for functions not implemented yet
#define NOT_YET(FUNCTION) std::cout << #FUNCTION\
Expand Down
6 changes: 3 additions & 3 deletions examples/atlasSimbicon/StateMachine.h
Expand Up @@ -34,8 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef APPS_ATLASROBOT_STATEMACHINE_H_
#define APPS_ATLASROBOT_STATEMACHINE_H_
#ifndef EXAMPLES_ATLASSIMBICON_STATEMACHINE_H_
#define EXAMPLES_ATLASSIMBICON_STATEMACHINE_H_

#include <vector>
#include <string>
Expand Down Expand Up @@ -129,4 +129,4 @@ class StateMachine
State* _findState(const std::string& _name) const;
};

#endif // APPS_ATLASROBOT_STATEMACHINE_H_
#endif // EXAMPLES_ATLASSIMBICON_STATEMACHINE_H_
4 changes: 2 additions & 2 deletions examples/atlasSimbicon/TerminalCondition.cpp
Expand Up @@ -34,9 +34,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "apps/atlasSimbicon/TerminalCondition.h"
#include "examples/atlasSimbicon/TerminalCondition.h"

#include "apps/atlasSimbicon/State.h"
#include "examples/atlasSimbicon/State.h"

// Macro for functions not implemented yet
#define NOT_YET(FUNCTION) std::cout << #FUNCTION\
Expand Down
6 changes: 3 additions & 3 deletions examples/atlasSimbicon/TerminalCondition.h
Expand Up @@ -34,8 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef APPS_ATLASROBOT_TERMINALCONDITION_H_
#define APPS_ATLASROBOT_TERMINALCONDITION_H_
#ifndef EXAMPLES_ATLASSIMBICON_TERMINALCONDITION_H_
#define EXAMPLES_ATLASSIMBICON_TERMINALCONDITION_H_

#include <vector>
#include <string>
Expand Down Expand Up @@ -103,4 +103,4 @@ class BodyContactCondition : public TerminalCondition
dart::dynamics::BodyNode* mBodyNode;
};

#endif // APPS_ATLASROBOT_TERMINALCONDITION_H_
#endif // EXAMPLES_ATLASSIMBICON_TERMINALCONDITION_H_
17 changes: 10 additions & 7 deletions examples/bipedStand/CMakeLists.txt
@@ -1,7 +1,10 @@
###############################################
# apps/bipedStand
file(GLOB bipedStand_srcs "*.cpp")
file(GLOB bipedStand_hdrs "*.h")
add_executable(bipedStand ${bipedStand_srcs} ${bipedStand_hdrs})
target_link_libraries(bipedStand dart dart-gui)
set_target_properties(bipedStand PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
###############################################################
# This file can be used as-is in the directory of any example,#
# however you might need to specify your own dependencies in #
# target_link_libraries if your app depends on more than dart #
###############################################################
get_filename_component(example_name ${CMAKE_CURRENT_LIST_DIR} NAME)
file(GLOB ${example_name}_srcs "*.cpp" "*.h" "*.hpp")
add_executable(${example_name} ${${example_name}_srcs})
target_link_libraries(${example_name} dart dart-gui)
set_target_properties(${example_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
2 changes: 1 addition & 1 deletion examples/bipedStand/Controller.cpp
Expand Up @@ -35,7 +35,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "apps/bipedStand/Controller.h"
#include "examples/bipedStand/Controller.h"

Controller::Controller(dart::dynamics::SkeletonPtr _skel,
double _t) {
Expand Down
6 changes: 3 additions & 3 deletions examples/bipedStand/Controller.h
Expand Up @@ -35,8 +35,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef APPS_BALANCE_CONTROLLER_H_
#define APPS_BALANCE_CONTROLLER_H_
#ifndef EXAMPLES_BIPEDSTAND_CONTROLLER_H_
#define EXAMPLES_BIPEDSTAND_CONTROLLER_H_

#include <vector>

Expand Down Expand Up @@ -75,4 +75,4 @@ class Controller {
/// \brief SPD utilizes the current info about contact forces
};

#endif // APPS_BALANCE_CONTROLLER_H_
#endif // EXAMPLES_BIPEDSTAND_CONTROLLER_H_
2 changes: 1 addition & 1 deletion examples/bipedStand/Main.cpp
Expand Up @@ -40,7 +40,7 @@

#include "dart/dart.h"

#include "apps/bipedStand/MyWindow.h"
#include "examples/bipedStand/MyWindow.h"

int main(int argc, char* argv[]) {
// create and initialize the world
Expand Down
2 changes: 1 addition & 1 deletion examples/bipedStand/MyWindow.cpp
Expand Up @@ -35,7 +35,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "apps/bipedStand/MyWindow.h"
#include "examples/bipedStand/MyWindow.h"

MyWindow::MyWindow(): SimWindow() {
mForce = Eigen::Vector3d::Zero();
Expand Down
8 changes: 4 additions & 4 deletions examples/bipedStand/MyWindow.h
Expand Up @@ -35,8 +35,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef APPS_BALANCE_MYWINDOW_H_
#define APPS_BALANCE_MYWINDOW_H_
#ifndef EXAMPLES_BIPEDSTAND_MYWINDOW_H_
#define EXAMPLES_BIPEDSTAND_MYWINDOW_H_

#include <cstdarg>

Expand All @@ -45,7 +45,7 @@
#include "dart/dart.h"
#include "dart/gui/gui.h"

#include "apps/bipedStand/Controller.h"
#include "examples/bipedStand/Controller.h"

class MyWindow : public dart::gui::SimWindow {
public:
Expand All @@ -65,4 +65,4 @@ class MyWindow : public dart::gui::SimWindow {
int mImpulseDuration;
};

#endif // APPS_BALANCE_MYWINDOW_H_
#endif // EXAMPLES_BIPEDSTAND_MYWINDOW_H_
18 changes: 10 additions & 8 deletions examples/hardcodedDesign/CMakeLists.txt
@@ -1,8 +1,10 @@
###############################################
# apps/hardcodedDesign

file(GLOB hardcodedDesign_srcs "*.cpp")
file(GLOB hardcodedDesign_hdrs "*.h")
add_executable(hardcodedDesign ${hardcodedDesign_srcs} ${hardcodedDesign_hdrs})
target_link_libraries(hardcodedDesign dart dart-gui)
set_target_properties(hardcodedDesign PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
###############################################################
# This file can be used as-is in the directory of any example,#
# however you might need to specify your own dependencies in #
# target_link_libraries if your app depends on more than dart #
###############################################################
get_filename_component(example_name ${CMAKE_CURRENT_LIST_DIR} NAME)
file(GLOB ${example_name}_srcs "*.cpp" "*.h" "*.hpp")
add_executable(${example_name} ${${example_name}_srcs})
target_link_libraries(${example_name} dart dart-gui)
set_target_properties(${example_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")

0 comments on commit 95ad8b5

Please sign in to comment.