Skip to content

Commit

Permalink
add state machine
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanSnap360 committed Jun 2, 2023
1 parent af3be0e commit 9ee0a5d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/omnibot_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ include_directories(SYSTEM ${EIGEN3_INCLUDE_DIRS})
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}_lib
LIBRARIES ${PROJECT_NAME}_lib state_machine_lib
CATKIN_DEPENDS roscpp rospy std_msgs
# DEPENDS system_lib
)
Expand All @@ -147,7 +147,8 @@ include_directories(
## Declare a C++ library
add_library(${PROJECT_NAME}
src/${PROJECT_NAME}_lib/omnibot_core_lib.cpp
)
src/state_machine_lib/state_machine_lib.cpp
)

## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
Expand All @@ -157,7 +158,8 @@ add_library(${PROJECT_NAME}
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(${PROJECT_NAME}_node src/${PROJECT_NAME}_node.cpp src/${PROJECT_NAME}_lib/${PROJECT_NAME}_lib.cpp )
add_executable(${PROJECT_NAME}_node src/${PROJECT_NAME}_node.cpp src/${PROJECT_NAME}_lib/${PROJECT_NAME}_lib.cpp src/state_machine_lib/state_machine_lib.cpp )


## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
Expand Down
16 changes: 16 additions & 0 deletions src/omnibot_core/include/state_machine_lib/state_machine_lib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef __STATE_MACHINE_LIB_H__
#define __STATE_MACHINE_LIB_H__
#include <ros/ros.h>

class STATE_MACHINE_LIB
{
private:
ros::NodeHandle *_nh;
public:
STATE_MACHINE_LIB();
~STATE_MACHINE_LIB();
};



#endif // __STATE_MACHINE_LIB_H__
9 changes: 9 additions & 0 deletions src/omnibot_core/src/state_machine_lib/state_machine_lib.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "state_machine_lib/state_machine_lib.h"

STATE_MACHINE_LIB::STATE_MACHINE_LIB(/* args */)
{
}

STATE_MACHINE_LIB::~STATE_MACHINE_LIB()
{
}

0 comments on commit 9ee0a5d

Please sign in to comment.