-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #906 from tue-robotics/fix/odometer
Fix odometer
- Loading branch information
Showing
5 changed files
with
62 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(test_tools) | ||
|
||
find_package(catkin REQUIRED COMPONENTS | ||
) | ||
find_package(catkin REQUIRED) | ||
|
||
catkin_python_setup() | ||
|
||
catkin_package() | ||
|
||
# if (CATKIN_ENABLE_TESTING) | ||
# catkin_add_nosetests(test) | ||
# endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#! /usr/bin/env python | ||
|
||
import rospy | ||
from test_tools import odometer | ||
|
||
rospy.init_node("odometer") | ||
|
||
r = float(rospy.get_param("~rate", 1/60.0)) | ||
length = int(rospy.get_param("~buffer_length", 1)) | ||
path = rospy.get_param("~path", odometer.DEFAULT_PATH) | ||
filename = rospy.get_param("~filename", odometer.DEFAULT_FILENAME) | ||
|
||
meter = odometer.Odometer(path, filename) | ||
rate = rospy.Rate(max(r, 1e-3)) | ||
|
||
while not rospy.is_shutdown(): | ||
meter.sample() | ||
meter.activate_write(length) | ||
rate.sleep() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env python | ||
|
||
from distutils.core import setup | ||
from catkin_pkg.python_setup import generate_distutils_setup | ||
|
||
d = generate_distutils_setup( | ||
# # don't do this unless you want a globally visible script | ||
# scripts=['bin/myscript'], | ||
packages=['test_tools'], | ||
package_dir={'': 'src'} | ||
) | ||
|
||
setup(**d) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters