-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dejan Pangercic
committed
Jun 25, 2014
1 parent
7b0d3d7
commit b0535a1
Showing
7 changed files
with
758 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
cmake_minimum_required(VERSION 2.4.6) | ||
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) | ||
|
||
# Set the build type. Options are: | ||
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage | ||
# Debug : w/ debug symbols, w/o optimization | ||
# Release : w/o debug symbols, w/ optimization | ||
# RelWithDebInfo : w/ debug symbols, w/ optimization | ||
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries | ||
#set(ROS_BUILD_TYPE RelWithDebInfo) | ||
|
||
rosbuild_init() | ||
|
||
#set the default path for built executables to the "bin" directory | ||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) | ||
#set the default path for built libraries to the "lib" directory | ||
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) | ||
|
||
#uncomment if you have defined messages | ||
#rosbuild_genmsg() | ||
#uncomment if you have defined services | ||
#rosbuild_gensrv() | ||
|
||
find_package(Eigen REQUIRED) | ||
include_directories(${EIGEN_INCLUDE_DIRS}) | ||
add_definitions(${EIGEN_DEFINITIONS}) | ||
|
||
#common commands for building c++ executables and libraries | ||
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp) | ||
#target_link_libraries(${PROJECT_NAME} another_library) | ||
#rosbuild_add_boost_directories() | ||
#rosbuild_link_boost(${PROJECT_NAME} thread) | ||
rosbuild_add_executable(SnapMapICP src/SnapMapICP.cpp) | ||
rosbuild_add_executable(TFpub src/TFpub.cpp) | ||
rosbuild_add_executable(FreezeCloud2 src/FreezeCloud2.cpp) | ||
|
||
#target_link_libraries(example ${PROJECT_NAME}) |
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 @@ | ||
include $(shell rospack find mk)/cmake.mk |
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,26 @@ | ||
/** | ||
\mainpage | ||
\htmlinclude manifest.html | ||
|
||
\b SnapMapICP is ... | ||
|
||
<!-- | ||
Provide an overview of your package. | ||
--> | ||
|
||
|
||
\section codeapi Code API | ||
|
||
<!-- | ||
Provide links to specific auto-generated API documentation within your | ||
package that is of particular interest to a reader. Doxygen will | ||
document pretty much every part of your code, so do your best here to | ||
point the reader to the actual API. | ||
|
||
If your codebase is fairly large or has different sets of APIs, you | ||
should use the doxygen 'group' tag to keep these APIs together. For | ||
example, the roscpp documentation has 'libros' group. | ||
--> | ||
|
||
|
||
*/ |
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,18 @@ | ||
<package> | ||
<description brief="SnapMapICP"> | ||
|
||
SnapMapICP | ||
|
||
</description> | ||
<author>Thomas Ruehr</author> | ||
<license>BSD</license> | ||
<review status="unreviewed" notes=""/> | ||
<url>http://ros.org/wiki/SnapMapICP</url> | ||
<depend package="std_msgs"/> | ||
<depend package="pcl"/> | ||
<depend package="nav_msgs"/> | ||
<depend package="laser_geometry"/> | ||
|
||
</package> | ||
|
||
|
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,65 @@ | ||
/* | ||
* Copyright (c) 2010, Thomas Ruehr <[email protected]> | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* * Neither the name of Willow Garage, Inc. nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#include <ros/ros.h> | ||
|
||
#include <sensor_msgs/PointCloud2.h> | ||
#include <string> | ||
|
||
int main(int argc, char** argv) | ||
{ | ||
|
||
// Init the ROS node | ||
ros::init(argc, argv, "freezecloud2"); | ||
|
||
ROS_INFO("USAGE: FreezeCloud2 input_topic output_topic"); | ||
ROS_INFO("Will wait for a PointCloud2 on input_topic and publish it once on output_topic"); | ||
if (argc > 2) { | ||
ROS_INFO("input_topic %s output_topic %s", argv[1], argv[2]); | ||
} else { | ||
exit(0); | ||
} | ||
|
||
ros::NodeHandle nh_; | ||
|
||
ros::Rate loop_rate(10); | ||
|
||
sensor_msgs::PointCloud2 cloud2 = *(ros::topic::waitForMessage<sensor_msgs::PointCloud2>(argv[1])); | ||
|
||
ros::Publisher pub = nh_.advertise<sensor_msgs::PointCloud2> (std::string(argv[2]),1,true); | ||
|
||
pub.publish(cloud2); | ||
ROS_INFO("PUBLISHED"); | ||
while (ros::ok()) | ||
{ | ||
loop_rate.sleep(); | ||
ros::spinOnce(); | ||
} | ||
|
||
} |
Oops, something went wrong.