Skip to content
Snippets Groups Projects
Commit 66ede789 authored by Franz Bethke's avatar Franz Bethke
Browse files

Init catkin car porject

parent 85d1f8bf
Branches
No related merge requests found
Showing
with 71 additions and 14 deletions
...@@ -32,8 +32,8 @@ catkin_package( ...@@ -32,8 +32,8 @@ catkin_package(
include_directories( include_directories(
include include
include/testnodelets
include/testnodelets2 include/testnodelets2
include/testnodelets
${catkin_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}
) )
...@@ -61,8 +61,8 @@ install( ...@@ -61,8 +61,8 @@ install(
install( install(
DIRECTORY DIRECTORY
include/testnodelets/
include/testnodelets2/ include/testnodelets2/
include/testnodelets/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
) )
......
...@@ -14,6 +14,14 @@ find_package(Boost REQUIRED COMPONENTS system) ...@@ -14,6 +14,14 @@ find_package(Boost REQUIRED COMPONENTS system)
add_message_files( add_message_files(
FILES FILES
camDataMsg.msg
ccDataMsg.msg
environmentDataMsg.msg
logEnabledMsg.msg
logStringMsg.msg
rcEnabledMsg.msg
stmDataMsg.msg
ussDataMsg.msg
) )
generate_messages( generate_messages(
DEPENDENCIES DEPENDENCIES
...@@ -22,7 +30,7 @@ generate_messages( ...@@ -22,7 +30,7 @@ generate_messages(
catkin_package( catkin_package(
INCLUDE_DIRS include INCLUDE_DIRS include
#LIBRARIES nodelet_talker LIBRARIES main_node
CATKIN_DEPENDS roscpp std_msgs nodelet rospy #message_runtime CATKIN_DEPENDS roscpp std_msgs nodelet rospy #message_runtime
) )
...@@ -31,13 +39,13 @@ include_directories( ...@@ -31,13 +39,13 @@ include_directories(
${catkin_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}
) )
#add_library(nodelet_talker src/testnodelets/NodeletTalker.cpp) add_library(main_node src/mainNode/mainNode.cpp)
#add_dependencies(nodelet_talker ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp) add_dependencies(main_node ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp)
#target_link_libraries(nodelet_talker ${catkin_LIBRARIES}) target_link_libraries(main_node ${catkin_LIBRARIES})
install( install(
TARGETS TARGETS
#nodelet_talker main_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
...@@ -45,7 +53,7 @@ install( ...@@ -45,7 +53,7 @@ install(
install( install(
DIRECTORY DIRECTORY
#include/testnodelets/ include/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
) )
......
#include <nodelet/nodelet.h>
#include <ros/ros.h>
namespace car
{
class MainNode : public nodelet::Nodelet
{
public:
virtual void onInit();
MainNode(ros::NodeHandle &nh, std::string &name);
MainNode();
~MainNode();
private:
ros::NodeHandle nh_;
std::string name_;
};
}
float32 speed
float32 distance
float32 prevSpeed
bool enabled
string logMsg
bool enabled
float32 speed
float32 angle
float32 distance
<!-- <library path="lib/libmain_node">
<library path="lib/libnodelet_talker"> <class name="car/main_node"
<class name="autonom_a/nodelet_talker" type="car::mainNode"
type="autonom_a::NodeletTalker"
base_class_type="nodelet::Nodelet"> base_class_type="nodelet::Nodelet">
<description> <description>
This is my. This node holds the threads:
- C2C
- PC2C
- LOG
- PLC
- EGM
- CC
</description> </description>
</class> </class>
</library> </library>
-->
#include <pluginlib/class_list_macros.h>
#include <ros/ros.h>
#include "mainNode/mainNode.h"
PLUGINLIB_EXPORT_CLASS(car::MainNode, nodelet::Nodelet);
namespace car
{
MainNode::MainNode(ros::NodeHandle &nh, std::string &name) : nh_(nh), name_(name) {}
MainNode::MainNode() {}
MainNode::~MainNode() {}
void MainNode::onInit()
{
NODELET_INFO("MainNode::onInit -- START");
// CODE GOES HERE
NODELET_INFO("MainNode::onInit -- END");
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment