Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78319224
transport_delay.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Aug 19, 19:29
Size
779 B
Mime Type
text/x-c++
Expires
Wed, Aug 21, 19:29 (2 d)
Engine
blob
Format
Raw Data
Handle
20024419
Attached To
R1517 test_package
transport_delay.cpp
View Options
#include "ros/ros.h"
#include "boost/thread.hpp"
#include "boost/thread/mutex.hpp"
#include "boost/circular_buffer.hpp"
#include "test_package/aircraft_controls.h"
class
TDelay
{
public
:
TDelay
(
const
ros
::
NodeHandle
&
n
);
virtual
~
TDelay
(){}
/** main loop */
void
run
();
private
:
double
delay_mean
;
double
delay_deviation
;
boost
::
circular_buffer
<
test_package
::
aircraft_controls
>
buffer
;
boost
::
mutex
m_mutex
;
std
::
shared_ptr
<
ros
::
NodeHandle
>
nh
;
ros
::
Publisher
pub
;
ros
::
Subscriber
sub
;
void
inputCallback
(
const
test_package
::
aircraft_controls
::
Ptr
&
input
);
void
publish
();
};
TDelay
::
TDelay
(
const
ros
::
NodeHandle
&
n
)
{
nh
=
std
::
make_shared
<
ros
::
NodeHandle
>
(
n
);
}
int
main
(
int
argc
,
char
**
argv
)
{
return
0
;
}
Event Timeline
Log In to Comment