|
From: <is...@us...> - 2009-09-04 01:31:29
|
Revision: 23807
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=23807&view=rev
Author: isucan
Date: 2009-09-04 01:31:22 +0000 (Fri, 04 Sep 2009)
Log Message:
-----------
removing draw rays debug app
Modified Paths:
--------------
pkg/trunk/motion_planning/robot_self_filter/CMakeLists.txt
Removed Paths:
-------------
pkg/trunk/motion_planning/robot_self_filter/src/draw_rays.cpp
Modified: pkg/trunk/motion_planning/robot_self_filter/CMakeLists.txt
===================================================================
--- pkg/trunk/motion_planning/robot_self_filter/CMakeLists.txt 2009-09-04 01:16:47 UTC (rev 23806)
+++ pkg/trunk/motion_planning/robot_self_filter/CMakeLists.txt 2009-09-04 01:31:22 UTC (rev 23807)
@@ -24,7 +24,3 @@
rospack_add_executable(self_filter src/self_filter.cpp)
rospack_add_openmp_flags(self_filter)
target_link_libraries(self_filter robot_self_filter)
-
-rospack_add_executable(draw_rays src/draw_rays.cpp)
-rospack_add_openmp_flags(draw_rays)
-target_link_libraries(draw_rays robot_self_filter)
Deleted: pkg/trunk/motion_planning/robot_self_filter/src/draw_rays.cpp
===================================================================
--- pkg/trunk/motion_planning/robot_self_filter/src/draw_rays.cpp 2009-09-04 01:16:47 UTC (rev 23806)
+++ pkg/trunk/motion_planning/robot_self_filter/src/draw_rays.cpp 2009-09-04 01:31:22 UTC (rev 23807)
@@ -1,140 +0,0 @@
-/*********************************************************************
-* Software License Agreement (BSD License)
-*
-* Copyright (c) 2008, Willow Garage, Inc.
-* 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 the Willow Garage 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.
-*********************************************************************/
-
-/** \author Ioan Sucan */
-
-#include <ros/ros.h>
-#include <visualization_msgs/Marker.h>
-#include <sensor_msgs/PointCloud.h>
-#include <tf/message_notifier.h>
-#include <tf/transform_listener.h>
-
-class DrawRays
-{
-public:
-
- DrawRays(void) : cloudNotifier_(tf_, boost::bind(&DrawRays::cloudCallback, this, _1), "cloud_in", "laser_tilt_mount_link", 1)
- {
- id_ = 1;
- vmPub_ = nodeHandle_.advertise<visualization_msgs::Marker>("visualization_marker", 10240);
- nodeHandle_.param<std::string>("~sensor_frame", sensor_frame_, "laser_tilt_mount_link");
- }
-
- ~DrawRays(void)
- {
- }
-
- void cloudCallback(const sensor_msgs::PointCloudConstPtr &cloud)
- {
- // compute the origin of the sensor in the frame of the cloud
- btVector3 sensor_pos;
- try
- {
- tf::Stamped<btTransform> transf;
- tf_.lookupTransform(cloud->header.frame_id, sensor_frame_, cloud->header.stamp, transf);
- sensor_pos = transf.getOrigin();
- }
- catch(...)
- {
- sensor_pos.setValue(0, 0, 0);
- ROS_ERROR("Unable to lookup transform from %s to %s", sensor_frame_.c_str(), cloud->header.frame_id.c_str());
- }
- for (unsigned int i = 0 ; i < cloud->points.size() ; ++i)
- sendLine(cloud->header, cloud->points[i].x, cloud->points[i].y, cloud->points[i].z, sensor_pos.x(), sensor_pos.y(), sensor_pos.z());
- id_ = 1;
- }
-
- void sendLine(const roslib::Header &header, double x1, double y1, double z1, double x2, double y2, double z2)
- {
- visualization_msgs::Marker mk;
-
- mk.header = header;
-
- mk.ns = "draw_rays";
- mk.id = id_++;
- mk.type = visualization_msgs::Marker::ARROW;
- mk.action = visualization_msgs::Marker::ADD;
- mk.pose.position.x = 0;
- mk.pose.position.y = 0;
- mk.pose.position.z = 0;
- mk.pose.orientation.x = 0;
- mk.pose.orientation.y = 0;
- mk.pose.orientation.z = 0;
- mk.pose.orientation.w = 1.0;
-
- mk.scale.x = mk.scale.y = mk.scale.z = 0.01;
-
- mk.color.a = 1.0;
- mk.color.r = 0.7;
- mk.color.g = 0.4;
- mk.color.b = 0.4;
-
- mk.points.resize(2);
- mk.points[0].x = x1;
- mk.points[0].y = y1;
- mk.points[0].z = z1;
-
- mk.points[1].x = x2;
- mk.points[1].y = y2;
- mk.points[1].z = z2;
-
- mk.lifetime = ros::Duration(2);
-
- vmPub_.publish(mk);
- }
-
-protected:
-
-
- ros::NodeHandle nodeHandle_;
- tf::TransformListener tf_;
- tf::MessageNotifier<sensor_msgs::PointCloud> cloudNotifier_;
- std::string sensor_frame_;
-
- ros::Publisher vmPub_;
- int id_;
-};
-
-int main(int argc, char **argv)
-{
- ros::init(argc, argv, "draw_rays");
-
- DrawRays t;
- ros::spin();
-
- return 0;
-}
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|