Skip to content
Snippets Groups Projects
Commit 8e0f4746 authored by Steven Lange's avatar Steven Lange
Browse files

Fixed a bug and added a launch-file

parent 66ede789
No related merge requests found
#ifndef MAINNODE_H
#define MAINNODE_H
#include <nodelet/nodelet.h>
#include <ros/ros.h>
#include "bost/thread.hpp"
namespace car
{
......@@ -13,5 +17,8 @@ namespace car
private:
ros::NodeHandle nh_;
std::string name_;
boost::thread loggerModule;
ros::Publisher logEnabled;
};
}
#endif
<launch>
<node pkg="nodelet" type="nodelet" name="Master" args="manager" output="screen">
<param name="num_worker_threads" value="16" />
</node>
<node pkg="nodelet" type="nodelet" name="nodelet_main_node" args="load car/main_node Master"/>
</launch>
<!--
<node pkg="nodelet" type="nodelet" name="" args="load car/ Master"/>
-->
<library path="lib/libmain_node">
<class name="car/main_node"
type="car::mainNode"
type="car::MainNode"
base_class_type="nodelet::Nodelet">
<description>
This node holds the threads:
......
......@@ -3,6 +3,15 @@
#include "mainNode/mainNode.h"
#include "car/camDataMsg.h"
#include "car/ccDataMsg.h"
#include "car/environmentDataMsg.h"
#include "car/logEnabledMsg.h"
#include "car/logStringMsg.h"
#include "car/rcEnabledMsg.h"
#include "car/stmDataMsg.h"
#include "car/ussDataMsg.h"
PLUGINLIB_EXPORT_CLASS(car::MainNode, nodelet::Nodelet);
namespace car
......@@ -13,7 +22,10 @@ namespace car
void MainNode::onInit()
{
NODELET_INFO("MainNode::onInit -- START");
// CODE GOES HERE
logEnabled = nh_.advertise<logEnabledMsg>("logEnabled", 5);
// 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