|
From: <sf...@us...> - 2009-08-10 04:34:51
|
Revision: 21307
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21307&view=rev
Author: sfkwc
Date: 2009-08-10 04:34:44 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
#2304 pluginlib now part of common
Added Paths:
-----------
pkg/trunk/stacks/common/pluginlib/
Removed Paths:
-------------
pkg/trunk/sandbox/pluginlib/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sf...@us...> - 2009-08-10 07:46:23
|
Revision: 21336
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21336&view=rev
Author: sfkwc
Date: 2009-08-10 07:46:11 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
cleanup
Modified Paths:
--------------
pkg/trunk/pr2/stack.xml
pkg/trunk/vision/stack.xml
Modified: pkg/trunk/pr2/stack.xml
===================================================================
--- pkg/trunk/pr2/stack.xml 2009-08-10 07:41:16 UTC (rev 21335)
+++ pkg/trunk/pr2/stack.xml 2009-08-10 07:46:11 UTC (rev 21336)
@@ -11,12 +11,12 @@
<depend stack="visualization"/> <!-- rviz -->
<depend stack="3rdparty"/> <!-- spacenav -->
<depend stack="calibration"/> <!-- auto_arm_commander -->
- <depend stack="hardware_test"/> <!-- runtime_monitor, runtime_monitor -->
- <depend stack="mechanism"/> <!-- mechanism_control, mechanism_bringup, mechanism_control, mechanism_bringup, mechanism_msgs, mechanism_msgs, mechanism_control, mechanism_control, mechanism_msgs, mechanism_msgs -->
- <depend stack="controllers"/> <!-- pr2_mechanism_controllers, robot_mechanism_controllers, robot_mechanism_controllers, dynamic_verification_controllers, joint_qualification_controllers, pr2_mechanism_controllers, robot_mechanism_controllers, robot_mechanism_controllers, joint_qualification_controllers, robot_mechanism_controllers, robot_mechanism_controllers, pr2_mechanism_controllers -->
+ <depend stack="hardware_test"/> <!-- runtime_monitor -->
+ <depend stack="mechanism"/> <!-- mechanism_control, mechanism_bringup, mechanism_msgs -->
+ <depend stack="controllers"/> <!-- pr2_mechanism_controllers, robot_mechanism_controllers, dynamic_verification_controllers, joint_qualification_controllers -->
<depend stack="opencv"/> <!-- opencv_latest -->
- <depend stack="ros"/> <!-- rospy, roslaunch, rospy, std_msgs, rospy, roslaunch, std_msgs, rospy, rospy, rospy, roscpp, std_msgs, rospy, std_msgs, roscpp, rospy, std_msgs, roscpp, std_msgs, roscpp, std_msgs, roscpp -->
+ <depend stack="ros"/> <!-- rospy, roslaunch, std_msgs, roscpp -->
<depend stack="drivers"/> <!-- forearm_cam -->
- <depend stack="common_msgs"/> <!-- robot_srvs, robot_msgs, robot_srvs, diagnostic_msgs, diagnostic_msgs, robot_msgs, diagnostic_msgs, robot_srvs, robot_msgs, robot_msgs, robot_msgs, robot_msgs, robot_msgs -->
+ <depend stack="common_msgs"/> <!-- robot_srvs, robot_msgs, diagnostic_msgs -->
</stack>
Modified: pkg/trunk/vision/stack.xml
===================================================================
--- pkg/trunk/vision/stack.xml 2009-08-10 07:41:16 UTC (rev 21335)
+++ pkg/trunk/vision/stack.xml 2009-08-10 07:46:11 UTC (rev 21336)
@@ -10,18 +10,18 @@
<depend stack="controllers"/> <!-- pr2_mechanism_controllers -->
<depend stack="3rdparty"/> <!-- toro, neven -->
- <depend stack="calibration"/> <!-- calibration_msgs, kinematic_calibration, calibration_msgs -->
- <depend stack="geometry"/> <!-- eigen, tf, tf, kdl, angles, tf, eigen, tf, tf, tf, tf, bullet, tf, tf, eigen, tf -->
+ <depend stack="calibration"/> <!-- calibration_msgs, kinematic_calibration -->
+ <depend stack="geometry"/> <!-- eigen, tf, kdl, angles, bullet-->
<depend stack="navigation"/> <!-- map_server, amcl, nav_view -->
<depend stack="drivers"/> <!-- axis_cam -->
<depend stack="semantic_mapping"/> <!-- point_cloud_mapping, FLANN, point_cloud_mapping, ANN -->
- <depend stack="util"/> <!-- image_utils, image_utils, topic_synchronizer, topic_synchronizer, image_utils, topic_synchronizer, topic_synchronizer, message_sequencing, image_utils, topic_synchronizer, topic_synchronizer, image_utils -->
- <depend stack="opencv"/> <!-- opencv_latest, opencv_latest, opencvpython, opencv_latest, opencv_latest, opencv_latest, opencv_latest, opencv_latest, opencv_latest, opencv_latest, opencv_latest, opencv_latest, opencvpython, opencv_latest, opencv_latest, opencv_latest, opencv_latest, opencv_latest, opencv_latest -->
+ <depend stack="util"/> <!-- image_utils, topic_synchronizer -->
+ <depend stack="opencv"/> <!-- opencv_latest, opencvpython -->
<depend stack="camera_drivers"/> <!-- dcam, dcam, dcam -->
- <depend stack="common"/> <!-- robot_actions, filters, robot_actions, laser_scan, bfl, robot_actions, python_actions -->
+ <depend stack="common"/> <!-- robot_actions, filters, laser_scan, bfl, python_actions -->
<depend stack="highlevel"/> <!-- door_msgs -->
- <depend stack="ros"/> <!-- roscpp, rostest, rospy, roscpp, rostest, rospy, std_msgs, rosrecord, roscpp, std_srvs, roscpp, roscpp, std_msgs, roscpp, std_msgs, std_msgs, std_srvs, roscpp, rospy, rostest, roscpp, std_msgs, std_srvs, roscpp, std_msgs, roscpp, std_msgs, std_srvs, rospy, rosrecord, rospy, rosrecord, std_msgs, roscpp, roscpp, roscpp, std_msgs, std_srvs, roscpp, roscpp, std_msgs, rospy, roscpp, std_msgs, roscpp, std_msgs, std_srvs -->
- <depend stack="visualization_core"/> <!-- visualization_msgs, visualization_msgs, visualization_msgs, visualization_msgs -->
- <depend stack="common_msgs"/> <!-- sensor_msgs, robot_msgs, sensor_msgs, sensor_msgs, robot_msgs, robot_msgs, geometry_msgs, robot_srvs, sensor_msgs, mapping_msgs, robot_msgs, sensor_msgs, sensor_msgs, robot_msgs, sensor_msgs, geometry_msgs, sensor_msgs, sensor_msgs, sensor_msgs, robot_msgs, robot_msgs, sensor_msgs, robot_msgs, sensor_msgs, sensor_msgs, robot_msgs, sensor_msgs, sensor_msgs -->
+ <depend stack="ros"/> <!-- roscpp, rostest, rospy, std_msgs, rosrecord, std_srvs -->
+ <depend stack="visualization_core"/> <!-- visualization_msgs -->
+ <depend stack="common_msgs"/> <!-- sensor_msgs, geometry_msgs -->
</stack>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sf...@us...> - 2009-08-10 07:55:45
|
Revision: 21339
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21339&view=rev
Author: sfkwc
Date: 2009-08-10 07:55:36 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
Moving stereo messages out of sensor_msgs to stereo/stereo_msgs
Modified Paths:
--------------
pkg/trunk/calibration/kinematic_calibration/manifest.xml
pkg/trunk/calibration/kinematic_calibration/src/sensor_kinematics_grabber.cpp
pkg/trunk/calibration/sandbox/laser_head_updater/manifest.xml
pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf.cpp
pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf_pre.cpp
pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf_prg.cpp
pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/ros_stereo_camera.h
pkg/trunk/drivers/simulator/gazebo_plugin/manifest.xml
pkg/trunk/drivers/simulator/gazebo_plugin/src/ros_stereo_camera.cpp
pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/projection.h
pkg/trunk/mapping/annotated_planar_patch_map/manifest.xml
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_info.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_pcd_via_service.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_planar_patch_map.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map_via_service.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/empty_annotated_map.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/projection.cpp
pkg/trunk/mapping/door_stereo_detector/manifest.xml
pkg/trunk/mapping/door_stereo_detector/src/door_stereo_detector.cpp
pkg/trunk/sandbox/annotated_map_builder/manifest.xml
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/executive_data_collector.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action2.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/select_interesting_images.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/wait_for_k_messages_action.py
pkg/trunk/sandbox/annotated_map_builder/test/test_head.py
pkg/trunk/sandbox/annotated_map_builder/test/test_head2.py
pkg/trunk/sandbox/annotated_map_builder/test/test_snd_goal.py
pkg/trunk/sandbox/annotated_map_builder/test/test_wait_K_messages.py
pkg/trunk/sandbox/person_follower/manifest.xml
pkg/trunk/sandbox/person_follower/src/executive_data_collector.py
pkg/trunk/sandbox/person_follower/src/move_head_action.py
pkg/trunk/sandbox/person_follower/src/select_interesting_images.py
pkg/trunk/sandbox/person_follower/src/wait_for_k_messages_action.py
pkg/trunk/sandbox/person_follower/test/test_snd_goal.py
pkg/trunk/sandbox/person_follower/test/test_wait_K_messages.py
pkg/trunk/sandbox/planar_objects/manifest.xml
pkg/trunk/sandbox/planar_objects/src/box_detector.cpp
pkg/trunk/sandbox/planar_objects/src/box_detector.h
pkg/trunk/sandbox/planar_objects/src/cornercandidate.h
pkg/trunk/sandbox/planar_objects/src/stereo_throttle.cpp
pkg/trunk/sandbox/planar_objects/src/stereo_throttle.h
pkg/trunk/stacks/camera_drivers/dcam/manifest.xml
pkg/trunk/stacks/camera_drivers/dcam/src/nodes/dcam.cpp
pkg/trunk/stacks/camera_drivers/dcam/src/nodes/stereodcam.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/manifest.xml
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/handle_detector_vision.cpp
pkg/trunk/stacks/simulators/stage/src/stageros.cpp
pkg/trunk/stacks/stereo/stereo_image_proc/include/cam_bridge.h
pkg/trunk/stacks/stereo/stereo_image_proc/manifest.xml
pkg/trunk/stacks/stereo/stereo_image_proc/src/imageproc.cpp
pkg/trunk/stacks/stereo/stereo_image_proc/src/stereoproc.cpp
pkg/trunk/stacks/visual_feature_detectors/outlet_detection/manifest.xml
pkg/trunk/stacks/visual_feature_detectors/outlet_detection/src/outlet_spotting.cpp
pkg/trunk/stacks/visual_feature_detectors/outlet_detection/src/outlet_spotting2.cpp
pkg/trunk/vision/cv_mech_turk/manifest.xml
pkg/trunk/vision/cv_mech_turk/src/annotation_to_data_sync.py
pkg/trunk/vision/cv_mech_turk/src/mt_annotate_simple.py
pkg/trunk/vision/people/manifest.xml
pkg/trunk/vision/people/src/face_detection.cpp
pkg/trunk/vision/people/src/pedestrian_detector_HOG.cpp
pkg/trunk/vision/people/src/stereo_color_tracker.cpp
pkg/trunk/vision/people/src/stereo_face_color_tracker.cpp
pkg/trunk/vision/people/src/track_starter_gui.cpp
pkg/trunk/vision/recognition_lambertian/manifest.xml
pkg/trunk/vision/recognition_lambertian/src/publish_scene.cpp
pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp
pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp
pkg/trunk/vision/stereo_capture/manifest.xml
pkg/trunk/vision/stereo_capture/src/periodic_capture.cpp
pkg/trunk/vision/stereo_capture/src/stereo_capture.cpp
pkg/trunk/vision/stereo_view/manifest.xml
pkg/trunk/vision/stereo_view/stereo_view.cpp
pkg/trunk/vision/vision_tests/manifest.xml
pkg/trunk/vision/vision_tests/nodes/sink.py
pkg/trunk/vision/vision_tests/nodes/source.py
pkg/trunk/vision/visual_odometry/manifest.xml
pkg/trunk/vision/visual_odometry/nodes/diff.py
pkg/trunk/vision/visual_odometry/nodes/vo.py
pkg/trunk/vision/visual_odometry/scripts/mkgeo.py
pkg/trunk/vision/visual_odometry/scripts/mkrun.py
pkg/trunk/vision/vslam/manifest.xml
pkg/trunk/vision/vslam/nodes/fixplay.py
pkg/trunk/vision/vslam/nodes/picmap.py
pkg/trunk/vision/vslam/nodes/roadmap.py
pkg/trunk/vision/vslam/nodes/watchmap.py
Added Paths:
-----------
pkg/trunk/stacks/stereo/stereo_msgs/
pkg/trunk/stacks/stereo/stereo_msgs/CMakeLists.txt
pkg/trunk/stacks/stereo/stereo_msgs/Makefile
pkg/trunk/stacks/stereo/stereo_msgs/mainpage.dox
pkg/trunk/stacks/stereo/stereo_msgs/manifest.xml
pkg/trunk/stacks/stereo/stereo_msgs/msg/
pkg/trunk/stacks/stereo/stereo_msgs/msg/DisparityInfo.msg
pkg/trunk/stacks/stereo/stereo_msgs/msg/RawStereo.msg
pkg/trunk/stacks/stereo/stereo_msgs/msg/StereoInfo.msg
Removed Paths:
-------------
pkg/trunk/stacks/common_msgs/sensor_msgs/msg/DisparityInfo.msg
pkg/trunk/stacks/common_msgs/sensor_msgs/msg/RawStereo.msg
pkg/trunk/stacks/common_msgs/sensor_msgs/msg/StereoInfo.msg
Modified: pkg/trunk/calibration/kinematic_calibration/manifest.xml
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/manifest.xml 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/calibration/kinematic_calibration/manifest.xml 2009-08-10 07:55:36 UTC (rev 21339)
@@ -13,6 +13,7 @@
<depend package="sensor_msgs" />
<depend package="newmat10"/>
<depend package="pr2_mechanism_controllers" />
+ <depend package="stereo_msgs"/>
# For Scripts
<depend package="rosrecord" />
Modified: pkg/trunk/calibration/kinematic_calibration/src/sensor_kinematics_grabber.cpp
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/src/sensor_kinematics_grabber.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/calibration/kinematic_calibration/src/sensor_kinematics_grabber.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -44,7 +44,7 @@
#include "std_msgs/Empty.h"
#include "sensor_msgs/PointCloud.h"
-#include "sensor_msgs/RawStereo.h"
+#include "stereo_msgs/RawStereo.h"
#include "sensor_msgs/Image.h"
#include "sensor_msgs/CameraInfo.h"
@@ -87,8 +87,8 @@
std_msgs::Empty capture_msg_ ;
// Dcam messages
- sensor_msgs::RawStereo raw_stereo_ ;
- sensor_msgs::RawStereo safe_raw_stereo_ ;
+ stereo_msgs::RawStereo raw_stereo_ ;
+ stereo_msgs::RawStereo safe_raw_stereo_ ;
boost::mutex raw_stereo_lock_ ;
// HiRes Camera messages
Modified: pkg/trunk/calibration/sandbox/laser_head_updater/manifest.xml
===================================================================
--- pkg/trunk/calibration/sandbox/laser_head_updater/manifest.xml 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/calibration/sandbox/laser_head_updater/manifest.xml 2009-08-10 07:55:36 UTC (rev 21339)
@@ -10,5 +10,6 @@
<depend package="tf" />
<depend package="laser_scan" />
<depend package="sensor_msgs" />
+ <depend package="stereo_msgs"/>
</package>
Modified: pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf.cpp
===================================================================
--- pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -40,7 +40,7 @@
#include "tf/transform_datatypes.h"
#include "mechanism_msgs/MechanismState.h"
#include "sensor_msgs/LaserScan.h"
-#include "sensor_msgs/RawStereo.h"
+#include "stereo_msgs/RawStereo.h"
class LaserHeadKinematics
{
@@ -62,14 +62,14 @@
&LaserHeadKinematics::updateTiltScan, this) ;
// Raw Stereo Updates
- stereo_pub_ = nh.advertise<sensor_msgs::RawStereo>("/stereo/raw_stereo_cal", 100) ;
+ stereo_pub_ = nh.advertise<stereo_msgs::RawStereo>("/stereo/raw_stereo_cal", 100) ;
stereo_sub_ = nh.subscribe("/stereo/raw_stereo", 100,
&LaserHeadKinematics::updateStereo, this) ;
}
- void updateStereo(const sensor_msgs::RawStereoConstPtr& msg_in)
+ void updateStereo(const stereo_msgs::RawStereoConstPtr& msg_in)
{
- sensor_msgs::RawStereo msg_out ;
+ stereo_msgs::RawStereo msg_out ;
msg_out = *msg_in ;
msg_out.header.frame_id = "stereo_optical_frame_cal" ;
stereo_pub_.publish(msg_out) ;
Modified: pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf_pre.cpp
===================================================================
--- pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf_pre.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf_pre.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -40,7 +40,7 @@
#include "tf/transform_datatypes.h"
#include "mechanism_msgs/MechanismState.h"
#include "sensor_msgs/LaserScan.h"
-#include "sensor_msgs/RawStereo.h"
+#include "stereo_msgs/RawStereo.h"
class LaserHeadKinematics
{
@@ -62,14 +62,14 @@
&LaserHeadKinematics::updateTiltScan, this) ;
// Raw Stereo Updates
- stereo_pub_ = nh.advertise<sensor_msgs::RawStereo>("/stereo/raw_stereo_cal", 100) ;
+ stereo_pub_ = nh.advertise<stereo_msgs::RawStereo>("/stereo/raw_stereo_cal", 100) ;
stereo_sub_ = nh.subscribe("/stereo/raw_stereo", 100,
&LaserHeadKinematics::updateStereo, this) ;
}
- void updateStereo(const sensor_msgs::RawStereoConstPtr& msg_in)
+ void updateStereo(const stereo_msgs::RawStereoConstPtr& msg_in)
{
- sensor_msgs::RawStereo msg_out ;
+ stereo_msgs::RawStereo msg_out ;
msg_out = *msg_in ;
msg_out.header.frame_id = "stereo_optical_frame_cal" ;
msg_out.right_info.P[3] = PR_03_ ;
Modified: pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf_prg.cpp
===================================================================
--- pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf_prg.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/calibration/sandbox/laser_head_updater/src/publish_laser_head_tf_prg.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -40,7 +40,7 @@
#include "tf/transform_datatypes.h"
#include "mechanism_msgs/MechanismState.h"
#include "sensor_msgs/LaserScan.h"
-#include "sensor_msgs/RawStereo.h"
+#include "stereo_msgs/RawStereo.h"
class LaserHeadKinematics
{
@@ -62,14 +62,14 @@
&LaserHeadKinematics::updateTiltScan, this) ;
// Raw Stereo Updates
- stereo_pub_ = nh.advertise<sensor_msgs::RawStereo>("/stereo/raw_stereo_cal", 100) ;
+ stereo_pub_ = nh.advertise<stereo_msgs::RawStereo>("/stereo/raw_stereo_cal", 100) ;
stereo_sub_ = nh.subscribe("/stereo/raw_stereo", 100,
&LaserHeadKinematics::updateStereo, this) ;
}
- void updateStereo(const sensor_msgs::RawStereoConstPtr& msg_in)
+ void updateStereo(const stereo_msgs::RawStereoConstPtr& msg_in)
{
- sensor_msgs::RawStereo msg_out ;
+ stereo_msgs::RawStereo msg_out ;
msg_out = *msg_in ;
msg_out.header.frame_id = "stereo_optical_frame_cal" ;
msg_out.right_info.P[3] = PR_03_ ;
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/ros_stereo_camera.h
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/ros_stereo_camera.h 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/ros_stereo_camera.h 2009-08-10 07:55:36 UTC (rev 21339)
@@ -38,10 +38,10 @@
// raw_stereo components
#include <sensor_msgs/Image.h>
-#include "sensor_msgs/RawStereo.h"
-#include "sensor_msgs/StereoInfo.h"
+#include "stereo_msgs/RawStereo.h"
+#include "stereo_msgs/StereoInfo.h"
#include "sensor_msgs/CameraInfo.h"
-#include "sensor_msgs/DisparityInfo.h"
+#include "stereo_msgs/DisparityInfo.h"
namespace gazebo
{
@@ -164,12 +164,12 @@
/// \brief ros message
/// \brief construct raw stereo message
- private: sensor_msgs::RawStereo rawStereoMsg;
+ private: stereo_msgs::RawStereo rawStereoMsg;
private: sensor_msgs::Image* leftImageMsg;
private: sensor_msgs::Image* rightImageMsg;
private: sensor_msgs::CameraInfo* leftCameraInfoMsg;
private: sensor_msgs::CameraInfo* rightCameraInfoMsg;
- private: sensor_msgs::StereoInfo* stereoInfoMsg;
+ private: stereo_msgs::StereoInfo* stereoInfoMsg;
/// \brief A mutex to lock access to fields that are used in message callbacks
private: boost::mutex lock;
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/manifest.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/manifest.xml 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/manifest.xml 2009-08-10 07:55:36 UTC (rev 21339)
@@ -21,6 +21,7 @@
<depend package="sensor_msgs" />
<depend package="opencv_latest" />
<depend package="sensor_msgs" />
+ <depend package="stereo_msgs"/>
<depend package="pr2_msgs" />
<depend package="geometry_msgs" />
<depend package="diagnostic_msgs" />
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/src/ros_stereo_camera.cpp
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/src/ros_stereo_camera.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/src/ros_stereo_camera.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -168,7 +168,7 @@
// advertise node topics
ROS_DEBUG("stereo: advertise topicName %s\n",this->topicName.c_str());
- this->pub_ = this->rosnode_->advertise<sensor_msgs::RawStereo>(this->topicName, 1);
+ this->pub_ = this->rosnode_->advertise<stereo_msgs::RawStereo>(this->topicName, 1);
// iterate through children of the model parent to find left and right camera sensors
std::vector<Entity*> sibling = this->myParent->GetChildren();
Modified: pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/projection.h
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/projection.h 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/projection.h 2009-08-10 07:55:36 UTC (rev 21339)
@@ -50,7 +50,7 @@
#include <tf/transform_listener.h>
#include <mapping_msgs/PolygonalMap.h>
-#include <sensor_msgs/StereoInfo.h>
+#include <stereo_msgs/StereoInfo.h>
#include <sensor_msgs/CameraInfo.h>
#include <annotated_map_msgs/TaggedPolygonalMap.h>
#include <annotated_map_msgs/TaggedPolygon3D.h>
@@ -64,7 +64,7 @@
void projectAnyObject(const sensor_msgs::CameraInfo& cam_info,geometry_msgs::Polygon polyIn,geometry_msgs::Polygon& polyOut);
-void projectAnyObject(const sensor_msgs::StereoInfo& stereo_info_, const annotated_map_msgs::TaggedPolygonalMap& transformed_map_3D, annotated_map_msgs::TaggedPolygonalMap &transformed_map_2D);
+void projectAnyObject(const stereo_msgs::StereoInfo& stereo_info_, const annotated_map_msgs::TaggedPolygonalMap& transformed_map_3D, annotated_map_msgs::TaggedPolygonalMap &transformed_map_2D);
void projectAnyObject(const sensor_msgs::CameraInfo& cam_info_, const annotated_map_msgs::TaggedPolygonalMap& transformed_map_3D, annotated_map_msgs::TaggedPolygonalMap &transformed_map_2D);
@@ -73,7 +73,7 @@
-void projectPolygonalMap(const sensor_msgs::StereoInfo& stereo_info_, const mapping_msgs::PolygonalMap& transformed_map_3D, mapping_msgs::PolygonalMap &transformed_map_2D);
+void projectPolygonalMap(const stereo_msgs::StereoInfo& stereo_info_, const mapping_msgs::PolygonalMap& transformed_map_3D, mapping_msgs::PolygonalMap &transformed_map_2D);
void projectPolygonPoints(double* projection,double img_w, double img_h, geometry_msgs::Polygon polyIn,geometry_msgs::Polygon& polyOut);
Modified: pkg/trunk/mapping/annotated_planar_patch_map/manifest.xml
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/manifest.xml 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/annotated_planar_patch_map/manifest.xml 2009-08-10 07:55:36 UTC (rev 21339)
@@ -12,6 +12,7 @@
<depend package="std_msgs"/>
<depend package="mapping_msgs" />
<depend package="sensor_msgs" />
+ <depend package="stereo_msgs" />
<depend package="geometry_msgs" />
<depend package="annotated_map_msgs"/>
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_info.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_info.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_info.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -49,7 +49,7 @@
#include <mapping_msgs/PolygonalMap.h>
-#include <sensor_msgs/StereoInfo.h>
+#include <stereo_msgs/StereoInfo.h>
#include <cv_mech_turk/ExternalAnnotation.h>
#include <annotated_map_msgs/TaggedPolygonalMap.h>
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_pcd_via_service.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_pcd_via_service.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_pcd_via_service.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -53,7 +53,7 @@
#include <mapping_msgs/PolygonalMap.h>
-#include <sensor_msgs/StereoInfo.h>
+#include <stereo_msgs/StereoInfo.h>
#include <sensor_msgs/CameraInfo.h>
#include <sensor_msgs/Image.h>
#include <std_msgs/ColorRGBA.h>
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_planar_patch_map.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_planar_patch_map.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_planar_patch_map.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -53,7 +53,7 @@
#include <mapping_msgs/PolygonalMap.h>
-#include <sensor_msgs/StereoInfo.h>
+#include <stereo_msgs/StereoInfo.h>
#include <cv_mech_turk/ExternalAnnotation.h>
#include <annotated_map_msgs/TaggedPolygonalMap.h>
@@ -358,7 +358,7 @@
cv_mech_turk::ExternalAnnotation annotation2d_object_;
mapping_msgs::PolygonalMap unlabeled_map_;
- sensor_msgs::StereoInfo stereo_info_;
+ stereo_msgs::StereoInfo stereo_info_;
std::string target_frame_;
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -53,7 +53,7 @@
#include <mapping_msgs/PolygonalMap.h>
-#include <sensor_msgs/StereoInfo.h>
+#include <stereo_msgs/StereoInfo.h>
#include <sensor_msgs/CameraInfo.h>
#include <cv_mech_turk/ExternalAnnotation.h>
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map_via_service.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map_via_service.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map_via_service.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -53,7 +53,7 @@
#include <mapping_msgs/PolygonalMap.h>
-#include <sensor_msgs/StereoInfo.h>
+#include <stereo_msgs/StereoInfo.h>
#include <sensor_msgs/CameraInfo.h>
#include "tf/message_notifier.h"
@@ -131,7 +131,7 @@
lifted_pub_=n_.advertise<annotated_map_msgs::TaggedPolygonalMap>(out_topic_name_,1);
};
- //void handleStereoInfo(sensor_msgs::StereoInfoConstPtr si)
+ //void handleStereoInfo(stereo_msgs::StereoInfoConstPtr si)
void handleStereoInfo()
{
ROS_INFO("StereoInfo\n");
@@ -417,10 +417,10 @@
protected:
tf::TransformListener *tf_;
- tf::MessageNotifier<sensor_msgs::StereoInfo>* scan_notifier_ ;
+ tf::MessageNotifier<stereo_msgs::StereoInfo>* scan_notifier_ ;
cv_mech_turk::ExternalAnnotation annotation2d_object_;
- sensor_msgs::StereoInfo stereo_info_;
+ stereo_msgs::StereoInfo stereo_info_;
//sensor_msgs::CameraInfo stereo_info_;
std::string fixed_frame_;
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/empty_annotated_map.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/empty_annotated_map.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/empty_annotated_map.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -50,7 +50,7 @@
#include <tf/transform_listener.h>
#include <mapping_msgs/PolygonalMap.h>
-#include <sensor_msgs/StereoInfo.h>
+#include <stereo_msgs/StereoInfo.h>
#include <annotated_map_msgs/TaggedPolygonalMap.h>
#include <annotated_map_msgs/TaggedPolygon3D.h>
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/projection.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/projection.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/projection.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -52,7 +52,7 @@
*
*/
-void annotated_planar_patch_map::projection::projectPolygonalMap(const sensor_msgs::StereoInfo& stereo_info, const mapping_msgs::PolygonalMap& transformed_map_3D, mapping_msgs::PolygonalMap &transformed_map_2D)
+void annotated_planar_patch_map::projection::projectPolygonalMap(const stereo_msgs::StereoInfo& stereo_info, const mapping_msgs::PolygonalMap& transformed_map_3D, mapping_msgs::PolygonalMap &transformed_map_2D)
{
//Get projections matrix
@@ -293,7 +293,7 @@
}
}
-void annotated_planar_patch_map::projection::projectAnyObject(const sensor_msgs::StereoInfo& stereo_info, const annotated_map_msgs::TaggedPolygonalMap& transformed_map_3D, annotated_map_msgs::TaggedPolygonalMap &transformed_map_2D)
+void annotated_planar_patch_map::projection::projectAnyObject(const stereo_msgs::StereoInfo& stereo_info, const annotated_map_msgs::TaggedPolygonalMap& transformed_map_3D, annotated_map_msgs::TaggedPolygonalMap &transformed_map_2D)
{
bool bSame = (&transformed_map_3D == &transformed_map_2D);
Modified: pkg/trunk/mapping/door_stereo_detector/manifest.xml
===================================================================
--- pkg/trunk/mapping/door_stereo_detector/manifest.xml 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/door_stereo_detector/manifest.xml 2009-08-10 07:55:36 UTC (rev 21339)
@@ -18,5 +18,6 @@
<depend package="sensor_msgs" />
<depend package="topic_synchronizer" />
<depend package="visualization_msgs" />
+ <depend package="stereo_msgs"/>
</package>
Modified: pkg/trunk/mapping/door_stereo_detector/src/door_stereo_detector.cpp
===================================================================
--- pkg/trunk/mapping/door_stereo_detector/src/door_stereo_detector.cpp 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/mapping/door_stereo_detector/src/door_stereo_detector.cpp 2009-08-10 07:55:36 UTC (rev 21339)
@@ -53,8 +53,8 @@
#include "opencv_latest/CvBridge.h"
-#include "sensor_msgs/StereoInfo.h"
-#include "sensor_msgs/DisparityInfo.h"
+#include "stereo_msgs/StereoInfo.h"
+#include "stereo_msgs/DisparityInfo.h"
#include "sensor_msgs/CameraInfo.h"
#include "sensor_msgs/Image.h"
@@ -107,8 +107,8 @@
sensor_msgs::Image limage;
sensor_msgs::Image dimage;
- sensor_msgs::StereoInfo stinfo;
- sensor_msgs::DisparityInfo dispinfo;
+ stereo_msgs::StereoInfo stinfo;
+ stereo_msgs::DisparityInfo dispinfo;
sensor_msgs::CameraInfo rcinfo;
sensor_msgs::CvBridge lbridge;
sensor_msgs::CvBridge rbridge;
Modified: pkg/trunk/sandbox/annotated_map_builder/manifest.xml
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/manifest.xml 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/sandbox/annotated_map_builder/manifest.xml 2009-08-10 07:55:36 UTC (rev 21339)
@@ -13,6 +13,7 @@
<depend package="executive_python" />
<depend package="python_actions" />
<depend package="bagserver" />
+ <depend package="stereo_msgs"/>
<export>
<cpp cflags="-I${prefix}/msg/cpp -I${prefix}/include" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib"/>
</export>
Modified: pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/executive_data_collector.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/executive_data_collector.py 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/executive_data_collector.py 2009-08-10 07:55:36 UTC (rev 21339)
@@ -43,7 +43,7 @@
from robot_msgs.msg import *
from std_msgs.msg import *
from robot_msgs.msg import *
-from sensor_msgs.msg import RawStereo
+from stereo_msgs.msg import RawStereo
import tf
from battery_monitor_adapter import *
Modified: pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action.py 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action.py 2009-08-10 07:55:36 UTC (rev 21339)
@@ -38,7 +38,7 @@
roslib.load_manifest('annotated_map_builder')
import rospy
import random
-from sensor_msgs.msg import RawStereo
+from stereo_msgs.msg import RawStereo
from std_msgs.msg import Empty
import threading
Modified: pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action2.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action2.py 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action2.py 2009-08-10 07:55:36 UTC (rev 21339)
@@ -38,7 +38,7 @@
roslib.load_manifest('annotated_map_builder')
import rospy
import random
-from sensor_msgs.msg import RawStereo
+from stereo_msgs.msg import RawStereo
from std_msgs.msg import Empty
import threading
Modified: pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/select_interesting_images.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/select_interesting_images.py 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/select_interesting_images.py 2009-08-10 07:55:36 UTC (rev 21339)
@@ -41,7 +41,7 @@
import sys
from robot_msgs.msg import PoseStamped
from annotated_map_builder.msg import WaitActionState
-from sensor_msgs.msg import RawStereo
+from stereo_msgs.msg import RawStereo
from robot_actions.msg import ActionStatus;
Modified: pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/wait_for_k_messages_action.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/wait_for_k_messages_action.py 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/wait_for_k_messages_action.py 2009-08-10 07:55:36 UTC (rev 21339)
@@ -40,7 +40,7 @@
import random
import threading
-from sensor_msgs.msg import RawStereo
+from stereo_msgs.msg import RawStereo
from std_msgs.msg import Empty
Modified: pkg/trunk/sandbox/annotated_map_builder/test/test_head.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/test/test_head.py 2009-08-10 07:53:35 UTC (rev 21338)
+++ pkg/trunk...
[truncated message content] |
|
From: <sf...@us...> - 2009-08-10 08:45:04
|
Revision: 21362
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21362&view=rev
Author: sfkwc
Date: 2009-08-10 08:44:55 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
updated dead code to remove robot_msgs ref
Modified Paths:
--------------
pkg/trunk/stacks/visual_feature_detectors/outlet_detection/test/outlet_detection_from_prosilica_image_files.py
pkg/trunk/vision/people/src/filter/detector_particle.cpp
pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp
Modified: pkg/trunk/stacks/visual_feature_detectors/outlet_detection/test/outlet_detection_from_prosilica_image_files.py
===================================================================
--- pkg/trunk/stacks/visual_feature_detectors/outlet_detection/test/outlet_detection_from_prosilica_image_files.py 2009-08-10 08:44:17 UTC (rev 21361)
+++ pkg/trunk/stacks/visual_feature_detectors/outlet_detection/test/outlet_detection_from_prosilica_image_files.py 2009-08-10 08:44:55 UTC (rev 21362)
@@ -12,7 +12,7 @@
import rospy
import rostest
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
class TestBasicLocalization(unittest.TestCase):
Modified: pkg/trunk/vision/people/src/filter/detector_particle.cpp
===================================================================
--- pkg/trunk/vision/people/src/filter/detector_particle.cpp 2009-08-10 08:44:17 UTC (rev 21361)
+++ pkg/trunk/vision/people/src/filter/detector_particle.cpp 2009-08-10 08:44:55 UTC (rev 21362)
@@ -42,7 +42,7 @@
using namespace tf;
using namespace std;
using namespace ros;
-using namespace robot_msgs;
+using namespace geometry_msgs;
Modified: pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp
===================================================================
--- pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp 2009-08-10 08:44:17 UTC (rev 21361)
+++ pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp 2009-08-10 08:44:55 UTC (rev 21362)
@@ -62,7 +62,7 @@
#include "geometry_msgs/PointStamped.h"
#include <geometry_msgs/Polygon.h>
#include "door_msgs/Door.h"
-//#include "robot_msgs/VisualizationMarker.h"
+//#include "visualization_msgs/VisualizationMarker.h"
// Cloud kd-tree
#include <point_cloud_mapping/kdtree/kdtree_ann.h>
@@ -1548,7 +1548,7 @@
// advertise<geometry_msgs::PointStamped>("handle_detector/handle_location", 1);
- // advertise<robot_msgs::VisualizationMarker>("visualizationMarker", 1);
+ // advertise<visualization_msgs::VisualizationMarker>("visualizationMarker", 1);
subscribeStereoData();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sf...@us...> - 2009-08-10 09:15:02
|
Revision: 21372
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21372&view=rev
Author: sfkwc
Date: 2009-08-10 09:14:55 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
Removing from robot_msgs import * everywhere
Modified Paths:
--------------
pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/manifest.xml
pkg/trunk/calibration/auto_arm_commander/src/auto_arm_commander/arm_commander.py
pkg/trunk/calibration/auto_arm_commander/src/auto_arm_commander/settler.py
pkg/trunk/calibration/joint_calibration_monitor/src/joint_calibration_monitor/generic_joint_monitor.py
pkg/trunk/calibration/kinematic_calibration/scripts/arm_commander_node.py
pkg/trunk/calibration/kinematic_calibration/scripts/auto_arm_commander.py
pkg/trunk/calibration/kinematic_calibration/scripts/auto_arm_commander_original.py
pkg/trunk/calibration/kinematic_calibration/scripts/new_cmd_node.py
pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/arm_commander.py
pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/msg_cache.py
pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/settler.py
pkg/trunk/calibration/optical_flag_calibration/scripts/flag_tester.py
pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_pose.py
pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_trajectory.py
pkg/trunk/controllers/robot_mechanism_controllers/scripts/tff.py
pkg/trunk/controllers/robot_mechanism_controllers/scripts/wxeffect.py
pkg/trunk/demos/arm_gazebo/scripts/l_arm_default.py
pkg/trunk/demos/plug_in/fake_camera_frame.py
pkg/trunk/demos/plug_in/fake_vision.py
pkg/trunk/demos/plug_in/plug_in.py
pkg/trunk/demos/plug_in/plug_in2.py
pkg/trunk/demos/plug_in/spacenav_pass_through.py
pkg/trunk/demos/plug_in_gazebo/scripts/set_plug.py
pkg/trunk/demos/plug_in_gazebo/scripts/set_plug_on_base.py
pkg/trunk/drivers/robot/pr2/dense_laser_assembler/scripts/assembler_node.py
pkg/trunk/drivers/robot/pr2/dense_laser_assembler/scripts/laser_image_node.py
pkg/trunk/drivers/robot/pr2/dense_laser_assembler/src/dense_laser_assembler/dense_laser_cache.py
pkg/trunk/highlevel/executive_python/src/executive.py
pkg/trunk/highlevel/executive_python/src/indefinite_nav.py
pkg/trunk/highlevel/executive_python/src/office_nav.py
pkg/trunk/mapping/annotated_planar_patch_map/test/dump_point_cloud_maps.py
pkg/trunk/mapping/annotated_planar_patch_map/test/test_content.py
pkg/trunk/mapping/annotated_planar_patch_map/test/test_projection.py
pkg/trunk/pr2/cb_characterization/scripts/cmd_node.py
pkg/trunk/pr2/life_test/arm_life_test/random_poses_right_cb.py
pkg/trunk/pr2/life_test/arm_life_test/random_wrenches.py
pkg/trunk/pr2/qualification/scripts/hysteresis_sinesweep_plot.py
pkg/trunk/pr2/qualification/tests/ethernet_test/ethernet_test.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/executive_data_collector.py
pkg/trunk/sandbox/person_follower/src/executive_data_collector.py
pkg/trunk/sandbox/webteleop/src/server.py
pkg/trunk/stacks/trex/trex_pr2/fake_battery_controller.py
Modified: pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/manifest.xml
===================================================================
--- pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/manifest.xml 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/manifest.xml 2009-08-10 09:14:55 UTC (rev 21372)
@@ -17,6 +17,7 @@
<depend package="move_base"/>
<depend package="mux"/>
<depend package="backup_safetysound"/>
+ <depend package="geometry_msgs"/>
<!-- packages used in the test scripts -->
<depend package="robot_actions"/>
Modified: pkg/trunk/calibration/auto_arm_commander/src/auto_arm_commander/arm_commander.py
===================================================================
--- pkg/trunk/calibration/auto_arm_commander/src/auto_arm_commander/arm_commander.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/auto_arm_commander/src/auto_arm_commander/arm_commander.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -40,7 +40,6 @@
#from std_msgs.msg import Empty
from pr2_mechanism_controllers.srv import *
#from pr2_mechanism_controllers.msg import
-from robot_msgs.msg import *
from manipulation_msgs.msg import *
class ArmCommander() :
Modified: pkg/trunk/calibration/auto_arm_commander/src/auto_arm_commander/settler.py
===================================================================
--- pkg/trunk/calibration/auto_arm_commander/src/auto_arm_commander/settler.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/auto_arm_commander/src/auto_arm_commander/settler.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -41,7 +41,6 @@
from pr2_mechanism_controllers.srv import *\
from mechanism_msgs.msg import MechanismState
-from robot_msgs.msg import *
from roslib import rostime
from auto_arm_commander.msg_cache import MsgCache
Modified: pkg/trunk/calibration/joint_calibration_monitor/src/joint_calibration_monitor/generic_joint_monitor.py
===================================================================
--- pkg/trunk/calibration/joint_calibration_monitor/src/joint_calibration_monitor/generic_joint_monitor.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/joint_calibration_monitor/src/joint_calibration_monitor/generic_joint_monitor.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -31,7 +31,6 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-from robot_msgs.msg import *
from diagnostic_msgs.msg import *
# Should these be constants in the Status msg?
Modified: pkg/trunk/calibration/kinematic_calibration/scripts/arm_commander_node.py
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/scripts/arm_commander_node.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/kinematic_calibration/scripts/arm_commander_node.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -7,7 +7,6 @@
from std_msgs.msg import Empty
from pr2_mechanism_controllers.srv import *
from pr2_mechanism_controllers.msg import *
-from robot_msgs.msg import *
from mechanism_msgs import JointState, JointStates
cmd_count = 0
Modified: pkg/trunk/calibration/kinematic_calibration/scripts/auto_arm_commander.py
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/scripts/auto_arm_commander.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/kinematic_calibration/scripts/auto_arm_commander.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -8,7 +8,6 @@
from std_msgs.msg import Empty
from pr2_mechanism_controllers.srv import *
from pr2_mechanism_controllers.msg import *
-from robot_msgs.msg import *
from mechanism_msgs.msg import MechanismState
from kinematic_calibration.msg import *
from manipulation_msgs.msg import *
Modified: pkg/trunk/calibration/kinematic_calibration/scripts/auto_arm_commander_original.py
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/scripts/auto_arm_commander_original.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/kinematic_calibration/scripts/auto_arm_commander_original.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -8,7 +8,6 @@
from std_msgs.msg import Empty
from pr2_mechanism_controllers.srv import *
from pr2_mechanism_controllers.msg import *
-from robot_msgs.msg import *
from mechanism_msgs.msg import MechanismState
from kinematic_calibration.msg import *
from manipulation_msgs.msg import *
Modified: pkg/trunk/calibration/kinematic_calibration/scripts/new_cmd_node.py
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/scripts/new_cmd_node.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/kinematic_calibration/scripts/new_cmd_node.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -8,7 +8,6 @@
from std_msgs.msg import Empty
from pr2_mechanism_controllers.srv import *
from pr2_mechanism_controllers.msg import *
-from robot_msgs.msg import *
from mechanism_msgs.msg import MechanismState
from kinematic_calibration.msg import *
Modified: pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/arm_commander.py
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/arm_commander.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/arm_commander.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -40,7 +40,6 @@
#from std_msgs.msg import Empty
from pr2_mechanism_controllers.srv import *
#from pr2_mechanism_controllers.msg import
-from robot_msgs.msg import *
from manipulation_msgs.msg import *
Modified: pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/msg_cache.py
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/msg_cache.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/msg_cache.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -39,11 +39,6 @@
import sys
import threading
-#from pr2_mechanism_controllers.srv import *
-
-#from robot_msgs.msg import *
-#from sensor_msgs.msg import *
-
class MsgCache() :
def __init__(self, max_len) :
self._max_len = max_len
Modified: pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/settler.py
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/settler.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/kinematic_calibration/src/kinematic_calibration/settler.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -41,7 +41,6 @@
from pr2_mechanism_controllers.srv import *
from mechanism_msgs.msg import MechanismState
-from robot_msgs.msg import *
from roslib import rostime
from kinematic_calibration.msg_cache import MsgCache
Modified: pkg/trunk/calibration/optical_flag_calibration/scripts/flag_tester.py
===================================================================
--- pkg/trunk/calibration/optical_flag_calibration/scripts/flag_tester.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/calibration/optical_flag_calibration/scripts/flag_tester.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -8,7 +8,6 @@
from std_msgs.msg import Empty
from pr2_mechanism_controllers.srv import *
from pr2_mechanism_controllers.msg import *
-from robot_msgs.msg import *
from manipulation_msgs.msg import *
cmd_count = 0
Modified: pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_pose.py
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_pose.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_pose.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -24,7 +24,7 @@
# 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.
+# POSSIBILITY OF SUCH DAMAGE.from robot_msgs.msg import *
import roslib; roslib.load_manifest('pr2_mechanism_controllers')
@@ -34,7 +34,7 @@
import rospy
import sys
from std_msgs.msg import *
-from robot_msgs.msg import *
+from geometry_msgs.msg import PoseStamped
pub = rospy.Publisher('/cartesian_pose/command', PoseStamped)
Modified: pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_trajectory.py
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_trajectory.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_trajectory.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -34,7 +34,7 @@
import rospy
import sys
from std_msgs.msg import *
-from robot_msgs.msg import *
+from geometry_msgs.msg import PoseStamped
pub = rospy.Publisher('/cartesian_trajectory/command', PoseStamped)
Modified: pkg/trunk/controllers/robot_mechanism_controllers/scripts/tff.py
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/scripts/tff.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/controllers/robot_mechanism_controllers/scripts/tff.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -34,7 +34,7 @@
import rospy
import sys
from std_msgs.msg import *
-from robot_msgs.msg import *
+from manipulation_msgs.msg import TaskFrameFormalism
pub = rospy.Publisher('/cartesian_tff_right/command', TaskFrameFormalism)
Modified: pkg/trunk/controllers/robot_mechanism_controllers/scripts/wxeffect.py
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/scripts/wxeffect.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/controllers/robot_mechanism_controllers/scripts/wxeffect.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -30,7 +30,6 @@
import roslib; roslib.load_manifest(PKG)
import rospy
-from robot_msgs.msg import *
from mechanism_msgs.msg import MechanismState
import wx
Modified: pkg/trunk/demos/arm_gazebo/scripts/l_arm_default.py
===================================================================
--- pkg/trunk/demos/arm_gazebo/scripts/l_arm_default.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/demos/arm_gazebo/scripts/l_arm_default.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -49,9 +49,8 @@
import sys, unittest
import os, os.path, threading, time
import rospy, rostest
-from robot_msgs.msg import *
-from std_msgs.msg import *
-from pr2_mechanism_controllers.msg import *
+from std_msgs.msg import FLoat64
+from pr2_mechanism_controllers.msg import JointPosCmd
TEST_DURATION = 60.0
COMMAND_INTERVAL = 5.0
Modified: pkg/trunk/demos/plug_in/fake_camera_frame.py
===================================================================
--- pkg/trunk/demos/plug_in/fake_camera_frame.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/demos/plug_in/fake_camera_frame.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -28,8 +28,7 @@
import roslib
roslib.load_manifest('plug_in')
-import rospy
-from robot_msgs.msg import *
+import rospy:
from tf.msg import tfMessage
from math import *
import time
Modified: pkg/trunk/demos/plug_in/fake_vision.py
===================================================================
--- pkg/trunk/demos/plug_in/fake_vision.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/demos/plug_in/fake_vision.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -31,7 +31,7 @@
import rospy
from std_msgs.msg import *
-from robot_msgs.msg import *
+from geometry_msgs.msg import Quaternion, PoseStamped
from tf.msg import tfMessage
from math import *
from time import sleep
Modified: pkg/trunk/demos/plug_in/plug_in.py
===================================================================
--- pkg/trunk/demos/plug_in/plug_in.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/demos/plug_in/plug_in.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -33,9 +33,8 @@
import roslib
roslib.load_manifest('plug_in')
import rospy
-from robot_msgs.msg import *
-from robot_srvs.srv import *
-from deprecated_srvs.srv import *
+from geometry.msg import PoseStamped
+from robot_mechanism_controllers.srv import SetPoseStamped
CONTROLLER = 'arm_constraint'
Modified: pkg/trunk/demos/plug_in/plug_in2.py
===================================================================
--- pkg/trunk/demos/plug_in/plug_in2.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/demos/plug_in/plug_in2.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -34,9 +34,8 @@
import roslib
roslib.load_manifest('plug_in')
import rospy
-from robot_msgs.msg import *
-from robot_srvs.srv import *
-from deprecated_srvs.srv import *
+from geometry_msgs.msg import PoseStamped
+from deprecated_srvs.srv import MoveToPose
import tf.transformations
import tf
Modified: pkg/trunk/demos/plug_in/spacenav_pass_through.py
===================================================================
--- pkg/trunk/demos/plug_in/spacenav_pass_through.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/demos/plug_in/spacenav_pass_through.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -5,7 +5,7 @@
import rospy
from std_msgs.msg import *
-from robot_msgs.msg import *
+from geometry_msgs.msg import Wrench
from joy.msg import Joy
rospy.init_node('wrencher', anonymous=True)
Modified: pkg/trunk/demos/plug_in_gazebo/scripts/set_plug.py
===================================================================
--- pkg/trunk/demos/plug_in_gazebo/scripts/set_plug.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/demos/plug_in_gazebo/scripts/set_plug.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -47,7 +47,6 @@
from std_msgs.msg import *
from robot_actions.msg import *
from nav_robot_actions.msg import *
-from robot_msgs.msg import *
from tf.transformations import *
from geometry_msgs.msg import Twist, PoseWithRatesStamped
from numpy import *
Modified: pkg/trunk/demos/plug_in_gazebo/scripts/set_plug_on_base.py
===================================================================
--- pkg/trunk/demos/plug_in_gazebo/scripts/set_plug_on_base.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/demos/plug_in_gazebo/scripts/set_plug_on_base.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -47,7 +47,6 @@
from std_msgs.msg import *
from robot_actions.msg import *
from nav_robot_actions.msg import *
-from robot_msgs.msg import *
from tf.transformations import *
from geometry_msgs.msg import Twist, PoseWithRatesStamped
from numpy import *
Modified: pkg/trunk/drivers/robot/pr2/dense_laser_assembler/scripts/assembler_node.py
===================================================================
--- pkg/trunk/drivers/robot/pr2/dense_laser_assembler/scripts/assembler_node.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/drivers/robot/pr2/dense_laser_assembler/scripts/assembler_node.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -40,7 +40,7 @@
import threading
from time import sleep
from sensor_msgs.msg import LaserScan
-from robot_msgs.msg import *
+from pr2_msgs import LaserScannerSignal
from mechanism_msgs.msg import MechanismState
from std_msgs.msg import *
from dense_laser_assembler.msg import *
Modified: pkg/trunk/drivers/robot/pr2/dense_laser_assembler/scripts/laser_image_node.py
===================================================================
--- pkg/trunk/drivers/robot/pr2/dense_laser_assembler/scripts/laser_image_node.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/drivers/robot/pr2/dense_laser_assembler/scripts/laser_image_node.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -39,11 +39,10 @@
import rospy
from time import sleep
from laser_scan.msg import *
-from robot_msgs.msg import *
from std_msgs.msg import *
from dense_laser_assembler.msg import *
from pr2_mechanism_controllers.msg import *
-from sensor_msgs.msg import *
+from sensor_msgs.msg import Image
# Takes the dense laser scan data and converts it into images to can be viewed in
Modified: pkg/trunk/drivers/robot/pr2/dense_laser_assembler/src/dense_laser_assembler/dense_laser_cache.py
===================================================================
--- pkg/trunk/drivers/robot/pr2/dense_laser_assembler/src/dense_laser_assembler/dense_laser_cache.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/drivers/robot/pr2/dense_laser_assembler/src/dense_laser_assembler/dense_laser_cache.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -39,8 +39,6 @@
import sys
import threading
from laser_scan.msg import *
-from robot_msgs.msg import *
-from mechanism_msgs.msg import MechanismState
from roslib import rostime
# Stores a single laser scan plus some meta information
Modified: pkg/trunk/highlevel/executive_python/src/executive.py
===================================================================
--- pkg/trunk/highlevel/executive_python/src/executive.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/highlevel/executive_python/src/executive.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -38,10 +38,6 @@
roslib.load_manifest('executive_python')
import rospy
import random
-from std_msgs.msg import *
-from robot_msgs.msg import *
-from std_msgs.msg import *
-from robot_msgs.msg import *
from battery_monitor_adapter import *
from navigation_adapter import *
from stuck_adapter import *
Modified: pkg/trunk/highlevel/executive_python/src/indefinite_nav.py
===================================================================
--- pkg/trunk/highlevel/executive_python/src/indefinite_nav.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/highlevel/executive_python/src/indefinite_nav.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -38,8 +38,6 @@
roslib.load_manifest('executive_python')
import rospy
import random
-from std_msgs.msg import *
-from robot_msgs.msg import *
from battery_monitor_adapter import *
from recharge_adapter import *
from navigation_adapter import *
Modified: pkg/trunk/highlevel/executive_python/src/office_nav.py
===================================================================
--- pkg/trunk/highlevel/executive_python/src/office_nav.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/highlevel/executive_python/src/office_nav.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -38,8 +38,6 @@
roslib.load_manifest('executive_python')
import rospy
import random
-from std_msgs.msg import *
-from robot_msgs.msg import *
from battery_monitor_adapter import *
from recharge_adapter import *
from navigation_adapter import *
Modified: pkg/trunk/mapping/annotated_planar_patch_map/test/dump_point_cloud_maps.py
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/test/dump_point_cloud_maps.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/mapping/annotated_planar_patch_map/test/dump_point_cloud_maps.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -40,7 +40,7 @@
import random
from annotated_map_msgs.msg import *
-from robot_msgs.msg import *
+from mapping_msgs.msg import PolygonalMap
import os
Modified: pkg/trunk/mapping/annotated_planar_patch_map/test/test_content.py
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/test/test_content.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/mapping/annotated_planar_patch_map/test/test_content.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -42,7 +42,6 @@
import unittest
from pr2_mechanism_controllers.msg import LaserScannerSignal
from annotated_map_msgs.msg import *
-from robot_msgs.msg import *
from roslib.msg import *
import tf
from cv_mech_turk.msg import ExternalAnnotation
Modified: pkg/trunk/mapping/annotated_planar_patch_map/test/test_projection.py
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/test/test_projection.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/mapping/annotated_planar_patch_map/test/test_projection.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -40,7 +40,6 @@
import unittest
from pr2_mechanism_controllers.msg import LaserScannerSignal
from annotated_map_msgs.msg import *
-from robot_msgs.msg import *
from roslib.msg import *
import tf
from cv_mech_turk.msg import ExternalAnnotation
Modified: pkg/trunk/pr2/cb_characterization/scripts/cmd_node.py
===================================================================
--- pkg/trunk/pr2/cb_characterization/scripts/cmd_node.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/pr2/cb_characterization/scripts/cmd_node.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -8,7 +8,6 @@
from std_msgs.msg import Empty
from pr2_mechanism_controllers.srv import *
from pr2_mechanism_controllers.msg import *
-from robot_msgs.msg import *
from mechanism_msgs.msg import MechanismState
from auto_arm_commander.settler import *
Modified: pkg/trunk/pr2/life_test/arm_life_test/random_poses_right_cb.py
===================================================================
--- pkg/trunk/pr2/life_test/arm_life_test/random_poses_right_cb.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/pr2/life_test/arm_life_test/random_poses_right_cb.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -32,7 +32,7 @@
import random, time
import rospy
from std_msgs.msg import *
-from robot_msgs.msg import *
+from geometry_msgs.msg import PoseStamped
pub = rospy.Publisher('r_arm_cartesian_pose_controller/command', PoseStamped)
Modified: pkg/trunk/pr2/life_test/arm_life_test/random_wrenches.py
===================================================================
--- pkg/trunk/pr2/life_test/arm_life_test/random_wrenches.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/pr2/life_test/arm_life_test/random_wrenches.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -34,7 +34,7 @@
import rospy
import sys
from std_msgs.msg import *
-from robot_msgs.msg import *
+from geometry_msgs.msg import Wrench
pub = rospy.Publisher('/r_arm_cartesian_wrench_controller/command', Wrench)
Modified: pkg/trunk/pr2/qualification/scripts/hysteresis_sinesweep_plot.py
===================================================================
--- pkg/trunk/pr2/qualification/scripts/hysteresis_sinesweep_plot.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/pr2/qualification/scripts/hysteresis_sinesweep_plot.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -34,7 +34,6 @@
import numpy
import math
-from robot_msgs.msg import *
from std_msgs.msg import *
from robot_srvs.srv import *
Modified: pkg/trunk/pr2/qualification/tests/ethernet_test/ethernet_test.py
===================================================================
--- pkg/trunk/pr2/qualification/tests/ethernet_test/ethernet_test.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/pr2/qualification/tests/ethernet_test/ethernet_test.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -34,8 +34,6 @@
import roslib
roslib.load_manifest('qualification')
-from robot_msgs.msg import *
-from robot_srvs.srv import *
from qualification.msg import *
from qualification.srv import *
Modified: pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/executive_data_collector.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/executive_data_collector.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/executive_data_collector.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -39,10 +39,8 @@
import rospy
import sys
import random
-from std_msgs.msg import *
-from robot_msgs.msg import *
-from std_msgs.msg import *
-from robot_msgs.msg import *
+from deprecated_msgs import JointCmd
+
from stereo_msgs.msg import RawStereo
import tf
Modified: pkg/trunk/sandbox/person_follower/src/executive_data_collector.py
===================================================================
--- pkg/trunk/sandbox/person_follower/src/executive_data_collector.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/sandbox/person_follower/src/executive_data_collector.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -39,10 +39,6 @@
import rospy
import sys
import random
-from std_msgs.msg import *
-from robot_msgs.msg import *
-from std_msgs.msg import *
-from robot_msgs.msg import *
from stereo_msgs.msg import RawStereo
from mechanism_msgs.msg import JointStates, JointState
Modified: pkg/trunk/sandbox/webteleop/src/server.py
===================================================================
--- pkg/trunk/sandbox/webteleop/src/server.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/sandbox/webteleop/src/server.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -30,7 +30,6 @@
from nav_msgs import *
from nav_msgs.msg import *
from std_msgs.msg import *
-from robot_msgs.msg import *
from geometry_msgs.msg import *
tfclient = None
Modified: pkg/trunk/stacks/trex/trex_pr2/fake_battery_controller.py
===================================================================
--- pkg/trunk/stacks/trex/trex_pr2/fake_battery_controller.py 2009-08-10 09:12:53 UTC (rev 21371)
+++ pkg/trunk/stacks/trex/trex_pr2/fake_battery_controller.py 2009-08-10 09:14:55 UTC (rev 21372)
@@ -44,7 +44,7 @@
import time
import rospy
-from robot_msgs.msg import *
+from pr2_msgs import BatteryState
def talker():
pub = rospy.Publisher("battery_state", BatteryState)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sf...@us...> - 2009-08-10 10:18:34
|
Revision: 21382
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21382&view=rev
Author: sfkwc
Date: 2009-08-10 10:18:26 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
more robot_msgs->geometry_msgs migratio
Modified Paths:
--------------
pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/test/test_move_base_local.py
pkg/trunk/calibration/kinematic_calibration/scripts/joy_cmd_head.py
pkg/trunk/controllers/pr2_mechanism_controllers/scripts/control_base_position.py
pkg/trunk/controllers/pr2_mechanism_controllers/scripts/control_base_position_ground_truth.py
pkg/trunk/controllers/pr2_mechanism_controllers/scripts/send_track_link_cmd.py
pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_pose.py
pkg/trunk/demos/handhold/src/handhold.py
pkg/trunk/demos/plug_in/move_to_pickup.py
pkg/trunk/demos/plug_in/outlet_pose_filter.py
pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/manifest.xml
pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/approachtable.py
pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/executive.py
pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/movearm.py
pkg/trunk/deprecated/python_actions/src/python_actions/action_client.py
pkg/trunk/highlevel/executive_python/manifest.xml
pkg/trunk/highlevel/executive_python/src/battery_monitor_adapter.py
pkg/trunk/highlevel/executive_python/src/navigation_adapter.py
pkg/trunk/highlevel/executive_python/src/print_goal.py
pkg/trunk/highlevel/writing/writing_core/manifest.xml
pkg/trunk/highlevel/writing/writing_core/nodes/run_ask_for_pen.py
pkg/trunk/highlevel/writing/writing_core/nodes/run_generate_text_trajectory.py
pkg/trunk/highlevel/writing/writing_core/nodes/run_grip_pen.py
pkg/trunk/highlevel/writing/writing_core/nodes/run_write_trajectory.py
pkg/trunk/pr2/life_test/arm_life_test/random_poses_left.py
pkg/trunk/pr2/life_test/arm_life_test/random_poses_right.py
pkg/trunk/pr2/life_test/manifest.xml
pkg/trunk/pr2/teleop/teleop_spacenav/manifest.xml
pkg/trunk/pr2/teleop/teleop_spacenav/spacenav_teleop.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/record_goals.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/select_interesting_images.py
pkg/trunk/sandbox/annotated_map_builder/test/test_head.py
pkg/trunk/sandbox/annotated_map_builder/test/test_head2.py
pkg/trunk/sandbox/person_follower/manifest.xml
pkg/trunk/sandbox/person_follower/src/record_goals.py
pkg/trunk/sandbox/person_follower/src/select_interesting_images.py
pkg/trunk/stacks/geometry/tf/src/tf/listener.py
pkg/trunk/stacks/geometry/tf/test/test_datatype_conversion.py
pkg/trunk/stacks/pr2_power_drivers/ocean_battery_driver/scripts/battery_notifier.py
pkg/trunk/stacks/semantic_mapping/door_handle_detector/scripts/find_door.py
pkg/trunk/stacks/semantic_mapping/door_handle_detector/scripts/point_cloud_cropper.py
pkg/trunk/vision/people/src/stereo_face_feature_tracker.py
Modified: pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/test/test_move_base_local.py
===================================================================
--- pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/test/test_move_base_local.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/test/test_move_base_local.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -14,7 +14,7 @@
import bullet
import time
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
from robot_actions.msg import ActionStatus
from nav_robot_actions.msg import MoveBaseState
from tf.msg import tfMessage
Modified: pkg/trunk/calibration/kinematic_calibration/scripts/joy_cmd_head.py
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/scripts/joy_cmd_head.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/calibration/kinematic_calibration/scripts/joy_cmd_head.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -3,7 +3,7 @@
import roslib; roslib.load_manifest('kinematic_calibration')
import sys
import rospy
-from robot_msgs.msg import PointStamped, Point
+from geometry_msgs.msg import PointStamped, Point
from time import sleep
from joy.msg import Joy
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/scripts/control_base_position.py
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/scripts/control_base_position.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/scripts/control_base_position.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -39,7 +39,7 @@
from time import sleep
import rospy
-from robot_msgs.msg import PointStamped, Point
+from geometry_msgs.msg import PointStamped, Point
def control_base_pose_odom_frame(x,y,w):
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/scripts/control_base_position_ground_truth.py
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/scripts/control_base_position_ground_truth.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/scripts/control_base_position_ground_truth.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -39,7 +39,7 @@
from time import sleep
import rospy
-from robot_msgs.msg import PointStamped, Point
+from geometry_msgs.msg import PointStamped, Point
def control_base_pose_odom_frame(x,y,w):
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/scripts/send_track_link_cmd.py
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/scripts/send_track_link_cmd.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/scripts/send_track_link_cmd.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -11,7 +11,7 @@
import rospy
from std_msgs import *
-from robot_msgs.msg import Point
+from geometry_msgs.msg import Point
from pr2_mechanism_controllers.msg import TrackLinkCmd
from time import sleep
Modified: pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_pose.py
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_pose.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/controllers/robot_mechanism_controllers/scripts/moveto_pose.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -24,7 +24,7 @@
# 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.from robot_msgs.msg import *
+# POSSIBILITY OF SUCH DAMAGE.
import roslib; roslib.load_manifest('pr2_mechanism_controllers')
Modified: pkg/trunk/demos/handhold/src/handhold.py
===================================================================
--- pkg/trunk/demos/handhold/src/handhold.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/demos/handhold/src/handhold.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -3,7 +3,7 @@
import roslib; roslib.load_manifest('handhold')
import rospy
from tf import TransformListener
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
from geometry_msgs.msg import Twist
#import numpy
Modified: pkg/trunk/demos/plug_in/move_to_pickup.py
===================================================================
--- pkg/trunk/demos/plug_in/move_to_pickup.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/demos/plug_in/move_to_pickup.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -8,7 +8,7 @@
import rospy
from plugs_msgs.msg import PlugStow
-from robot_msgs.msg import Point, PoseStamped
+from geometry_msgs.msg import Point, PoseStamped
from mechanism_msgs.msg import JointTraj, JointTrajPoint
from mechanism_control import mechanism
from robot_mechanism_controllers.srv import *
Modified: pkg/trunk/demos/plug_in/outlet_pose_filter.py
===================================================================
--- pkg/trunk/demos/plug_in/outlet_pose_filter.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/demos/plug_in/outlet_pose_filter.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -29,7 +29,7 @@
import sys, time
import roslib; roslib.load_manifest('plug_in')
import rospy
-from robot_msgs.msg import PoseStamped, TransformStamped
+from geometry_msgs.msg import PoseStamped, TransformStamped
import tf.msg
from std_srvs.srv import Empty
Modified: pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/manifest.xml
===================================================================
--- pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/manifest.xml 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/manifest.xml 2009-08-10 10:18:26 UTC (rev 21382)
@@ -8,7 +8,13 @@
<depend package="3dnav_pr2"/>
<depend package="planning_environment"/>
<depend package="nav_msgs"/>
+ <depend package="tf"/>
+ <depend package="geometry_msgs"/>
+ <depend package="visualization_msgs"/>
+ <depend package="nav_msgs"/>
+ <depend package="tabletop_srvs"/>
+
<!--
<depend package="2dnav_pr2"/>
<depend package="pr2_gazebo"/>
Modified: pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/approachtable.py
===================================================================
--- pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/approachtable.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/approachtable.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -36,8 +36,8 @@
import roslib
roslib.load_manifest('tabletop_manipulation')
import rospy
-from robot_srvs.srv import FindTable, FindTableRequest
-from robot_msgs.msg import Polygon3D, Point
+from tabletop_srvs.srv import FindTable, FindTableRequest
+from geometry_msgs.msg import Point
from visualization_msgs.msg import Marker
from nav_msgs.msg import Odometry
from tf.msg import tfMessage
Modified: pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/executive.py
===================================================================
--- pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/executive.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/executive.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -126,8 +126,9 @@
import random
import sys
from visualization_msgs.msg import Marker
-from robot_msgs.msg import AttachedObject, PoseConstraint
-from robot_srvs.srv import FindTable, FindTableRequest, SubtractObjectFromCollisionMap, SubtractObjectFromCollisionMapRequest, RecordStaticMapTrigger, RecordStaticMapTriggerRequest
+from mapping_msgs.msg import AttachedObject
+from motion_planning_msgs import PoseConstraint
+from tabletop_srvs.srv import FindTable, FindTableRequest, SubtractObjectFromCollisionMap, SubtractObjectFromCollisionMapRequest, RecordStaticMapTrigger, RecordStaticMapTriggerRequest
from pr2_mechanism_controllers.srv import SetProfile, SetProfileRequest
from highlevel_controllers.msg import *
from executive_python.navigation_adapter import *
Modified: pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/movearm.py
===================================================================
--- pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/movearm.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/movearm.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -37,7 +37,7 @@
roslib.load_manifest('tabletop_manipulation')
import rospy
from pr2_msgs.msg import MoveArmGoal, MoveArmState
-from robot_msgs.msg import PoseConstraint, ControllerStatus
+from geometry_msgs.msg import PoseConstraint, ControllerStatus
from mechanism_msgs.msg import JointState
import sys
Modified: pkg/trunk/deprecated/python_actions/src/python_actions/action_client.py
===================================================================
--- pkg/trunk/deprecated/python_actions/src/python_actions/action_client.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/deprecated/python_actions/src/python_actions/action_client.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -40,7 +40,6 @@
import time
from robot_actions.msg import ActionStatus
-import robot_msgs.msg
from std_msgs.msg import Empty
RESET = ActionStatus.RESET
Modified: pkg/trunk/highlevel/executive_python/manifest.xml
===================================================================
--- pkg/trunk/highlevel/executive_python/manifest.xml 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/highlevel/executive_python/manifest.xml 2009-08-10 10:18:26 UTC (rev 21382)
@@ -8,4 +8,5 @@
<depend package="std_msgs" />
<depend package="geometry_msgs" />
<depend package="pr2_robot_actions" />
+ <depend package="pr2_msgs"/>
</package>
Modified: pkg/trunk/highlevel/executive_python/src/battery_monitor_adapter.py
===================================================================
--- pkg/trunk/highlevel/executive_python/src/battery_monitor_adapter.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/highlevel/executive_python/src/battery_monitor_adapter.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -37,7 +37,7 @@
import roslib
roslib.load_manifest('executive_python')
import rospy
-from robot_msgs.msg import BatteryState
+from pr2_msgs.msg import BatteryState
import os
class BatteryMonitorAdapter:
Modified: pkg/trunk/highlevel/executive_python/src/navigation_adapter.py
===================================================================
--- pkg/trunk/highlevel/executive_python/src/navigation_adapter.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/highlevel/executive_python/src/navigation_adapter.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -39,7 +39,7 @@
import rospy
import random
from nav_robot_actions.msg import MoveBaseState
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
class NavigationAdapter:
def __init__(self, no_plan_limit, time_limit, state_topic, goal_topic):
Modified: pkg/trunk/highlevel/executive_python/src/print_goal.py
===================================================================
--- pkg/trunk/highlevel/executive_python/src/print_goal.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/highlevel/executive_python/src/print_goal.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -45,7 +45,7 @@
import rospy
import random
import sys
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
class GoalPrinter:
def __init__(self, goal_topic):
Modified: pkg/trunk/highlevel/writing/writing_core/manifest.xml
===================================================================
--- pkg/trunk/highlevel/writing/writing_core/manifest.xml 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/highlevel/writing/writing_core/manifest.xml 2009-08-10 10:18:26 UTC (rev 21382)
@@ -17,6 +17,7 @@
<depend package="tf" />
<depend package="people" />
<depend package="python_actions" />
+ <depend package="geometry_msgs"/>
<export>
<cpp cflags="-I${prefix}/msg/cpp -I${prefix}/include" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib"/>
Modified: pkg/trunk/highlevel/writing/writing_core/nodes/run_ask_for_pen.py
===================================================================
--- pkg/trunk/highlevel/writing/writing_core/nodes/run_ask_for_pen.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/highlevel/writing/writing_core/nodes/run_ask_for_pen.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -49,7 +49,7 @@
import robot_actions.msg
import std_msgs.msg
import pr2_robot_actions.msg
-import robot_msgs.msg
+from geometry_msgs.msg import PoseStamped, Twist
import robot_srvs.srv
import python_actions
@@ -81,7 +81,7 @@
#open the gripper
self.gripper_controller_publisher.publish(std_msgs.msg.Float64(0.03))
- mtp = robot_msgs.msg.PoseStamped()
+ mtp = PoseStamped()
mtp.header.stamp = rospy.get_rostime()
mtp.header.frame_id = "torso_lift_link"
mtp.pose.position.x =0.56
@@ -91,7 +91,7 @@
mtp.pose.orientation.y =0.181
mtp.pose.orientation.z =0.412
mtp.pose.orientation.w =-0.029
- twist = robot_msgs.msg.Twist()
+ twist = Twist()
#move the arm
try:
Modified: pkg/trunk/highlevel/writing/writing_core/nodes/run_generate_text_trajectory.py
===================================================================
--- pkg/trunk/highlevel/writing/writing_core/nodes/run_generate_text_trajectory.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/highlevel/writing/writing_core/nodes/run_generate_text_trajectory.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -47,7 +47,7 @@
import pr2_robot_actions.msg
-import robot_msgs
+import geometry_msgs
import python_actions
# http://local.wasp.uwa.edu.au/~pbourke/dataformats/hershey/
@@ -145,8 +145,8 @@
msg = nav_msgs.msg.Path()
msg.poses = []
for (x, y, z) in points:
- ps = robot_msgs.msg.PoseStamped()
- ps.pose.position = robot_msgs.msg.Point(x/goal.scale, y/goal.scale, z)
+ ps = geometry_msgs.msg.PoseStamped()
+ ps.pose.position = geometry_msgs.msg.Point(x/goal.scale, y/goal.scale, z)
msg.poses.append(ps)
self.feedback = msg
Modified: pkg/trunk/highlevel/writing/writing_core/nodes/run_grip_pen.py
===================================================================
--- pkg/trunk/highlevel/writing/writing_core/nodes/run_grip_pen.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/highlevel/writing/writing_core/nodes/run_grip_pen.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -48,7 +48,6 @@
import robot_actions.msg
import std_msgs.msg
import pr2_robot_actions.msg
-import robot_msgs.msg
import python_actions
import mechanism_msgs.msg
Modified: pkg/trunk/highlevel/writing/writing_core/nodes/run_write_trajectory.py
===================================================================
--- pkg/trunk/highlevel/writing/writing_core/nodes/run_write_trajectory.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/highlevel/writing/writing_core/nodes/run_write_trajectory.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -47,7 +47,7 @@
from robot_actions.msg import NoArgumentsActionState
import robot_actions.msg
import std_msgs.msg
-import robot_msgs.msg
+import geometry_msgs.msg
import python_actions
@@ -66,7 +66,7 @@
self.arm_controller = "r_arm_cartesian_pose_controller"
rospy.set_param(self.name + "/arm_controller", self.arm_controller)
- self.arm_controller_publisher = rospy.Publisher("r_arm_cartesian_pose_controller/command", robot_msgs.msg.PoseStamped)
+ self.arm_controller_publisher = rospy.Publisher("r_arm_cartesian_pose_controller/command", geometry_msgs.msg.PoseStamped)
def execute(self, goal):
Modified: pkg/trunk/pr2/life_test/arm_life_test/random_poses_left.py
===================================================================
--- pkg/trunk/pr2/life_test/arm_life_test/random_poses_left.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/pr2/life_test/arm_life_test/random_poses_left.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -31,7 +31,7 @@
import random, time
import rospy
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
#pub = rospy.Publisher('cartesian_pose/command', PoseStamped)
pub = rospy.Publisher('cartesian_trajectory_left/command', PoseStamped)
Modified: pkg/trunk/pr2/life_test/arm_life_test/random_poses_right.py
===================================================================
--- pkg/trunk/pr2/life_test/arm_life_test/random_poses_right.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/pr2/life_test/arm_life_test/random_poses_right.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -31,7 +31,7 @@
import random, time
import rospy
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
#pub = rospy.Publisher('cartesian_pose_right/command', PoseStamped)
pub = rospy.Publisher('r_arm_cartesian_trajectory_controller/command', PoseStamped)
Modified: pkg/trunk/pr2/life_test/manifest.xml
===================================================================
--- pkg/trunk/pr2/life_test/manifest.xml 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/pr2/life_test/manifest.xml 2009-08-10 10:18:26 UTC (rev 21382)
@@ -33,4 +33,5 @@
<depend package="diagnostic_msgs" />
<depend package="wg_hardware_roslaunch" />
<depend package="mechanism_msgs" />
+ <depend package="geometry_msgs" />
</package>
Modified: pkg/trunk/pr2/teleop/teleop_spacenav/manifest.xml
===================================================================
--- pkg/trunk/pr2/teleop/teleop_spacenav/manifest.xml 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/pr2/teleop/teleop_spacenav/manifest.xml 2009-08-10 10:18:26 UTC (rev 21382)
@@ -7,6 +7,7 @@
<review status="unreviewed" notes=""/>
<depend package="rospy" />
<depend package="std_msgs" />
+ <depend package="geometry_msgs" />
<depend package="robot_mechanism_controllers" />
<depend package="mechanism_control" />
<depend package="spacenav_node" />
Modified: pkg/trunk/pr2/teleop/teleop_spacenav/spacenav_teleop.py
===================================================================
--- pkg/trunk/pr2/teleop/teleop_spacenav/spacenav_teleop.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/pr2/teleop/teleop_spacenav/spacenav_teleop.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -30,7 +30,7 @@
import roslib; roslib.load_manifest('teleop_spacenav')
import rospy, sys, math
-from robot_msgs.msg import Vector3
+from geometry_msgs.msg import Vector3
def print_usage(code = 0):
print sys.argv[0], '<velocity topic> <rotational velocity topic>'
Modified: pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/record_goals.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/record_goals.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/record_goals.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -39,7 +39,7 @@
import rospy
import random
import sys
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
class RecordGoals:
def __init__(self,filename):
Modified: pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/select_interesting_images.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/select_interesting_images.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/select_interesting_images.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -39,7 +39,7 @@
import rospy
import random
import sys
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
from annotated_map_builder.msg import WaitActionState
from stereo_msgs.msg import RawStereo
Modified: pkg/trunk/sandbox/annotated_map_builder/test/test_head.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/test/test_head.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/sandbox/annotated_map_builder/test/test_head.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -51,7 +51,7 @@
from pr2_msgs.msg import BaseControllerState
from geometry_msgs.msg import Twist
-from robot_msgs.msg import JointCmd
+from deprecated_msgs.msg import JointCmd
from python_actions import *
Modified: pkg/trunk/sandbox/annotated_map_builder/test/test_head2.py
===================================================================
--- pkg/trunk/sandbox/annotated_map_builder/test/test_head2.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/sandbox/annotated_map_builder/test/test_head2.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -51,7 +51,7 @@
from pr2_msgs.msg import BaseControllerState
from geometry_msgs.msg import Twist
-from robot_msgs.msg import JointCmd
+from deprecated_msgs.msg import JointCmd
from python_actions import *
Modified: pkg/trunk/sandbox/person_follower/manifest.xml
===================================================================
--- pkg/trunk/sandbox/person_follower/manifest.xml 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/sandbox/person_follower/manifest.xml 2009-08-10 10:18:26 UTC (rev 21382)
@@ -8,6 +8,7 @@
<depend package="tf" />
<depend package="nav_robot_actions" />
<depend package="std_msgs" />
+ <depend package="geometry_msgs" />
<depend package="pr2_robot_actions" />
<depend package="robot_actions" />
<depend package="milestone2_actions" />
Modified: pkg/trunk/sandbox/person_follower/src/record_goals.py
===================================================================
--- pkg/trunk/sandbox/person_follower/src/record_goals.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/sandbox/person_follower/src/record_goals.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -39,7 +39,7 @@
import rospy
import random
import sys
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
class RecordGoals:
def __init__(self,filename):
Modified: pkg/trunk/sandbox/person_follower/src/select_interesting_images.py
===================================================================
--- pkg/trunk/sandbox/person_follower/src/select_interesting_images.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/sandbox/person_follower/src/select_interesting_images.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -39,7 +39,7 @@
import rospy
import random
import sys
-from robot_msgs.msg import PoseStamped
+from geometry_msgs.msg import PoseStamped
from annotated_map_builder.msg import WaitActionState
from stereo_msgs.msg import RawStereo
Modified: pkg/trunk/stacks/geometry/tf/src/tf/listener.py
===================================================================
--- pkg/trunk/stacks/geometry/tf/src/tf/listener.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/stacks/geometry/tf/src/tf/listener.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -70,9 +70,9 @@
def fromTranslationRotation(self, translation, rotation):
return numpy.dot(transformations.translation_matrix(translation), transformations.quaternion_matrix(rotation))
- ## Transforms a robot_msgs PointStamped message to frame target_frame, returns the resulting PointStamped.
+ ## Transforms a geometry_msgs PointStamped message to frame target_frame, returns the resulting PointStamped.
# @param target_frame The target frame
- # @param ps robot_msgs.msg.PointStamped object
+ # @param ps geometry_msgs.msg.PointStamped object
def transformPoint(self, target_frame, ps):
mat44 = self.asMatrix(target_frame, ps.header)
@@ -83,9 +83,9 @@
r.point = geometry_msgs.msg.Point(*xyz)
return r
- ## Transforms a robot_msgs QuaternionStamped message to frame target_frame, returns the resulting QuaternionStamped.
+ ## Transforms a geometry_msgs QuaternionStamped message to frame target_frame, returns the resulting QuaternionStamped.
# @param target_frame The target frame
- # @param ps robot_msgs.msg.QuaternionStamped object
+ # @param ps geometry_msgs.msg.QuaternionStamped object
def transformQuaternion(self, target_frame, ps):
# mat44 is frame-to-frame transform as a 4x4
@@ -107,9 +107,9 @@
r.quaternion = geometry_msgs.msg.Quaternion(*quat)
return r
- ## Transforms a robot_msgs PoseStamped message to frame target_frame, returns the resulting PoseStamped.
+ ## Transforms a geometry_msgs PoseStamped message to frame target_frame, returns the resulting PoseStamped.
# @param target_frame The target frame
- # @param ps robot_msgs.msg.PoseStamped object
+ # @param ps geometry_msgs.msg.PoseStamped object
def transformPose(self, target_frame, ps):
# mat44 is frame-to-frame transform as a 4x4
Modified: pkg/trunk/stacks/geometry/tf/test/test_datatype_conversion.py
===================================================================
--- pkg/trunk/stacks/geometry/tf/test/test_datatype_conversion.py 2009-08-10 10:06:20 UTC (rev 21381)
+++ pkg/trunk/stacks/geometry/tf/test/test_datatype_conversion.py 2009-08-10 10:18:26 UTC (rev 21382)
@@ -4,7 +4,7 @@
import sys
import unittest
import tf
-import robot_msgs.msg
+import geometry_msgs.msg
import rospy
## A sample python unit test
@@ -16,7 +16,7 @@
self.tfpose_stamped.frame_id = "frame1"
self.tfpose_stamped.stamp = roslib.rostime.Time(10,0)
- self.msgpose_stamped = robot_msgs.msg.PoseStamped()
+ self.msgpose_stamped = geometry_msgs.msg.PoseStamped()
self.msgpose_stamped.pose.position.x = 0
self.msgpose_stamped.pose.position.y = 0
self.msgpose_stamped.pose.position.z = 0
@@ -35,7 +35,7 @@
self.tfpoint_stamped.frame_id = "frame1"
self.tfpoint_stamped.stamp = roslib.rostime.Time(10,0)
- self.msgpoint_stamped = robot_msgs.msg.PointStamped()
+ self.msgpoint_stamped = geometry_msgs.msg.PointStamped()
self.msgpoint_stamped.point.x = 0
self.msgpoint_stamped.point.y = 0
self.msgpoint_stamped.point.z = 0
@@ -50,7 +50,7 @@
self.tfvector_stamped.frame_id = "frame1"
self.tfvector_stamped.stamp = roslib.rostime.Time(10, 0)
- self.msgvector_stamped = robot_msgs.msg.Vector3Stamped()
+ self.msgvector_stamped = geometry_msgs.msg.Vector3Stamped()
self.msgvector_stamped.vector.x = 0
self.msgvector_stamped.vector.y = 0
self.msgvector_stamped.vector.z = 0
@@ -66,7 +66,7 @@
self.tfquaternion_stamped.frame_id = "frame1"
self.tfquaternion_stamped.stamp = roslib.rostime.Time(10, 0)
- self.msgquaternion_stamped = robot_msgs.msg.QuaternionStamped()
+ self.msgquaternion_stamped = geometry_msgs.msg.QuaternionStamped()
self.msgquaternion_stamped.quaternio...
[truncated message content] |
|
From: <sf...@us...> - 2009-08-10 11:00:04
|
Revision: 21385
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21385&view=rev
Author: sfkwc
Date: 2009-08-10 10:59:57 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
more robot_msgs cleanup
Modified Paths:
--------------
pkg/trunk/applications/2dnav_pr2_app/stack.xml
pkg/trunk/audio/stack.xml
pkg/trunk/calibration/stack.xml
pkg/trunk/highlevel/stack.xml
pkg/trunk/sandbox/neighborhood_index/include/neighborhood_index/index.h
pkg/trunk/sandbox/neighborhood_index/manifest.xml
Modified: pkg/trunk/applications/2dnav_pr2_app/stack.xml
===================================================================
--- pkg/trunk/applications/2dnav_pr2_app/stack.xml 2009-08-10 10:58:57 UTC (rev 21384)
+++ pkg/trunk/applications/2dnav_pr2_app/stack.xml 2009-08-10 10:59:57 UTC (rev 21385)
@@ -16,6 +16,6 @@
<depend stack="common"/> <!-- laser_scan, robot_actions -->
<depend stack="estimation"/> <!-- robot_pose_ekf -->
<depend stack="navigation"/> <!-- amcl, map_server, move_base, nav_robot_actions -->
- <depend stack="common_msgs"/> <!-- robot_msgs -->
+ <depend stack="common_msgs"/>
</stack>
Modified: pkg/trunk/audio/stack.xml
===================================================================
--- pkg/trunk/audio/stack.xml 2009-08-10 10:58:57 UTC (rev 21384)
+++ pkg/trunk/audio/stack.xml 2009-08-10 10:59:57 UTC (rev 21385)
@@ -9,7 +9,7 @@
<depend stack="sound_drivers"/> <!-- sound_play -->
- <depend stack="ros"/> <!-- rospy, roscpp -->
- <depend stack="common_msgs"/> <!-- robot_msgs -->
+ <depend stack="ros"/>
+ <depend stack="common_msgs"/>
</stack>
Modified: pkg/trunk/calibration/stack.xml
===================================================================
--- pkg/trunk/calibration/stack.xml 2009-08-10 10:58:57 UTC (rev 21384)
+++ pkg/trunk/calibration/stack.xml 2009-08-10 10:59:57 UTC (rev 21385)
@@ -7,16 +7,15 @@
<review status="unreviewed" notes=""/>
<url>http://pr.willowgarage.com/wiki/calibration</url>
-
- <depend stack="controllers"/> <!-- pr2_mechanism_controllers, pr2_mechanism_controllers, pr2_mechanism_controllers, pr2_mechanism_controllers -->
+ <depend stack="controllers"/> <!-- pr2_mechanism_controllers -->
<depend stack="opencv"/> <!-- opencv_latest -->
- <depend stack="geometry"/> <!-- kdl, tf, kdl, tf -->
+ <depend stack="geometry"/> <!-- kdl, tf -->
<depend stack="drivers"/> <!-- dense_laser_assembler, phase_space -->
- <depend stack="mechanism"/> <!-- mechanism_model, hardware_interface, mechanism_msgs, mechanism_msgs, mechanism_msgs, mechanism_msgs, mechanism_msgs -->
- <depend stack="util"/> <!-- topic_synchronizer, topic_synchronizer -->
+ <depend stack="mechanism"/> <!-- mechanism_model, hardware_interface, mechanism_msgs -->
+ <depend stack="util"/> <!-- topic_synchronizer -->
<depend stack="openrave_planning"/> <!-- openraveros -->
- <depend stack="common"/> <!-- tinyxml, robot_actions, laser_scan, robot_actions, manipulation_msgs, manipulation_msgs -->
- <depend stack="ros"/> <!-- std_msgs, rospy, rosoct, std_msgs, std_msgs, message_filters, roscpp, message_filters, std_msgs, std_msgs, std_msgs, rosrecord, roscpp, std_msgs, std_msgs, rospy -->
- <depend stack="common_msgs"/> <!-- geometry_msgs, robot_msgs, sensor_msgs, robot_msgs, sensor_msgs, robot_msgs, sensor_msgs, robot_msgs, sensor_msgs, robot_msgs, sensor_msgs, robot_msgs, geometry_msgs, sensor_msgs, robot_msgs, robot_msgs, robot_msgs, diagnostic_msgs -->
+ <depend stack="common"/> <!-- tinyxml, robot_actions, laser_scan, manipulation_msgs -->
+ <depend stack="ros"/>
+ <depend stack="common_msgs"/> <!-- geometry_msgs, sensor_msgs, diagnostic_msgs -->
</stack>
Modified: pkg/trunk/highlevel/stack.xml
===================================================================
--- pkg/trunk/highlevel/stack.xml 2009-08-10 10:58:57 UTC (rev 21384)
+++ pkg/trunk/highlevel/stack.xml 2009-08-10 10:59:57 UTC (rev 21385)
@@ -14,16 +14,16 @@
<depend stack="util"/> <!-- or_robot_self_filter -->
<depend stack="estimation"/> <!-- robot_pose_ekf -->
- <depend stack="geometry"/> <!-- kdl, tf, kdl, tf, tf, tf, tf -->
- <depend stack="navigation"/> <!-- nav_robot_actions, nav_robot_actions, costmap_2d, base_local_planner, fake_localization, map_server, nav_view, move_base, amcl, map_server, fake_localization, nav_view, nav_robot_actions -->
+ <depend stack="geometry"/> <!-- kdl, tf -->
+ <depend stack="navigation"/> <!-- costmap_2d, base_local_planner, map_server, nav_view, move_base, amcl, map_server, fake_localization, nav_view, nav_robot_actions -->
<depend stack="semantic_mapping"/> <!-- plug_onbase_detector, door_handle_detector, point_cloud_mapping -->
<depend stack="mechanism"/> <!-- mechanism_msgs -->
- <depend stack="controllers"/> <!-- pr2_mechanism_controllers, pr2_mechanism_controllers, robot_mechanism_controllers, pr2_mechanism_controllers -->
- <depend stack="simulators"/> <!-- stage, stage -->
- <depend stack="common"/> <!-- robot_actions, manipulation_srvs, robot_actions, robot_actions, manipulation_msgs, robot_actions, laser_scan, robot_actions, robot_actions, robot_actions, python_actions -->
- <depend stack="ros"/> <!-- rospy, roslib, roscpp, rosconsole, std_msgs, roslisp, std_msgs, std_srvs, roscpp, std_msgs, rospy, std_msgs, roscpp, std_msgs, roscpp, gtest, rosrecord, roscpp, std_msgs, roscpp, roscpp, std_msgs, roscpp, roslib -->
- <depend stack="visualization_core"/> <!-- visualization_msgs, visualization_msgs -->
+ <depend stack="controllers"/> <!-- pr2_mechanism_controllers, robot_mechanism_controllers, pr2_mechanism_controllers -->
+ <depend stack="simulators"/> <!-- stage -->
+ <depend stack="common"/> <!-- robot_actions, manipulation_srvs, manipulation_msgs, laser_scan -->
+ <depend stack="ros"/> <!-- rospy, roslib, roscpp, rosconsole, std_msgs, roslisp, gtest, rosrecord -->
+ <depend stack="visualization_core"/> <!-- visualization_msgs -->
<depend stack="vision"/> <!-- people -->
- <depend stack="common_msgs"/> <!-- robot_msgs, robot_msgs, robot_srvs, robot_msgs, robot_msgs, diagnostic_msgs, robot_srvs, nav_msgs, geometry_msgs, geometry_msgs, robot_msgs, robot_srvs, robot_msgs, geometry_msgs, robot_msgs, robot_srvs -->
+ <depend stack="common_msgs"/> <!-- diagnostic_msgs, nav_msgs, geometry_msgs -->
</stack>
Modified: pkg/trunk/sandbox/neighborhood_index/include/neighborhood_index/index.h
===================================================================
--- pkg/trunk/sandbox/neighborhood_index/include/neighborhood_index/index.h 2009-08-10 10:58:57 UTC (rev 21384)
+++ pkg/trunk/sandbox/neighborhood_index/include/neighborhood_index/index.h 2009-08-10 10:59:57 UTC (rev 21385)
@@ -38,31 +38,32 @@
#define _NEIGHBORHOOD_INDEX_
#include <vector>
-#include <robot_msgs/PointCloud.h>
+#include <sensor_msgs/PointCloud.h>
+#include <geometry_msgs/Point32.h>
namespace neighborhood_index
{
class Index {
- virtual void knnSearch(const robot_msgs::Point32 &point, int k,
+ virtual void knnSearch(const geometry_msgs::Point32 &point, int k,
std::vector<int> &k_indices, std::vector<float> &k_distances) = 0;
- virtual void knnSearch(const robot_msgs::PointCloud &pointsToFind, int k,
+ virtual void knnSearch(const sensor_msgs::PointCloud &pointsToFind, int k,
std::vector<std::vector<int> > &k_indices_array, std::vector<std::vector<float> > &k_distances_array) = 0;
- virtual bool radiusSearch (const robot_msgs::Point32 &p_q, double radius,
+ virtual bool radiusSearch (const geometry_msgs::Point32 &p_q, double radius,
std::vector<int> &k_indices, std::vector<float> &k_distances, int max_nn = INT_MAX) = 0;
- virtual bool radiusSearch (const robot_msgs::PointCloud &points, double radius,
+ virtual bool radiusSearch (const sensor_msgs::PointCloud &points, double radius,
std::vector<std::vector<int> > &k_indices_array, std::vector<std::vector<float> > &k_distances_array, int max_nn = INT_MAX) = 0;
};
//Version of Index which supports dynamic resizing
class DynamicIndex : public Index {
- virtual void add(const robot_msgs::Point32 &point) = 0;
- virtual void add(const robot_msgs::PointCloud &points) = 0;
+ virtual void add(const geometry_msgs::Point32 &point) = 0;
+ virtual void add(const sensor_msgs::PointCloud &points) = 0;
- virtual void remove(const robot_msgs::Point32 &point) = 0;
- virtual void remove(const robot_msgs::PointCloud &points) = 0;
+ virtual void remove(const geometry_msgs::Point32 &point) = 0;
+ virtual void remove(const sensor_msgs::PointCloud &points) = 0;
virtual bool canRemove() = 0;
virtual bool optimize(int optimizationLevel = 0) = 0;
Modified: pkg/trunk/sandbox/neighborhood_index/manifest.xml
===================================================================
--- pkg/trunk/sandbox/neighborhood_index/manifest.xml 2009-08-10 10:58:57 UTC (rev 21384)
+++ pkg/trunk/sandbox/neighborhood_index/manifest.xml 2009-08-10 10:59:57 UTC (rev 21385)
@@ -12,7 +12,8 @@
<export>
<cpp cflags="-I${prefix}/include" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib"/>
</export>
-
+ <depend package="sensor_msgs" />
+ <depend package="geometry_msgs" />
</package>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ehb...@us...> - 2009-08-10 11:07:24
|
Revision: 21386
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21386&view=rev
Author: ehberger
Date: 2009-08-10 11:07:16 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
Fixing robot_msgs references
Modified Paths:
--------------
pkg/trunk/calibration/kinematic_calibration/deprecated/camera_cal_sampler.h
pkg/trunk/calibration/kinematic_calibration/deprecated/mech_state_cache.h
pkg/trunk/calibration/kinematic_calibration/deprecated/state_history.h
pkg/trunk/controllers/pr2_mechanism_controllers/test/test_arm_trajectory_controller.cpp
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_assembler_srv.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_bind.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_query_snapshotter.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_snapshotter.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_planar_patch_map_builder.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_pcd_via_service.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/patch_map_assembler_srv.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/pcd_assembler_srv.cpp
pkg/trunk/mapping/hallway_tracker/src/hallway_tracker.cpp
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h
pkg/trunk/sandbox/functional_m3n_ros/include/functional_m3n_ros/random_field_creator.h
pkg/trunk/sandbox/functional_m3n_ros/src/random_field_creator.cpp
pkg/trunk/sandbox/planar_objects/src/rectangular_fit.cpp
pkg/trunk/stacks/common/actionlib/src/move_base_client_old.cpp
pkg/trunk/stacks/common_msgs/sensor_msgs/msg/PointCloud.msg
pkg/trunk/stacks/navigation/costmap_2d/src/costmap_test.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/semantic_point_annotator.cpp
pkg/trunk/stacks/visual_feature_detectors/outlet_detection/src/outlet_spotting.cpp
Removed Paths:
-------------
pkg/trunk/sandbox/planar_objects/update_eclipse
Modified: pkg/trunk/calibration/kinematic_calibration/deprecated/camera_cal_sampler.h
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/deprecated/camera_cal_sampler.h 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/calibration/kinematic_calibration/deprecated/camera_cal_sampler.h 2009-08-10 11:07:16 UTC (rev 21386)
@@ -44,7 +44,7 @@
#include "kinematic_calibration/image_point_cache.h"
#include "kinematic_calibration/Capture.h"
-#include "robot_msgs/MechanismState.h"
+#include "mechanism_msgs/MechanismState.h"
#include "sensor_msgs/Image.h"
#include "sensor_msgs/CameraInfo.h"
#include "topic_synchronizer/topic_synchronizer.h"
@@ -129,7 +129,7 @@
private:
ros::Node* node_ ;
- MsgCacheListener<robot_msgs::MechanismState> mech_state_cache_ ;
+ MsgCacheListener<mechanism_msgs::MechanismState> mech_state_cache_ ;
Interval interval_msg_ ;
std::vector<ImagePointHandler*> stream_handlers_ ;
} ;
Modified: pkg/trunk/calibration/kinematic_calibration/deprecated/mech_state_cache.h
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/deprecated/mech_state_cache.h 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/calibration/kinematic_calibration/deprecated/mech_state_cache.h 2009-08-10 11:07:16 UTC (rev 21386)
@@ -40,7 +40,7 @@
#include "kinematic_calibration/msg_cache.h"
-#include "robot_msgs/MechanismState.h"
+#include "mechanism_msgs/MechanismState.h"
#include "kinematic_calibration/Interval.h"
#include "tinyxml/tinyxml.h"
@@ -48,10 +48,10 @@
namespace kinematic_calibration
{
-class MechStateCache : public MsgCache<robot_msgs::MechanismState>
+class MechStateCache : public MsgCache<mechanism_msgs::MechanismState>
{
public:
- MechStateCache(unsigned int N) : MsgCache<robot_msgs::MechanismState>(N)
+ MechStateCache(unsigned int N) : MsgCache<mechanism_msgs::MechanismState>(N)
{
}
@@ -132,7 +132,7 @@
if (interval.start > interval.end)
return false ;
- deque<robot_msgs::MechanismState>::iterator it ;
+ deque<mechanism_msgs::MechanismState>::iterator it ;
it = storage_.begin() ;
// Walk along list to just inside beginning of interval
Modified: pkg/trunk/calibration/kinematic_calibration/deprecated/state_history.h
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/deprecated/state_history.h 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/calibration/kinematic_calibration/deprecated/state_history.h 2009-08-10 11:07:16 UTC (rev 21386)
@@ -38,7 +38,7 @@
#include "kinematic_calibration/msg_cache.h"
-#include "robot_msgs/MechanismState.h"
+#include "mechanism_msgs/MechanismState.h"
#include "geometry_msgs/PointStamped.h"
#include "sensor_msgs/Image.h"
#include "kinematic_calibration/CameraCalSample.h"
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/test/test_arm_trajectory_controller.cpp
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/test/test_arm_trajectory_controller.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/test/test_arm_trajectory_controller.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -55,7 +55,7 @@
/*********** Start moving the robot ************/
- robot_msgs::JointTraj cmd;
+ manipulation_msgs::JointTraj cmd;
int num_points = 3;
int num_joints = 14;
@@ -109,7 +109,7 @@
cmd.points[2].positions[6] = 0.0;
cmd.points[2].time = 0.0;
- node->advertise<robot_msgs::JointTraj>("/arm/trajectory_controller/arm_trajectory_command",1);
+ node->advertise<manipulation_msgs::JointTraj>("/arm/trajectory_controller/arm_trajectory_command",1);
node->publish("/arm/trajectory_controller/arm_trajectory_command",cmd);
sleep(4);
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h 2009-08-10 11:07:16 UTC (rev 21386)
@@ -42,8 +42,8 @@
#include "kdl/chainfksolver.hpp"
#include "ros/node.h"
#include "geometry_msgs/Wrench.h"
-#include "robot_msgs/PoseStamped.h"
-#include "robot_msgs/Transform.h"
+#include "geometry_msgs/PoseStamped.h"
+#include "geometry_msgs/Transform.h"
#include "robot_mechanism_controllers/PlugInternalState.h"
#include "robot_srvs/SetPoseStamped.h"
#include "control_toolbox/pid.h"
@@ -167,11 +167,11 @@
AdvertisedServiceGuard guard_set_tool_frame_;
geometry_msgs::Wrench wrench_msg_;
- robot_msgs::PoseStamped outlet_pose_msg_;
+ geometry_msgs::PoseStamped outlet_pose_msg_;
unsigned int loop_count_;
tf::TransformListener TF; /**< The transform for converting from point to head and tilt frames. */
- realtime_tools::RealtimePublisher <robot_msgs::Transform>* current_frame_publisher_;
+ realtime_tools::RealtimePublisher <geometry_msgs::Transform>* current_frame_publisher_;
realtime_tools::RealtimePublisher <robot_mechanism_controllers::PlugInternalState>* internal_state_publisher_;
};
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_assembler_srv.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_assembler_srv.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_assembler_srv.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -38,7 +38,6 @@
#include "annotated_planar_patch_map/map_base_assembler_srv.h"
-using namespace robot_msgs;
using namespace annotated_map_msgs;
using namespace std ;
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_bind.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_bind.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_bind.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -42,8 +42,6 @@
//include "sensor_msgs/PointCloud.h"
//include "pr2_mechanism_controllers/LaserScannerSignal.h"
-using namespace robot_msgs ;
-
/***
* This uses the point_cloud_assembler's build_cloud service call to grab all the scans/clouds between two tilt-laser shutters
* params
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_query_snapshotter.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_query_snapshotter.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_query_snapshotter.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -42,8 +42,6 @@
//include "sensor_msgs/PointCloud.h"
//include "pr2_mechanism_controllers/LaserScannerSignal.h"
-using namespace robot_msgs ;
-
/***
* This uses the point_cloud_assembler's build_cloud service call to grab all the scans/clouds between two tilt-laser shutters
* params
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_snapshotter.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_snapshotter.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_snapshotter.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -42,8 +42,6 @@
//include "sensor_msgs/PointCloud.h"
//include "pr2_mechanism_controllers/LaserScannerSignal.h"
-using namespace robot_msgs ;
-
/***
* This uses the point_cloud_assembler's build_cloud service call to grab all the scans/clouds between two tilt-laser shutters
* params
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_planar_patch_map_builder.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_planar_patch_map_builder.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_planar_patch_map_builder.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -12,7 +12,7 @@
#include "ros/node.h"
#include "ros/publisher.h"
#include <tf/transform_listener.h>
-#include "robot_msgs/PolygonalMap.h"
+#include "mapping_msgs/PolygonalMap.h"
#include <annotated_map_msgs/TaggedPolygonalMap.h>
#include <annotated_map_msgs/TaggedPolygon3D.h>
@@ -38,14 +38,14 @@
void advertise_maps(){
- advertise<robot_msgs::PolygonalMap>(std::string("global_object_map"),1);
+ advertise<mapping_msgs::PolygonalMap>(std::string("global_object_map"),1);
}
void handlePolygon(){
try{
printf("Polygon\n");
- robot_msgs::PolygonalMap polymapOut;
+ mapping_msgs::PolygonalMap polymapOut;
transformPolygonalMap(target_frame_, poly_object_, polymapOut);
add_to_map(polymapOut,global_map_);
@@ -63,7 +63,7 @@
};
- void add_to_map(robot_msgs::PolygonalMap newMap,robot_msgs::PolygonalMap& output_map)
+ void add_to_map(mapping_msgs::PolygonalMap newMap,mapping_msgs::PolygonalMap& output_map)
{
unsigned int num_polygons_to_add = newMap.get_polygons_size();
unsigned int old_num_polygons = output_map.get_polygons_size();
@@ -78,7 +78,7 @@
//From tf
-void transformPolygonalMap(const std::string & target_frame, const robot_msgs::PolygonalMap & polymapIn, robot_msgs::PolygonalMap & polymapOut)
+void transformPolygonalMap(const std::string & target_frame, const mapping_msgs::PolygonalMap & polymapIn, mapping_msgs::PolygonalMap & polymapOut)
{
Stamped<Transform> transform;
tf_->lookupTransform(target_frame, polymapIn.header.frame_id, polymapIn.header.stamp, transform);
@@ -86,8 +86,8 @@
transformPolygonalMap(target_frame, transform, polymapIn.header.stamp, polymapIn, polymapOut);
};
void transformPolygonalMap(const std::string& target_frame, const ros::Time& target_time,
- const robot_msgs::PolygonalMap& polymapIn,
- const std::string& fixed_frame, robot_msgs::PolygonalMap& polymapOut)
+ const mapping_msgs::PolygonalMap& polymapIn,
+ const std::string& fixed_frame, mapping_msgs::PolygonalMap& polymapOut)
{
Stamped<Transform> transform;
tf_->lookupTransform(target_frame, target_time,
@@ -101,7 +101,7 @@
};
- void transformPolygonalMap(const std::string & target_frame, const Transform& net_transform, const ros::Time& target_time, const robot_msgs::PolygonalMap & polymapIn, robot_msgs::PolygonalMap & polymapOut)
+ void transformPolygonalMap(const std::string & target_frame, const Transform& net_transform, const ros::Time& target_time, const mapping_msgs::PolygonalMap & polymapIn, mapping_msgs::PolygonalMap & polymapOut)
{
boost::numeric::ublas::matrix<double> transform = transformAsMatrix(net_transform);
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_pcd_via_service.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_pcd_via_service.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_pcd_via_service.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -148,7 +148,7 @@
tf_ = boost::shared_ptr<tf::TransformListener>(new tf::TransformListener(lifting_delay_*2+ros::Duration(12)));
lifted_pub_=n_.advertise<sensor_msgs::PointCloud>(out_topic_name_,1);
- //original_pub_=n_.advertise<robot_msgs::PointCloud>(out_topic_name_,1);
+ //original_pub_=n_.advertise<sensor_msgs::PointCloud>(out_topic_name_,1);
annotation_notifier_=new tf::MessageNotifier<cv_mech_turk::ExternalAnnotation>(*tf_,
boost::bind(&AnnotationLifterToPcdViaService::handleAnnotation, this,_1),
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/patch_map_assembler_srv.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/patch_map_assembler_srv.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/patch_map_assembler_srv.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -37,7 +37,6 @@
#include "planar_patch_map_msgs/PolygonalMap.h"
#include "annotated_planar_patch_map/patch_map_base_assembler_srv.h"
-using namespace robot_msgs;
using namespace annotated_map_msgs;
using namespace std ;
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/pcd_assembler_srv.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/pcd_assembler_srv.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/pcd_assembler_srv.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -40,8 +40,6 @@
// Service
#include "point_cloud_assembler/BuildCloud.h"
-
-using namespace robot_msgs;
using namespace annotated_map_msgs;
using namespace std ;
using namespace point_cloud_assembler;
Modified: pkg/trunk/mapping/hallway_tracker/src/hallway_tracker.cpp
===================================================================
--- pkg/trunk/mapping/hallway_tracker/src/hallway_tracker.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/mapping/hallway_tracker/src/hallway_tracker.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -52,7 +52,6 @@
#include <mapping_msgs/PolygonalMap.h>
#include <geometry_msgs/Point32.h>
-//#include <robot_msgs/Hallway.h>
#include <visualization_msgs/Marker.h>
// Sample Consensus
Modified: pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h 2009-08-10 11:07:16 UTC (rev 21386)
@@ -85,7 +85,7 @@
std::vector<boost::shared_ptr<controller::PIDPositionVelocityController> > joint_controllers_;
// reatltime publisher
-// boost::scoped_ptr<realtime_tools::RealtimePublisher<robot_msgs::Twist> > state_error_publisher_;
+// boost::scoped_ptr<realtime_tools::RealtimePublisher<geometry_msgs::Twist> > state_error_publisher_;
// boost::scoped_ptr<realtime_tools::RealtimePublisher<> > spline_info_publisher_;
Modified: pkg/trunk/sandbox/functional_m3n_ros/include/functional_m3n_ros/random_field_creator.h
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/include/functional_m3n_ros/random_field_creator.h 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/sandbox/functional_m3n_ros/include/functional_m3n_ros/random_field_creator.h 2009-08-10 11:07:16 UTC (rev 21386)
@@ -36,7 +36,7 @@
#include <vector>
-#include <robot_msgs/PointCloud.h>
+#include <sensor_msgs/PointCloud.h>
#include <point_cloud_clustering/kmeans.h>
@@ -53,25 +53,25 @@
RandomFieldCreator();
- boost::shared_ptr<RandomField> createRandomField(const robot_msgs::PointCloud& pt_cloud)
+ boost::shared_ptr<RandomField> createRandomField(const sensor_msgs::PointCloud& pt_cloud)
{
std::vector<float> labels;
return createRandomField(pt_cloud, labels);
}
- boost::shared_ptr<RandomField> createRandomField(const robot_msgs::PointCloud& pt_cloud,
+ boost::shared_ptr<RandomField> createRandomField(const sensor_msgs::PointCloud& pt_cloud,
const std::vector<float>& labels);
private:
void createDescriptors();
void createNodes(RandomField& rf,
- const robot_msgs::PointCloud& pt_cloud,
+ const sensor_msgs::PointCloud& pt_cloud,
cloud_kdtree::KdTree& pt_cloud_kdtree,
const vector<float>& labels,
set<unsigned int>& failed_indices);
void createCliqueSet(RandomField& rf,
- const robot_msgs::PointCloud& pt_cloud,
+ const sensor_msgs::PointCloud& pt_cloud,
cloud_kdtree::KdTree& pt_cloud_kdtree,
const set<unsigned int>& node_indices,
const unsigned int clique_set_idx);
Modified: pkg/trunk/sandbox/functional_m3n_ros/src/random_field_creator.cpp
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/src/random_field_creator.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/sandbox/functional_m3n_ros/src/random_field_creator.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -187,7 +187,7 @@
*/
// --------------------------------------------------------------
void RandomFieldCreator::createNodes(RandomField& rf,
- const robot_msgs::PointCloud& pt_cloud,
+ const sensor_msgs::PointCloud& pt_cloud,
cloud_kdtree::KdTree& pt_cloud_kdtree,
const vector<float>& labels,
set<unsigned int>& failed_indices)
@@ -198,7 +198,7 @@
// ----------------------------------------------
// Create interests points over the whole point cloud
unsigned int nbr_pts = pt_cloud.points.size();
- cv::Vector<const robot_msgs::Point32*> interest_pts(nbr_pts, NULL);
+ cv::Vector<const sensor_msgs::Point32*> interest_pts(nbr_pts, NULL);
for (unsigned int i = 0 ; i < nbr_pts ; i++)
{
interest_pts[(size_t) i] = &(pt_cloud.points[i]);
@@ -260,7 +260,7 @@
*/
// --------------------------------------------------------------
void RandomFieldCreator::createCliqueSet(RandomField& rf,
- const robot_msgs::PointCloud& pt_cloud,
+ const sensor_msgs::PointCloud& pt_cloud,
cloud_kdtree::KdTree& pt_cloud_kdtree,
const set<unsigned int>& node_indices,
const unsigned int clique_set_idx)
@@ -391,7 +391,7 @@
ROS_INFO(" ########### Created clique set %u with %u cliques from %u clusters #############", clique_set_idx, nbr_created_cliques, nbr_created_clusters);
}
-boost::shared_ptr<RandomField> RandomFieldCreator::createRandomField(const robot_msgs::PointCloud& pt_cloud, const vector<
+boost::shared_ptr<RandomField> RandomFieldCreator::createRandomField(const sensor_msgs::PointCloud& pt_cloud, const vector<
float>& labels)
{
createDescriptors();
Modified: pkg/trunk/sandbox/planar_objects/src/rectangular_fit.cpp
===================================================================
--- pkg/trunk/sandbox/planar_objects/src/rectangular_fit.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/sandbox/planar_objects/src/rectangular_fit.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -8,7 +8,6 @@
#include <visualization_msgs/Marker.h>
using namespace std;
-using namespace robot_msgs;
#define MIN(a,b) ((a<b)?a:b)
#define MAX(a,b) ((a>b)?a:b)
Deleted: pkg/trunk/sandbox/planar_objects/update_eclipse
===================================================================
--- pkg/trunk/sandbox/planar_objects/update_eclipse 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/sandbox/planar_objects/update_eclipse 2009-08-10 11:07:16 UTC (rev 21386)
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-cd $(dirname $0)
-mv Makefile Makefile.ros
-$HOME/cmake-2.6.4/bin/cmake -G"Eclipse CDT4 - Unix Makefiles" -Wno-dev .
-rm Makefile
-rm CMakeCache.txt
-rm -rf CMakeFiles
-mv Makefile.ros Makefile
-
Modified: pkg/trunk/stacks/common/actionlib/src/move_base_client_old.cpp
===================================================================
--- pkg/trunk/stacks/common/actionlib/src/move_base_client_old.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/stacks/common/actionlib/src/move_base_client_old.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -40,8 +40,9 @@
#include "geometry_msgs/PoseStamped.h"
using namespace action_tools;
-using namespace robot_msgs;
+using geometry_msgs::PoseStamped;
+
typedef ActionClient<MoveBaseGoal, PoseStamped, MoveBaseResult, PoseStamped> MoveBaseClient;
void callback(const TerminalStatuses::TerminalStatus& status, const boost::shared_ptr<const PoseStamped>& result)
Modified: pkg/trunk/stacks/common_msgs/sensor_msgs/msg/PointCloud.msg
===================================================================
--- pkg/trunk/stacks/common_msgs/sensor_msgs/msg/PointCloud.msg 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/stacks/common_msgs/sensor_msgs/msg/PointCloud.msg 2009-08-10 11:07:16 UTC (rev 21386)
@@ -1,3 +1,6 @@
+#This message holds a collection of 3d points, plus optional additional information about each point.
+#Each Point32 should be interpreted as a 3d point in the frame given in the header
+
Header header
-geometry_msgs/Point32[] points
-ChannelFloat32[] channels
+geometry_msgs/Point32[] points #Array of 3d points
+ChannelFloat32[] channels #Each channel should have the same number of elements as points array, and the data in each channel should correspond 1:1 with each point
Modified: pkg/trunk/stacks/navigation/costmap_2d/src/costmap_test.cpp
===================================================================
--- pkg/trunk/stacks/navigation/costmap_2d/src/costmap_test.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/stacks/navigation/costmap_2d/src/costmap_test.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -57,7 +57,7 @@
using namespace costmap_2d;
using namespace tf;
-using namespace robot_msgs;
+using sensor_msgs::PointCloud;
class CostmapTester {
public:
Modified: pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/semantic_point_annotator.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/semantic_point_annotator.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/semantic_point_annotator.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -64,8 +64,7 @@
#include <sys/time.h>
-using namespace std;
-using namespace robot_msgs;
+using namespace std;
class SemanticPointAnnotator
{
Modified: pkg/trunk/stacks/visual_feature_detectors/outlet_detection/src/outlet_spotting.cpp
===================================================================
--- pkg/trunk/stacks/visual_feature_detectors/outlet_detection/src/outlet_spotting.cpp 2009-08-10 10:59:57 UTC (rev 21385)
+++ pkg/trunk/stacks/visual_feature_detectors/outlet_detection/src/outlet_spotting.cpp 2009-08-10 11:07:16 UTC (rev 21386)
@@ -86,7 +86,6 @@
#include <boost/thread.hpp>
using namespace std;
-using namespace robot_msgs;
template <typename T>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ehb...@us...> - 2009-08-10 11:16:54
|
Revision: 21391
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21391&view=rev
Author: ehberger
Date: 2009-08-10 11:16:47 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
Eliminating robot_msgs references
Modified Paths:
--------------
pkg/trunk/stacks/geometry/tf/include/tf/transform_datatypes.h
pkg/trunk/stacks/geometry/tf/include/tf/transform_listener.h
pkg/trunk/stacks/navigation/costmap_2d/src/costmap_test.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/test/test_door_detection_joystick.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/cloudmsg_to_screen.cpp
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/polygonal_map_display.h
pkg/trunk/util/robot_self_filter/include/robot_self_filter/self_see_filter.h
Modified: pkg/trunk/stacks/geometry/tf/include/tf/transform_datatypes.h
===================================================================
--- pkg/trunk/stacks/geometry/tf/include/tf/transform_datatypes.h 2009-08-10 11:15:57 UTC (rev 21390)
+++ pkg/trunk/stacks/geometry/tf/include/tf/transform_datatypes.h 2009-08-10 11:16:47 UTC (rev 21391)
@@ -58,7 +58,7 @@
static const double QUATERNION_TOLERANCE = 0.1f;
-/** \brief The data type which will be cross compatable with robot_msgs
+/** \brief The data type which will be cross compatable with geometry_msgs
* this will require the associated rosTF package to convert */
template <typename T>
class Stamped : public T{
Modified: pkg/trunk/stacks/geometry/tf/include/tf/transform_listener.h
===================================================================
--- pkg/trunk/stacks/geometry/tf/include/tf/transform_listener.h 2009-08-10 11:15:57 UTC (rev 21390)
+++ pkg/trunk/stacks/geometry/tf/include/tf/transform_listener.h 2009-08-10 11:16:47 UTC (rev 21391)
@@ -115,7 +115,7 @@
- ///\todo move to high precision laser projector class void projectAndTransformLaserScan(const robot_msgs::LaserScan& scan_in, sensor_msgs::PointCloud& pcout);
+ ///\todo move to high precision laser projector class void projectAndTransformLaserScan(const sensor_msgs::LaserScan& scan_in, sensor_msgs::PointCloud& pcout);
bool getFrames(tf::FrameGraph::Request& req, tf::FrameGraph::Response& res)
{
Modified: pkg/trunk/stacks/navigation/costmap_2d/src/costmap_test.cpp
===================================================================
--- pkg/trunk/stacks/navigation/costmap_2d/src/costmap_test.cpp 2009-08-10 11:15:57 UTC (rev 21390)
+++ pkg/trunk/stacks/navigation/costmap_2d/src/costmap_test.cpp 2009-08-10 11:16:47 UTC (rev 21391)
@@ -50,7 +50,7 @@
#include <sensor_msgs/LaserScan.h>
#include <laser_scan/laser_scan.h>
-#include <robot_msgs/PointCloud.h>
+#include <sensor_msgs/PointCloud.h>
// Thread suppport
#include <boost/thread.hpp>
Modified: pkg/trunk/stacks/semantic_mapping/door_handle_detector/test/test_door_detection_joystick.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/door_handle_detector/test/test_door_detection_joystick.cpp 2009-08-10 11:15:57 UTC (rev 21390)
+++ pkg/trunk/stacks/semantic_mapping/door_handle_detector/test/test_door_detection_joystick.cpp 2009-08-10 11:16:47 UTC (rev 21391)
@@ -160,7 +160,7 @@
if(joy_msg_.data == std::string("open_door"))
{
geometry_msgs::PoseStamped pose_msg;
- robot_msgs::JointTraj traj;
+ manipulation_msgs::JointTraj traj;
pose_msg.pose = RPYToTransform(0.0,0.0,0.0,door_msg_from_detector_.handle.x, door_msg_from_detector_.handle.y, door_msg_from_detector_.handle.z);
pose_msg.header.frame_id = door_msg_from_detector_.header.frame_id;
Modified: pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/cloudmsg_to_screen.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/cloudmsg_to_screen.cpp 2009-08-10 11:15:57 UTC (rev 21390)
+++ pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/cloudmsg_to_screen.cpp 2009-08-10 11:16:47 UTC (rev 21391)
@@ -30,7 +30,7 @@
/** \author Radu Bogdan Rusu
*
- * Extremely silly PCD to C++ ROS robot_msgs PointCloud converter.
+ * Extremely silly PCD to C++ ROS sensor_msgs PointCloud converter.
* Useful for tools which don't want to link against \a cloud_io (I guess).
*
*/
Modified: pkg/trunk/stacks/visualization/rviz/src/rviz/displays/polygonal_map_display.h
===================================================================
--- pkg/trunk/stacks/visualization/rviz/src/rviz/displays/polygonal_map_display.h 2009-08-10 11:15:57 UTC (rev 21390)
+++ pkg/trunk/stacks/visualization/rviz/src/rviz/displays/polygonal_map_display.h 2009-08-10 11:16:47 UTC (rev 21391)
@@ -76,7 +76,7 @@
/**
* \class PolygonalMapDisplay
- * \brief Displays a robot_msgs::PolygonalMap message
+ * \brief Displays a mapping_msgs::PolygonalMap message
*/
class PolygonalMapDisplay : public Display
{
Modified: pkg/trunk/util/robot_self_filter/include/robot_self_filter/self_see_filter.h
===================================================================
--- pkg/trunk/util/robot_self_filter/include/robot_self_filter/self_see_filter.h 2009-08-10 11:15:57 UTC (rev 21390)
+++ pkg/trunk/util/robot_self_filter/include/robot_self_filter/self_see_filter.h 2009-08-10 11:16:47 UTC (rev 21391)
@@ -130,8 +130,8 @@
};
- typedef sensor_msgs::PointCloud robot_msgs_PointCloud;
- FILTERS_REGISTER_FILTER(SelfFilter, robot_msgs_PointCloud);
+ typedef sensor_msgs::PointCloud sensor_msgs_PointCloud;
+ FILTERS_REGISTER_FILTER(SelfFilter, sensor_msgs_PointCloud);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ehb...@us...> - 2009-08-10 11:20:18
|
Revision: 21397
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21397&view=rev
Author: ehberger
Date: 2009-08-10 11:20:07 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
Eliminating robot_msgs from stacks
Modified Paths:
--------------
pkg/trunk/controllers/stack.xml
pkg/trunk/drivers/stack.xml
pkg/trunk/openrave_planning/stack.xml
pkg/trunk/pr2/stack.xml
Modified: pkg/trunk/controllers/stack.xml
===================================================================
--- pkg/trunk/controllers/stack.xml 2009-08-10 11:18:47 UTC (rev 21396)
+++ pkg/trunk/controllers/stack.xml 2009-08-10 11:20:07 UTC (rev 21397)
@@ -14,6 +14,6 @@
<depend stack="common"/> <!-- tinyxml, manipulation_msgs, filters, tinyxml, robot_actions, filters, manipulation_msgs -->
<depend stack="ros"/> <!-- rospy, rospy, rospy, roscpp, std_msgs, rosconsole, roscpp, roscpp, roscpp, rospy, std_msgs, rosconsole -->
<depend stack="visualization_core"/> <!-- visualization_msgs, visualization_msgs -->
- <depend stack="common_msgs"/> <!-- robot_msgs, robot_srvs, robot_msgs, robot_msgs, robot_srvs, robot_srvs, robot_msgs, geometry_msgs, robot_msgs, geometry_msgs -->
+ <depend stack="common_msgs"/> <!-- geometry_msgs -->
</stack>
Modified: pkg/trunk/drivers/stack.xml
===================================================================
--- pkg/trunk/drivers/stack.xml 2009-08-10 11:18:47 UTC (rev 21396)
+++ pkg/trunk/drivers/stack.xml 2009-08-10 11:20:07 UTC (rev 21397)
@@ -21,6 +21,6 @@
<depend stack="common"/> <!-- laser_scan, tinyxml -->
<depend stack="driver_common"/> <!-- driver_base, dynamic_reconfigure -->
<depend stack="ros"/> <!-- std_msgs, roscpp, rospy, std_msgs, rostest, std_msgs, roscpp, rospy, std_msgs, std_msgs, roscpp, roscpp, std_msgs, message_filters, rospy, roscpp, std_msgs, roscpp, std_msgs, roscpp, std_msgs, rospy, rospy, roscpp, roscpp, std_msgs, roscpp, rospy, std_msgs, roscpp, std_msgs, roscpp, std_msgs -->
- <depend stack="common_msgs"/> <!-- sensor_msgs, robot_msgs, geometry_msgs, robot_msgs, sensor_msgs, robot_msgs, sensor_msgs, sensor_msgs, robot_msgs, diagnostic_msgs, robot_msgs, robot_msgs, sensor_msgs, sensor_msgs, diagnostic_msgs, robot_msgs, robot_msgs, diagnostic_msgs, robot_msgs, sensor_msgs, robot_msgs, sensor_msgs -->
+ <depend stack="common_msgs"/> <!-- sensor_msgs, geometry_msgs, diagnostic_msgs -->
</stack>
Modified: pkg/trunk/openrave_planning/stack.xml
===================================================================
--- pkg/trunk/openrave_planning/stack.xml 2009-08-10 11:18:47 UTC (rev 21396)
+++ pkg/trunk/openrave_planning/stack.xml 2009-08-10 11:20:07 UTC (rev 21397)
@@ -15,6 +15,6 @@
<depend stack="simulators"/> <!-- opende -->
<depend stack="common"/> <!-- manipulation_msgs, laser_scan -->
<depend stack="ros"/> <!-- std_msgs, roscpp, roscpp, roscpp, roscpp_sessions, std_msgs, rosoct, roscpp, roslaunch -->
- <depend stack="common_msgs"/> <!-- sensor_msgs, robot_msgs, mapping_msgs -->
+ <depend stack="common_msgs"/> <!-- sensor_msgs, mapping_msgs -->
</stack>
Modified: pkg/trunk/pr2/stack.xml
===================================================================
--- pkg/trunk/pr2/stack.xml 2009-08-10 11:18:47 UTC (rev 21396)
+++ pkg/trunk/pr2/stack.xml 2009-08-10 11:20:07 UTC (rev 21397)
@@ -17,6 +17,6 @@
<depend stack="opencv"/> <!-- opencv_latest -->
<depend stack="ros"/> <!-- rospy, roslaunch, std_msgs, roscpp -->
<depend stack="drivers"/> <!-- forearm_cam -->
- <depend stack="common_msgs"/> <!-- robot_srvs, robot_msgs, diagnostic_msgs -->
+ <depend stack="common_msgs"/> <!-- diagnostic_msgs -->
</stack>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sf...@us...> - 2009-08-10 11:23:09
|
Revision: 21399
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21399&view=rev
Author: sfkwc
Date: 2009-08-10 11:22:59 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
svn ignores
Property Changed:
----------------
pkg/trunk/stacks/pr2/pr2_defs/
pkg/trunk/stacks/pr2/pr2_defs/meshes/
pkg/trunk/stacks/pr2/pr2_defs/robots/
pkg/trunk/stacks/trex/trex_pr2/
pkg/trunk/stacks/trex/trex_ros/
pkg/trunk/util/pr2_ik/msg/
pkg/trunk/util/pr2_ik/srv/
Property changes on: pkg/trunk/stacks/pr2/pr2_defs
___________________________________________________________________
Added: svn:ignore
+ .build_version
.rosgov_files
bin
build
Property changes on: pkg/trunk/stacks/pr2/pr2_defs/meshes
___________________________________________________________________
Added: svn:ignore
+ *.iv
Property changes on: pkg/trunk/stacks/pr2/pr2_defs/robots
___________________________________________________________________
Added: svn:ignore
+ *.xml
pr2.urdf
Property changes on: pkg/trunk/stacks/trex/trex_pr2
___________________________________________________________________
Added: svn:ignore
+ .build_version
.rosgcov_files
bin
Property changes on: pkg/trunk/stacks/trex/trex_ros
___________________________________________________________________
Added: svn:ignore
+ .build_version
.rosgcov_files
bin
Property changes on: pkg/trunk/util/pr2_ik/msg
___________________________________________________________________
Added: svn:ignore
+ java
cpp
lisp
oct
Property changes on: pkg/trunk/util/pr2_ik/srv
___________________________________________________________________
Added: svn:ignore
+ java
cpp
lisp
oct
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tf...@us...> - 2009-08-10 21:32:21
|
Revision: 21468
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21468&view=rev
Author: tfoote
Date: 2009-08-10 21:32:15 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
deprecating loki for we've replaced it's used feature with pluginlib
Added Paths:
-----------
pkg/trunk/deprecated/loki/
Removed Paths:
-------------
pkg/trunk/stacks/common/loki/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vij...@us...> - 2009-08-10 22:44:59
|
Revision: 21482
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21482&view=rev
Author: vijaypradeep
Date: 2009-08-10 22:44:47 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
ActionClient GoalHandle refactoring and file reorganization
Modified Paths:
--------------
pkg/trunk/sandbox/move_base_client/src/move_base_client.cpp
pkg/trunk/stacks/common/actionlib/include/actionlib/client/action_client.h
pkg/trunk/stacks/common/actionlib/include/actionlib/client/simple_action_client.h
Added Paths:
-----------
pkg/trunk/stacks/common/actionlib/include/actionlib/client/client_goal_handle.ipp
pkg/trunk/stacks/common/actionlib/include/actionlib/client/client_helpers.h
pkg/trunk/stacks/common/actionlib/include/actionlib/client/comm_state_machine.ipp
pkg/trunk/stacks/common/actionlib/include/actionlib/client/goal_manager.ipp
Removed Paths:
-------------
pkg/trunk/stacks/common/actionlib/include/actionlib/client/comm_state_machine.cpp
pkg/trunk/stacks/common/actionlib/include/actionlib/client/comm_state_machine.h
pkg/trunk/stacks/common/actionlib/include/actionlib/client/goal_handle.cpp
pkg/trunk/stacks/common/actionlib/include/actionlib/client/goal_manager.cpp
pkg/trunk/stacks/common/actionlib/include/actionlib/client/goal_manager.h
Modified: pkg/trunk/sandbox/move_base_client/src/move_base_client.cpp
===================================================================
--- pkg/trunk/sandbox/move_base_client/src/move_base_client.cpp 2009-08-10 22:43:50 UTC (rev 21481)
+++ pkg/trunk/sandbox/move_base_client/src/move_base_client.cpp 2009-08-10 22:44:47 UTC (rev 21482)
@@ -45,7 +45,7 @@
typedef ActionClient<MoveBaseAction> MoveBaseClient;
-void transitionCallback(GoalHandle<MoveBaseAction> gh)
+void transitionCallback(ActionClient<MoveBaseAction>::GoalHandle gh)
{
ROS_DEBUG("In the transition");
@@ -57,7 +57,7 @@
ROS_DEBUG("NULL Result");
}
-void feedbackCallback(GoalHandle<MoveBaseAction> gh, const MoveBaseFeedbackConstPtr& fb)
+void feedbackCallback(ActionClient<MoveBaseAction>::GoalHandle gh, const MoveBaseFeedbackConstPtr& fb)
{
ROS_INFO("Got Feedback!");
}
@@ -83,7 +83,7 @@
MoveBaseGoal goal;
- GoalHandle<MoveBaseAction> gh = ac.sendGoal(goal, &transitionCallback, &feedbackCallback);
+ ActionClient<MoveBaseAction>::GoalHandle gh = ac.sendGoal(goal, &transitionCallback, &feedbackCallback);
sleep(1.0);
Modified: pkg/trunk/stacks/common/actionlib/include/actionlib/client/action_client.h
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/client/action_client.h 2009-08-10 22:43:50 UTC (rev 21481)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/client/action_client.h 2009-08-10 22:44:47 UTC (rev 21482)
@@ -36,7 +36,7 @@
#define ACTIONLIB_ACTION_CLIENT_H_
#include "ros/ros.h"
-#include "actionlib/client/goal_manager.h"
+#include "actionlib/client/client_helpers.h"
namespace actionlib
{
@@ -51,11 +51,14 @@
template <class ActionSpec>
class ActionClient
{
+public:
+ typedef ClientGoalHandle<ActionSpec> GoalHandle;
+
private:
ACTION_DEFINITION(ActionSpec);
typedef ActionClient<ActionSpec> ActionClientT;
- typedef boost::function<void (GoalHandle<ActionSpec>) > TransitionCallback;
- typedef boost::function<void (GoalHandle<ActionSpec>, const FeedbackConstPtr&) > FeedbackCallback;
+ typedef boost::function<void (GoalHandle) > TransitionCallback;
+ typedef boost::function<void (GoalHandle, const FeedbackConstPtr&) > FeedbackCallback;
typedef boost::function<void (const ActionGoalConstPtr)> SendGoalFunc;
public:
@@ -88,12 +91,12 @@
* \param transition_cb Callback that gets called on every client state transition
* \param feedback_cb Callback that gets called whenever feedback for this goal is received
*/
- GoalHandle<ActionSpec> sendGoal(const Goal& goal,
- TransitionCallback transition_cb = TransitionCallback(),
- FeedbackCallback feedback_cb = FeedbackCallback())
+ GoalHandle sendGoal(const Goal& goal,
+ TransitionCallback transition_cb = TransitionCallback(),
+ FeedbackCallback feedback_cb = FeedbackCallback())
{
ROS_DEBUG("about to start initGoal()");
- GoalHandle<ActionSpec> gh = manager_.initGoal(goal, transition_cb, feedback_cb);
+ GoalHandle gh = manager_.initGoal(goal, transition_cb, feedback_cb);
ROS_DEBUG("Done with initGoal()");
return gh;
Copied: pkg/trunk/stacks/common/actionlib/include/actionlib/client/client_goal_handle.ipp (from rev 21480, pkg/trunk/stacks/common/actionlib/include/actionlib/client/goal_handle.cpp)
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/client/client_goal_handle.ipp (rev 0)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/client/client_goal_handle.ipp 2009-08-10 22:44:47 UTC (rev 21482)
@@ -0,0 +1,187 @@
+/*********************************************************************
+* 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.
+*********************************************************************/
+
+/* This file has the template implementation for ClientGoalHandle. It should be included with the
+ * class definition.
+ */
+
+namespace actionlib
+{
+
+template<class ActionSpec>
+ClientGoalHandle<ActionSpec>::ClientGoalHandle()
+{
+ gm_ = NULL;
+ active_ = false;
+}
+
+template<class ActionSpec>
+ClientGoalHandle<ActionSpec>::ClientGoalHandle(GoalManagerT* gm, typename ManagedListT::Handle handle)
+{
+ gm_ = gm;
+ active_ = true;
+ list_handle_ = handle;
+}
+
+template<class ActionSpec>
+void ClientGoalHandle<ActionSpec>::reset()
+{
+ list_handle_.reset();
+ active_ = false;
+ gm_ = NULL;
+}
+
+template<class ActionSpec>
+bool ClientGoalHandle<ActionSpec>::isExpired() const
+{
+ return !active_;
+}
+
+
+template<class ActionSpec>
+CommState ClientGoalHandle<ActionSpec>::getCommState()
+{
+ if (!active_)
+ ROS_ERROR("Trying to getCommState on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
+
+ assert(gm_);
+
+ boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
+ return list_handle_.getElem()->getCommState();
+}
+
+template<class ActionSpec>
+TerminalState ClientGoalHandle<ActionSpec>::getTerminalState()
+{
+ if (!active_)
+ ROS_ERROR("Trying to getTerminalState on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
+
+ assert(gm_);
+
+ boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
+ CommState comm_state_ = list_handle_.getElem()->getCommState();
+ if (comm_state_ != CommState::DONE)
+ ROS_WARN("Asking for the terminal state when we're in [%s]", comm_state_.toString().c_str());
+
+ GoalStatus goal_status = list_handle_.getElem()->getGoalStatus();
+
+ switch (goal_status.status)
+ {
+ case GoalStatus::PENDING:
+ case GoalStatus::ACTIVE:
+ case GoalStatus::PREEMPTING:
+ case GoalStatus::RECALLING:
+ ROS_ERROR("Asking for terminal state, but latest goal status is %u", goal_status.status); return TerminalState::LOST;
+ case GoalStatus::PREEMPTED: return TerminalState::PREEMPTED;
+ case GoalStatus::SUCCEEDED: return TerminalState::SUCCEEDED;
+ case GoalStatus::ABORTED: return TerminalState::ABORTED;
+ case GoalStatus::REJECTED: return TerminalState::REJECTED;
+ case GoalStatus::RECALLED: return TerminalState::RECALLED;
+ case GoalStatus::LOST: return TerminalState::LOST;
+ default:
+ ROS_ERROR("Unknown goal status: %u", goal_status.status); break;
+ }
+
+ ROS_ERROR("Bug in determining terminal state");
+ return TerminalState::LOST;
+}
+
+template<class ActionSpec>
+typename ClientGoalHandle<ActionSpec>::ResultConstPtr ClientGoalHandle<ActionSpec>::getResult()
+{
+ if (!active_)
+ ROS_ERROR("Trying to getResult on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
+ assert(gm_);
+ boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
+ return list_handle_.getElem()->getResult();
+}
+
+template<class ActionSpec>
+void ClientGoalHandle<ActionSpec>::resend()
+{
+ if (!active_)
+ ROS_ERROR("Trying to resend() on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
+ assert(gm_);
+ boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
+
+ ActionGoalConstPtr action_goal = list_handle_.getElem()->getActionGoal();
+
+ if (!action_goal)
+ ROS_ERROR("BUG: Got a NULL action_goal");
+
+ if (gm_->send_goal_func_)
+ gm_->send_goal_func_(action_goal);
+}
+
+template<class ActionSpec>
+void ClientGoalHandle<ActionSpec>::cancel()
+{
+ if (!active_)
+ ROS_ERROR("Trying to cancel() on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
+ assert(gm_);
+ boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
+
+ ActionGoalConstPtr action_goal = list_handle_.getElem()->getActionGoal();
+
+ GoalID cancel_msg;
+ cancel_msg.stamp = ros::Time(0,0);
+ cancel_msg.id = list_handle_.getElem()->getActionGoal()->goal_id.id;
+
+ if (gm_->cancel_func_)
+ gm_->cancel_func_(cancel_msg);
+
+ list_handle_.getElem()->transitionToState(*this, CommState::WAITING_FOR_CANCEL_ACK);
+}
+
+template<class ActionSpec>
+bool ClientGoalHandle<ActionSpec>::operator==(const ClientGoalHandle<ActionSpec>& rhs)
+{
+ // Check if both are inactive
+ if (!active_ && !rhs.active_)
+ return true;
+
+ // Check if one or the other is inactive
+ if (!active_ || !rhs.active_)
+ return false;
+
+ return (list_handle_ == rhs.list_handle_) ;
+}
+
+template<class ActionSpec>
+bool ClientGoalHandle<ActionSpec>::operator!=(const ClientGoalHandle<ActionSpec>& rhs)
+{
+ return !(*this==rhs);
+}
+
+}
Copied: pkg/trunk/stacks/common/actionlib/include/actionlib/client/client_helpers.h (from rev 21480, pkg/trunk/stacks/common/actionlib/include/actionlib/client/goal_manager.h)
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/client/client_helpers.h (rev 0)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/client/client_helpers.h 2009-08-10 22:44:47 UTC (rev 21482)
@@ -0,0 +1,265 @@
+/*********************************************************************
+* 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.
+*********************************************************************/
+
+#ifndef ACTIONLIB_GOAL_MANAGER_H_
+#define ACTIONLIB_GOAL_MANAGER_H_
+
+#include <boost/thread/recursive_mutex.hpp>
+#include <boost/interprocess/sync/scoped_lock.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+
+#include "actionlib/action_definition.h"
+
+#include "actionlib/managed_list.h"
+#include "actionlib/enclosure_deleter.h"
+#include "actionlib/goal_id_generator.h"
+
+#include "actionlib/client/comm_state.h"
+#include "actionlib/client/terminal_state.h"
+
+// msgs
+#include "actionlib/GoalID.h"
+#include "actionlib/GoalStatusArray.h"
+#include "actionlib/RequestType.h"
+
+namespace actionlib
+{
+
+template <class ActionSpec>
+class ClientGoalHandle;
+
+template <class ActionSpec>
+class CommStateMachine;
+
+template <class ActionSpec>
+class GoalManager
+{
+public:
+ ACTION_DEFINITION(ActionSpec);
+ typedef GoalManager<ActionSpec> GoalManagerT;
+ typedef ClientGoalHandle<ActionSpec> GoalHandleT;
+ typedef boost::function<void (GoalHandleT) > TransitionCallback;
+ typedef boost::function<void (GoalHandleT, const FeedbackConstPtr&) > FeedbackCallback;
+ typedef boost::function<void (const ActionGoalConstPtr)> SendGoalFunc;
+ typedef boost::function<void (const GoalID&)> CancelFunc;
+
+ GoalManager() { }
+
+ void registerSendGoalFunc(SendGoalFunc send_goal_func);
+ void registerCancelFunc(CancelFunc cancel_func);
+
+ GoalHandleT initGoal( const Goal& goal,
+ TransitionCallback transition_cb = TransitionCallback(),
+ FeedbackCallback feedback_cb = FeedbackCallback() );
+
+ void updateStatuses(const GoalStatusArrayConstPtr& status_array);
+ void updateFeedbacks(const ActionFeedbackConstPtr& action_feedback);
+ void updateResults(const ActionResultConstPtr& action_result);
+
+ friend class ClientGoalHandle<ActionSpec>;
+
+ // should be private
+ typedef ManagedList< boost::shared_ptr<CommStateMachine<ActionSpec> > > ManagedListT;
+ ManagedListT list_;
+private:
+ SendGoalFunc send_goal_func_ ;
+ CancelFunc cancel_func_ ;
+
+ boost::recursive_mutex list_mutex_;
+
+ GoalIDGenerator id_generator_;
+
+ void listElemDeleter(typename ManagedListT::iterator it);
+};
+
+/**
+ * \brief Client side handle to monitor goal progress
+ *
+ * A ClientGoalHandle is a reference counted object that is used to manipulate and monitor the progress
+ * of an already dispatched goal. Once all the goal handles go out of scope (or are reset), an
+ * ActionClient stops maintaining state for that goal.
+ */
+template <class ActionSpec>
+class ClientGoalHandle
+{
+private:
+ ACTION_DEFINITION(ActionSpec);
+
+public:
+ /**
+ * \brief Create an empty goal handle
+ *
+ * Constructs a goal handle that doesn't track any goal. Calling any method on an empty goal
+ * handle other than operator= will trigger an assertion.
+ */
+ ClientGoalHandle();
+
+ /**
+ * \brief Stops goal handle from tracking a goal
+ *
+ * Useful if you want to stop tracking the progress of a goal, but it is inconvenient to force
+ * the goal handle to go out of scope. Has pretty much the same semantics as boost::shared_ptr::reset()
+ */
+ void reset();
+
+ /**
+ * \brief Checks if this goal handle is tracking a goal
+ *
+ * Has pretty much the same semantics as boost::shared_ptr::expired()
+ * \return True if this goal handle is not tracking a goal
+ */
+ inline bool isExpired() const;
+
+ /**
+ * \brief Get the state of this goal's communication state machine from interaction with the server
+ *
+ * Possible States are: WAITING_FOR_GOAL_ACK, PENDING, ACTIVE, WAITING_FOR_RESULT,
+ * WAITING_FOR_CANCEL_ACK, RECALLING, PREEMPTING, DONE
+ * \return The current goal's communication state with the server
+ */
+ CommState getCommState();
+
+ /**
+ * \brief Get the terminal state information for this goal
+ *
+ * Possible States Are: RECALLED, REJECTED, PREEMPTED, ABORTED, SUCCEEDED, LOST
+ * This call only makes sense if CommState==DONE. This will send ROS_WARNs if we're not in DONE
+ * \return The terminal state
+ */
+ TerminalState getTerminalState();
+
+ /**
+ * \brief Get result associated with this goal
+ *
+ * \return NULL if no reseult received. Otherwise returns shared_ptr to result.
+ */
+ ResultConstPtr getResult();
+
+ /**
+ * \brief Resends this goal [with the same GoalID] to the ActionServer
+ *
+ * Useful if the user thinks that the goal may have gotten lost in transit
+ */
+ void resend();
+
+ /**
+ * \brief Sends a cancel message for this specific goal to the ActionServer
+ *
+ * Also transitions the Communication State Machine to WAITING_FOR_CANCEL_ACK
+ */
+ void cancel();
+
+ /**
+ * \brief Check if two goal handles point to the same goal
+ * \return TRUE if both point to the same goal. Also returns TRUE if both handles are inactive.
+ */
+ bool operator==(const ClientGoalHandle<ActionSpec>& rhs);
+
+ /**
+ * \brief !(operator==())
+ */
+ bool operator!=(const ClientGoalHandle<ActionSpec>& rhs);
+
+ friend class GoalManager<ActionSpec>;
+private:
+ typedef GoalManager<ActionSpec> GoalManagerT;
+ typedef ManagedList< boost::shared_ptr<CommStateMachine<ActionSpec> > > ManagedListT;
+
+ ClientGoalHandle(GoalManagerT* gm, typename ManagedListT::Handle handle);
+
+ GoalManagerT* gm_;
+ bool active_;
+ //typename ManagedListT::iterator it_;
+ typename ManagedListT::Handle list_handle_;
+};
+
+template <class ActionSpec>
+class CommStateMachine
+{
+ private:
+ //generates typedefs that we'll use to make our lives easier
+ ACTION_DEFINITION(ActionSpec);
+
+ public:
+ typedef boost::function<void (const ClientGoalHandle<ActionSpec>&) > TransitionCallback;
+ typedef boost::function<void (const ClientGoalHandle<ActionSpec>&, const FeedbackConstPtr&) > FeedbackCallback;
+ typedef ClientGoalHandle<ActionSpec> GoalHandleT;
+
+ CommStateMachine(const ActionGoalConstPtr& action_goal,
+ TransitionCallback transition_callback,
+ FeedbackCallback feedback_callback);
+
+ ActionGoalConstPtr getActionGoal() const;
+ CommState getCommState() const;
+ GoalStatus getGoalStatus() const;
+ ResultConstPtr getResult() const;
+
+ // Transitions caused by messages
+ void updateStatus(GoalHandleT& gh, const GoalStatusArrayConstPtr& status_array);
+ void updateFeedback(GoalHandleT& gh, const ActionFeedbackConstPtr& feedback);
+ void updateResult(GoalHandleT& gh, const ActionResultConstPtr& result);
+
+ // Forced transitions
+ void transitionToState(GoalHandleT& gh, const CommState::StateEnum& next_state);
+ void transitionToState(GoalHandleT& gh, const CommState& next_state);
+ void processLost(GoalHandleT& gh);
+ private:
+ CommStateMachine();
+
+ // State
+ CommState state_;
+ ActionGoalConstPtr action_goal_;
+ GoalStatus latest_goal_status_;
+ ActionResultConstPtr latest_result_;
+
+ // Callbacks
+ TransitionCallback transition_cb_;
+ FeedbackCallback feedback_cb_;
+
+ // **** Implementation ****
+ //! Change the state, as well as print out ROS_DEBUG info
+ void setCommState(const CommState& state);
+ void setCommState(const CommState::StateEnum& state);
+ const GoalStatus* findGoalStatus(const std::vector<GoalStatus>& status_vec) const;
+};
+
+}
+
+#include "actionlib/client/goal_manager.ipp"
+#include "actionlib/client/client_goal_handle.ipp"
+#include "actionlib/client/comm_state_machine.ipp"
+
+#endif // ACTIONLIB_GOAL_MANAGER_H_
Deleted: pkg/trunk/stacks/common/actionlib/include/actionlib/client/comm_state_machine.cpp
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/client/comm_state_machine.cpp 2009-08-10 22:43:50 UTC (rev 21481)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/client/comm_state_machine.cpp 2009-08-10 22:44:47 UTC (rev 21482)
@@ -1,400 +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.
-*********************************************************************/
-
-/* This file has the template implementation for CommStateMachine. It should be included with the
- * class definition.
- */
-
-namespace actionlib
-{
-
-template <class ActionSpec>
-CommStateMachine<ActionSpec>::CommStateMachine(const ActionGoalConstPtr& action_goal,
- TransitionCallback transition_cb,
- FeedbackCallback feedback_cb) : state_(CommState::WAITING_FOR_GOAL_ACK)
-{
- assert(action_goal);
- action_goal_ = action_goal;
- transition_cb_ = transition_cb;
- feedback_cb_ = feedback_cb;
- //transitionToState( CommState::WAITING_FOR_GOAL_ACK );
-}
-
-template <class ActionSpec>
-typename CommStateMachine<ActionSpec>::ActionGoalConstPtr CommStateMachine<ActionSpec>::getActionGoal() const
-{
- return action_goal_;
-}
-
-template <class ActionSpec>
-CommState CommStateMachine<ActionSpec>::getCommState() const
-{
- return state_;
-}
-
-template <class ActionSpec>
-GoalStatus CommStateMachine<ActionSpec>::getGoalStatus() const
-{
- return latest_goal_status_;
-}
-
-template <class ActionSpec>
-typename CommStateMachine<ActionSpec>::ResultConstPtr CommStateMachine<ActionSpec>::getResult() const
-{
- ResultConstPtr result;
- if (latest_result_)
- {
- EnclosureDeleter<const ActionResult> d(latest_result_);
- result = ResultConstPtr(&(latest_result_->result), d);
- }
- return result;
-
-}
-
-template <class ActionSpec>
-void CommStateMachine<ActionSpec>::setCommState(const CommState::StateEnum& state)
-{
- setCommState(CommState(state));
-}
-
-template <class ActionSpec>
-void CommStateMachine<ActionSpec>::setCommState(const CommState& state)
-{
- ROS_DEBUG("Transitioning CommState from %s to %s", state_.toString().c_str(), state.toString().c_str());
- state_ = state;
-}
-
-template <class ActionSpec>
-const GoalStatus* CommStateMachine<ActionSpec>::findGoalStatus(const std::vector<GoalStatus>& status_vec) const
-{
- for (unsigned int i=0; i<status_vec.size(); i++)
- if (status_vec[i].goal_id.id == action_goal_->goal_id.id)
- return &status_vec[i];
- return NULL;
-}
-
-template <class ActionSpec>
-void CommStateMachine<ActionSpec>::updateFeedback(GoalHandleT& gh, const ActionFeedbackConstPtr& action_feedback)
-{
- // Check if this feedback is for us
- if (action_goal_->goal_id.id != action_feedback->status.goal_id.id)
- return;
-
- if (feedback_cb_)
- {
- EnclosureDeleter<const ActionFeedback> d(action_feedback);
- FeedbackConstPtr feedback(&(action_feedback->feedback), d);
- feedback_cb_(gh, feedback);
- }
-}
-
-template <class ActionSpec>
-void CommStateMachine<ActionSpec>::updateResult(GoalHandleT& gh, const ActionResultConstPtr& action_result)
-{
- // Check if this feedback is for us
- if (action_goal_->goal_id.id != action_result->status.goal_id.id)
- return;
- latest_goal_status_ = action_result->status;
- latest_result_ = action_result;
- switch (state_.state_)
- {
- case CommState::WAITING_FOR_GOAL_ACK:
- case CommState::PENDING:
- case CommState::ACTIVE:
- case CommState::WAITING_FOR_RESULT:
- case CommState::RECALLING:
- case CommState::PREEMPTING:
- transitionToState(gh, CommState::DONE);
- break;
- case CommState::DONE:
- ROS_ERROR("Got a result when we were already in the DONE state"); break;
- default:
- ROS_ERROR("In a funny comm state: %u", state_.state_); break;
- }
-}
-
-template <class ActionSpec>
-void CommStateMachine<ActionSpec>::updateStatus(GoalHandleT& gh, const GoalStatusArrayConstPtr& status_array)
-{
- const GoalStatus* goal_status = findGoalStatus(status_array->status_list);
-
- if (goal_status)
- latest_goal_status_ = *goal_status;
- else
- {
- if (state_ != CommState::WAITING_FOR_GOAL_ACK &&
- state_ != CommState::WAITING_FOR_RESULT &&
- state_ != CommState::DONE)
- {
- processLost(gh);
- }
- return;
- }
-
- switch (state_.state_)
- {
- case CommState::WAITING_FOR_GOAL_ACK:
- {
- if (goal_status)
- {
- switch (goal_status->status)
- {
- case GoalStatus::PENDING:
- transitionToState(gh, CommState::PENDING); break;
- case GoalStatus::ACTIVE:
- transitionToState(gh, CommState::ACTIVE); break;
- case GoalStatus::PREEMPTED:
- case GoalStatus::SUCCEEDED:
- case GoalStatus::ABORTED:
- case GoalStatus::REJECTED:
- case GoalStatus::RECALLED:
- transitionToState(gh, CommState::WAITING_FOR_RESULT); break;
- case GoalStatus::PREEMPTING:
- transitionToState(gh, CommState::PREEMPTING);
- case GoalStatus::RECALLING:
- transitionToState(gh, CommState::RECALLING);
- default:
- ROS_ERROR("BUG: Got an unknown status from the ActionServer. status = %u", goal_status->status);
- break;
- }
- }
- break;
- }
- case CommState::PENDING:
- {
- switch (goal_status->status)
- {
- case GoalStatus::PENDING:
- break;
- case GoalStatus::ACTIVE:
- transitionToState(gh, CommState::ACTIVE);
- break;
- case GoalStatus::PREEMPTED:
- case GoalStatus::SUCCEEDED:
- case GoalStatus::ABORTED:
- case GoalStatus::REJECTED:
- case GoalStatus::RECALLED:
- transitionToState(gh, CommState::WAITING_FOR_RESULT);
- break;
- case GoalStatus::PREEMPTING:
- transitionToState(gh, CommState::PREEMPTING);
- break;
- case GoalStatus::RECALLING:
- transitionToState(gh, CommState::RECALLING);
- break;
- default:
- ROS_ERROR("BUG: Got an unknown goal status from the ActionServer. status = %u", goal_status->status);
- break;
- }
- break;
- }
- case CommState::ACTIVE:
- {
- switch (goal_status->status)
- {
- case GoalStatus::PENDING:
- ROS_ERROR("Invalid transition from ACTIVE to PENDING"); break;
- case GoalStatus::ACTIVE:
- break;
- case GoalStatus::REJECTED:
- ROS_ERROR("Invalid transition from ACTIVE to REJECTED"); break;
- case GoalStatus::RECALLING:
- ROS_ERROR("Invalid transition from ACTIVE to RECALLING"); break;
- case GoalStatus::RECALLED:
- ROS_ERROR("Invalid transition from ACTIVE to RECALLED"); break;
- case GoalStatus::PREEMPTED:
- case GoalStatus::SUCCEEDED:
- case GoalStatus::ABORTED:
- transitionToState(gh, CommState::WAITING_FOR_RESULT); break;
- case GoalStatus::PREEMPTING:
- transitionToState(gh, CommState::PREEMPTING); break;
- default:
- ...
[truncated message content] |
|
From: <ei...@us...> - 2009-08-10 22:57:36
|
Revision: 21485
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21485&view=rev
Author: eitanme
Date: 2009-08-10 22:57:21 +0000 (Mon, 10 Aug 2009)
Log Message:
-----------
Moving nav_robot_actions to deprecated since it didn't seem to go through last time. Also, moving internal classes to the ActionServer outside to create smaller header files.
Modified Paths:
--------------
pkg/trunk/stacks/common/actionlib/include/actionlib/server/action_server.h
pkg/trunk/stacks/common/actionlib/include/actionlib/server/action_server_imp.h
pkg/trunk/stacks/common/actionlib/include/actionlib/server/goal_handle_imp.h
pkg/trunk/stacks/common/actionlib/include/actionlib/server/handle_tracker_deleter_imp.h
pkg/trunk/stacks/common/actionlib/include/actionlib/server/status_tracker_imp.h
Added Paths:
-----------
pkg/trunk/deprecated/nav_robot_actions/
pkg/trunk/stacks/common/actionlib/include/actionlib/server/handle_tracker_deleter.h
pkg/trunk/stacks/common/actionlib/include/actionlib/server/server_goal_handle.h
pkg/trunk/stacks/common/actionlib/include/actionlib/server/status_tracker.h
Removed Paths:
-------------
pkg/trunk/stacks/navigation/nav_robot_actions/
Modified: pkg/trunk/stacks/common/actionlib/include/actionlib/server/action_server.h
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/server/action_server.h 2009-08-10 22:56:55 UTC (rev 21484)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/server/action_server.h 2009-08-10 22:57:21 UTC (rev 21485)
@@ -46,6 +46,9 @@
#include <actionlib/RequestType.h>
#include <actionlib/enclosure_deleter.h>
#include <actionlib/action_definition.h>
+#include <actionlib/server/status_tracker.h>
+#include <actionlib/server/handle_tracker_deleter.h>
+#include <actionlib/server/server_goal_handle.h>
#include <list>
@@ -62,150 +65,16 @@
*/
template <class ActionSpec>
class ActionServer {
+ public:
+ //for convenience when referring to ServerGoalHandles
+ typedef ServerGoalHandle<ActionSpec> GoalHandle;
+
private:
//generates typedefs that we'll use to make our lives easier
ACTION_DEFINITION(ActionSpec);
- /**
- * @class StatusTracker
- * @brief A class for storing the status of each goal the action server
- * is currently working on
- */
- class StatusTracker {
- public:
- StatusTracker(const GoalID& goal_id, unsigned int status);
-
- StatusTracker(const boost::shared_ptr<const ActionGoal>& goal);
-
- boost::shared_ptr<const ActionGoal> goal_;
- boost::weak_ptr<void> handle_tracker_;
- GoalStatus status_;
- ros::Time handle_destruction_time_;
- };
-
- /**
- * @class HandleTrackerDeleter
- * @brief A class to help with tracking GoalHandles and removing goals
- * from the status list when the last GoalHandle associated with a given
- * goal is deleted.
- */
- //class to help with tracking status objects
- class HandleTrackerDeleter {
- public:
- HandleTrackerDeleter(ActionServer<ActionSpec>* as,
- typename std::list<StatusTracker>::iterator status_it);
-
- void operator()(void* ptr);
-
- private:
- ActionServer<ActionSpec>* as_;
- typename std::list<StatusTracker>::iterator status_it_;
- };
-
public:
/**
- * @class GoalHandle
- * @brief Encapsulates a state machine for a given goal that the user can
- * trigger transisions on. All ROS interfaces for the goal are managed by
- * the ActionServer to lessen the burden on the user.
- */
- class GoalHandle {
- public:
- /**
- * @brief Default constructor for a GoalHandle
- */
- GoalHandle();
-
- /** @brief Accept the goal referenced by the goal handle. This will
- * transition to the ACTIVE state or the PREEMPTING state depending
- * on whether a cancel request has been received for the goal
- */
- void setAccepted();
-
- /**
- * @brief Set the status of the goal associated with the GoalHandle to RECALLED or PREEMPTED
- * depending on what the current status of the goal is
- * @param result Optionally, the user can pass in a result to be sent to any clients of the goal
- */
- void setCanceled(const Result& result = Result());
-
- /**
- * @brief Set the status of the goal associated with the GoalHandle to rejected
- * @param result Optionally, the user can pass in a result to be sent to any clients of the goal
- */
- void setRejected(const Result& result = Result());
-
- /**
- * @brief Set the status of the goal associated with the GoalHandle to aborted
- * @param result Optionally, the user can pass in a result to be sent to any clients of the goal
- */
- void setAborted(const Result& result = Result());
-
- /**
- * @brief Set the status of the goal associated with the GoalHandle to succeeded
- * @param result Optionally, the user can pass in a result to be sent to any clients of the goal
- */
- void setSucceeded(const Result& result = Result());
-
- /**
- * @brief Send feedback to any clients of the goal associated with this GoalHandle
- * @param feedback The feedback to send to the client
- */
- void publishFeedback(const Feedback& feedback);
-
- /**
- * @brief Accessor for the goal associated with the GoalHandle
- * @return A shared_ptr to the goal object
- */
- boost::shared_ptr<const Goal> getGoal() const;
-
- /**
- * @brief Accessor for the goal id associated with the GoalHandle
- * @return The goal id
- */
- GoalID getGoalID() const;
-
- /**
- * @brief Accessor for the status associated with the GoalHandle
- * @return The goal status
- */
- GoalStatus getGoalStatus() const;
-
- /**
- * @brief Equals operator for GoalHandles
- * @param other The GoalHandle to compare to
- * @return True if the GoalHandles refer to the same goal, false otherwise
- */
- bool operator==(const GoalHandle& other);
-
- /**
- * @brief != operator for GoalHandles
- * @param other The GoalHandle to compare to
- * @return True if the GoalHandles refer to different goals, false otherwise
- */
- bool operator!=(const GoalHandle& other);
-
- private:
- /**
- * @brief A private constructor used by the ActionServer to initialize a GoalHandle
- */
- GoalHandle(typename std::list<StatusTracker>::iterator status_it,
- ActionServer<ActionSpec>* as, boost::shared_ptr<void> handle_tracker);
-
- /**
- * @brief A private method to set status to PENDING or RECALLING
- * @return True if the cancel request should be passed on to the user, false otherwise
- */
- bool setCancelRequested();
-
- typename std::list<StatusTracker>::iterator status_it_;
- boost::shared_ptr<const ActionGoal> goal_;
- ActionServer<ActionSpec>* as_;
- boost::shared_ptr<void> handle_tracker_;
- friend class ActionServer<ActionSpec>;
- };
-
- /**
* @brief Constructor for an ActionServer
* @param n A NodeHandle to create a namespace under
* @param name The name of the action
@@ -272,7 +141,7 @@
ros::Timer status_timer_;
- std::list<StatusTracker> status_list_;
+ std::list<StatusTracker<ActionSpec> > status_list_;
boost::function<void (GoalHandle)> goal_callback_;
boost::function<void (GoalHandle)> cancel_callback_;
@@ -280,14 +149,13 @@
ros::Time last_cancel_;
ros::Duration status_list_timeout_;
+ //we need to allow access to our private fields to our helper classes
+ friend class ServerGoalHandle<ActionSpec>;
+ friend class HandleTrackerDeleter<ActionSpec>;
};
};
-//Sinc all of this is templated things need to be header-based, but its still
-//nice to separate out the implementation which we'll include here
-#include <actionlib/server/status_tracker_imp.h>
-#include <actionlib/server/handle_tracker_deleter_imp.h>
-#include <actionlib/server/goal_handle_imp.h>
+//include the implementation
#include <actionlib/server/action_server_imp.h>
#endif
Modified: pkg/trunk/stacks/common/actionlib/include/actionlib/server/action_server_imp.h
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/server/action_server_imp.h 2009-08-10 22:56:55 UTC (rev 21484)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/server/action_server_imp.h 2009-08-10 22:57:21 UTC (rev 21485)
@@ -100,7 +100,7 @@
//we need to handle a cancel for the user
ROS_DEBUG("The action server has received a new cancel request");
bool goal_id_found = false;
- for(typename std::list<StatusTracker>::iterator it = status_list_.begin(); it != status_list_.end(); ++it){
+ for(typename std::list<StatusTracker<ActionSpec> >::iterator it = status_list_.begin(); it != status_list_.end(); ++it){
//check if the goal id is zero or if it is equal to the goal id of
//the iterator or if the time of the iterator warrants a cancel
if(
@@ -117,7 +117,7 @@
if((*it).handle_tracker_.expired()){
//if the handle tracker is expired, then we need to create a new one
- HandleTrackerDeleter d(this, it);
+ HandleTrackerDeleter<ActionSpec> d(this, it);
handle_tracker = boost::shared_ptr<void>((void *)NULL, d);
(*it).handle_tracker_ = handle_tracker;
@@ -138,8 +138,8 @@
//if the requested goal_id was not found, and it is non-zero, then we need to store the cancel request
if(goal_id->id != ros::Time() && !goal_id_found){
- typename std::list<StatusTracker>::iterator it = status_list_.insert(status_list_.end(),
- StatusTracker(*goal_id, GoalStatus::RECALLING));
+ typename std::list<StatusTracker<ActionSpec> >::iterator it = status_list_.insert(status_list_.end(),
+ StatusTracker<ActionSpec> (*goal_id, GoalStatus::RECALLING));
//start the timer for how long the status will live in the list without a goal handle to it
(*it).handle_destruction_time_ = ros::Time::now();
}
@@ -156,7 +156,7 @@
ROS_DEBUG("The action server has received a new goal request");
//we need to check if this goal already lives in the status list
- for(typename std::list<StatusTracker>::iterator it = status_list_.begin(); it != status_list_.end(); ++it){
+ for(typename std::list<StatusTracker<ActionSpec> >::iterator it = status_list_.begin(); it != status_list_.end(); ++it){
if(goal->goal_id.id == (*it).status_.goal_id.id){
//if this is a request for a goal that has no active handles left,
@@ -171,10 +171,10 @@
}
//if the goal is not in our list, we need to create a StatusTracker associated with this goal and push it on
- typename std::list<StatusTracker>::iterator it = status_list_.insert(status_list_.end(), StatusTracker(goal));
+ typename std::list<StatusTracker<ActionSpec> >::iterator it = status_list_.insert(status_list_.end(), StatusTracker<ActionSpec> (goal));
//we need to create a handle tracker for the incoming goal and update the StatusTracker
- HandleTrackerDeleter d(this, it);
+ HandleTrackerDeleter<ActionSpec> d(this, it);
boost::shared_ptr<void> handle_tracker((void *)NULL, d);
(*it).handle_tracker_ = handle_tracker;
@@ -205,7 +205,7 @@
status_array.set_status_list_size(status_list_.size());
unsigned int i = 0;
- for(typename std::list<StatusTracker>::iterator it = status_list_.begin(); it != status_list_.end();){
+ for(typename std::list<StatusTracker<ActionSpec> >::iterator it = status_list_.begin(); it != status_list_.end();){
status_array.status_list[i] = (*it).status_;
//check if the item is due for deletion from the status list
Modified: pkg/trunk/stacks/common/actionlib/include/actionlib/server/goal_handle_imp.h
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/server/goal_handle_imp.h 2009-08-10 22:56:55 UTC (rev 21484)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/server/goal_handle_imp.h 2009-08-10 22:57:21 UTC (rev 21485)
@@ -38,10 +38,10 @@
#define ACTIONLIB_GOAL_HANDLE_IMP_H_
namespace actionlib {
template <class ActionSpec>
- ActionServer<ActionSpec>::GoalHandle::GoalHandle(){}
+ ServerGoalHandle<ActionSpec>::ServerGoalHandle(){}
template <class ActionSpec>
- void ActionServer<ActionSpec>::GoalHandle::setAccepted(){
+ void ServerGoalHandle<ActionSpec>::setAccepted(){
ROS_DEBUG("Accepting goal, id: %.2f, stamp: %.2f", getGoalID().id.toSec(), getGoalID().stamp.toSec());
if(goal_){
unsigned int status = (*status_it_).status_.status;
@@ -61,11 +61,11 @@
(*status_it_).status_.status);
}
else
- ROS_ERROR("Attempt to set status on an uninitialized GoalHandle");
+ ROS_ERROR("Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
- void ActionServer<ActionSpec>::GoalHandle::setCanceled(const Result& result){
+ void ServerGoalHandle<ActionSpec>::setCanceled(const Result& result){
ROS_DEBUG("Setting status to canceled on goal, id: %.2f, stamp: %.2f", getGoalID().id.toSec(), getGoalID().stamp.toSec());
if(goal_){
unsigned int status = (*status_it_).status_.status;
@@ -82,11 +82,11 @@
(*status_it_).status_.status);
}
else
- ROS_ERROR("Attempt to set status on an uninitialized GoalHandle");
+ ROS_ERROR("Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
- void ActionServer<ActionSpec>::GoalHandle::setRejected(const Result& result){
+ void ServerGoalHandle<ActionSpec>::setRejected(const Result& result){
ROS_DEBUG("Setting status to rejected on goal, id: %.2f, stamp: %.2f", getGoalID().id.toSec(), getGoalID().stamp.toSec());
if(goal_){
unsigned int status = (*status_it_).status_.status;
@@ -99,11 +99,11 @@
(*status_it_).status_.status);
}
else
- ROS_ERROR("Attempt to set status on an uninitialized GoalHandle");
+ ROS_ERROR("Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
- void ActionServer<ActionSpec>::GoalHandle::setAborted(const Result& result){
+ void ServerGoalHandle<ActionSpec>::setAborted(const Result& result){
ROS_DEBUG("Setting status to aborted on goal, id: %.2f, stamp: %.2f", getGoalID().id.toSec(), getGoalID().stamp.toSec());
if(goal_){
unsigned int status = (*status_it_).status_.status;
@@ -116,11 +116,11 @@
status);
}
else
- ROS_ERROR("Attempt to set status on an uninitialized GoalHandle");
+ ROS_ERROR("Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
- void ActionServer<ActionSpec>::GoalHandle::setSucceeded(const Result& result){
+ void ServerGoalHandle<ActionSpec>::setSucceeded(const Result& result){
ROS_DEBUG("Setting status to succeeded on goal, id: %.2f, stamp: %.2f", getGoalID().id.toSec(), getGoalID().stamp.toSec());
if(goal_){
unsigned int status = (*status_it_).status_.status;
@@ -133,21 +133,21 @@
status);
}
else
- ROS_ERROR("Attempt to set status on an uninitialized GoalHandle");
+ ROS_ERROR("Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
- void ActionServer<ActionSpec>::GoalHandle::publishFeedback(const Feedback& feedback){
+ void ServerGoalHandle<ActionSpec>::publishFeedback(const Feedback& feedback){
ROS_DEBUG("Publishing feedback for goal, id: %.2f, stamp: %.2f", getGoalID().id.toSec(), getGoalID().stamp.toSec());
if(goal_) {
as_->publishFeedback((*status_it_).status_, feedback);
}
else
- ROS_ERROR("Attempt to publish feedback on an uninitialized GoalHandle");
+ ROS_ERROR("Attempt to publish feedback on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
- boost::shared_ptr<const typename ActionServer<ActionSpec>::Goal> ActionServer<ActionSpec>::GoalHandle::getGoal() const{
+ boost::shared_ptr<const typename ServerGoalHandle<ActionSpec>::Goal> ServerGoalHandle<ActionSpec>::getGoal() const{
//if we have a goal that is non-null
if(goal_){
//create the deleter for our goal subtype
@@ -158,27 +158,27 @@
}
template <class ActionSpec>
- GoalID ActionServer<ActionSpec>::GoalHandle::getGoalID() const{
+ GoalID ServerGoalHandle<ActionSpec>::getGoalID() const{
if(goal_)
return (*status_it_).status_.goal_id;
else{
- ROS_ERROR("Attempt to get a goal id on an uninitialized GoalHandle");
+ ROS_ERROR("Attempt to get a goal id on an uninitialized ServerGoalHandle");
return GoalID();
}
}
template <class ActionSpec>
- GoalStatus ActionServer<ActionSpec>::GoalHandle::getGoalStatus() const{
+ GoalStatus ServerGoalHandle<ActionSpec>::getGoalStatus() const{
if(goal_)
return (*status_it_).status_;
else{
- ROS_ERROR("Attempt to get goal status on an uninitialized GoalHandle");
+ ROS_ERROR("Attempt to get goal status on an uninitialized ServerGoalHandle");
return GoalStatus();
}
}
template <class ActionSpec>
- bool ActionServer<ActionSpec>::GoalHandle::operator==(const GoalHandle& other){
+ bool ServerGoalHandle<ActionSpec>::operator==(const ServerGoalHandle& other){
if(!goal_ || !other.goal_)
return false;
GoalID my_id = getGoalID();
@@ -187,7 +187,7 @@
}
template <class ActionSpec>
- bool ActionServer<ActionSpec>::GoalHandle::operator!=(const GoalHandle& other){
+ bool ServerGoalHandle<ActionSpec>::operator!=(const ServerGoalHandle& other){
if(!goal_ || !other.goal_)
return true;
GoalID my_id = getGoalID();
@@ -196,13 +196,13 @@
}
template <class ActionSpec>
- ActionServer<ActionSpec>::GoalHandle::GoalHandle(typename std::list<StatusTracker>::iterator status_it,
+ ServerGoalHandle<ActionSpec>::ServerGoalHandle(typename std::list<StatusTracker<ActionSpec> >::iterator status_it,
ActionServer<ActionSpec>* as, boost::shared_ptr<void> handle_tracker)
: status_it_(status_it), goal_((*status_it).goal_),
as_(as), handle_tracker_(handle_tracker){}
template <class ActionSpec>
- bool ActionServer<ActionSpec>::GoalHandle::setCancelRequested(){
+ bool ServerGoalHandle<ActionSpec>::setCancelRequested(){
ROS_DEBUG("Transisitoning to a cancel requested state on goal id: %.2f, stamp: %.2f", getGoalID().id.toSec(), getGoalID().stamp.toSec());
if(goal_){
unsigned int status = (*status_it_).status_.status;
Added: pkg/trunk/stacks/common/actionlib/include/actionlib/server/handle_tracker_deleter.h
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/server/handle_tracker_deleter.h (rev 0)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/server/handle_tracker_deleter.h 2009-08-10 22:57:21 UTC (rev 21485)
@@ -0,0 +1,67 @@
+/*********************************************************************
+*
+* 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 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.
+*
+* Author: Eitan Marder-Eppstein
+*********************************************************************/
+#ifndef ACTONLIB_HANDLE_TRACKER_DELETER_H_
+#define ACTONLIB_HANDLE_TRACKER_DELETER_H_
+#include <actionlib/action_definition.h>
+#include <actionlib/server/status_tracker.h>
+namespace actionlib {
+ //we need to forward declare the ActionServer class
+ template <class ActionSpec>
+ class ActionServer;
+
+ /**
+ * @class HandleTrackerDeleter
+ * @brief A class to help with tracking GoalHandles and removing goals
+ * from the status list when the last GoalHandle associated with a given
+ * goal is deleted.
+ */
+ //class to help with tracking status objects
+ template <class ActionSpec>
+ class HandleTrackerDeleter {
+ public:
+ HandleTrackerDeleter(ActionServer<ActionSpec>* as,
+ typename std::list<StatusTracker<ActionSpec> >::iterator status_it);
+
+ void operator()(void* ptr);
+
+ private:
+ ActionServer<ActionSpec>* as_;
+ typename std::list<StatusTracker<ActionSpec> >::iterator status_it_;
+ };
+};
+#include <actionlib/server/handle_tracker_deleter_imp.h>
+#endif
Modified: pkg/trunk/stacks/common/actionlib/include/actionlib/server/handle_tracker_deleter_imp.h
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/server/handle_tracker_deleter_imp.h 2009-08-10 22:56:55 UTC (rev 21484)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/server/handle_tracker_deleter_imp.h 2009-08-10 22:57:21 UTC (rev 21485)
@@ -38,12 +38,12 @@
#define ACTIONLIB_HANDLE_TRACKER_DELETER_IMP_H_
namespace actionlib {
template <class ActionSpec>
- ActionServer<ActionSpec>::HandleTrackerDeleter::HandleTrackerDeleter(ActionServer<ActionSpec>* as,
- typename std::list<typename ActionServer<ActionSpec>::StatusTracker>::iterator status_it)
+ HandleTrackerDeleter<ActionSpec>::HandleTrackerDeleter(ActionServer<ActionSpec>* as,
+ typename std::list<StatusTracker<ActionSpec> >::iterator status_it)
: as_(as), status_it_(status_it) {}
template <class ActionSpec>
- void ActionServer<ActionSpec>::HandleTrackerDeleter::operator()(void* ptr){
+ void HandleTrackerDeleter<ActionSpec>::operator()(void* ptr){
if(as_){
//make sure to lock while we erase status for this goal from the list
as_->lock_.lock();
Added: pkg/trunk/stacks/common/actionlib/include/actionlib/server/server_goal_handle.h
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/server/server_goal_handle.h (rev 0)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/server/server_goal_handle.h 2009-08-10 22:57:21 UTC (rev 21485)
@@ -0,0 +1,163 @@
+/*********************************************************************
+*
+* 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 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.
+*
+* Author: Eitan Marder-Eppstein
+*********************************************************************/
+#ifndef ACTIONLIB_SERVER_GOAL_HANDLE_H_
+#define ACTIONLIB_SERVER_GOAL_HANDLE_H_
+
+#include <actionlib/GoalID.h>
+#include <actionlib/GoalStatus.h>
+#include <actionlib/action_definition.h>
+#include <actionlib/server/status_tracker.h>
+#include <boost/shared_ptr.hpp>
+
+namespace actionlib {
+ //forward declaration of ActionServer
+ template <class ActionSpec>
+ class ActionServer;
+
+ /**
+ * @class ServerGoalHandle
+ * @brief Encapsulates a state machine for a given goal that the user can
+ * trigger transisions on. All ROS interfaces for the goal are managed by
+ * the ActionServer to lessen the burden on the user.
+ */
+ template <class ActionSpec>
+ class ServerGoalHandle {
+ private:
+ //generates typedefs that we'll use to make our lives easier
+ ACTION_DEFINITION(ActionSpec);
+
+ public:
+ /**
+ * @brief Default constructor for a ServerGoalHandle
+ */
+ ServerGoalHandle();
+
+ /** @brief Accept the goal referenced by the goal handle. This will
+ * transition to the ACTIVE state or the PREEMPTING state depending
+ * on whether a cancel request has been received for the goal
+ */
+ void setAccepted();
+
+ /**
+ * @brief Set the status of the goal associated with the ServerGoalHandle to RECALLED or PREEMPTED
+ * depending on what the current status of the goal is
+ * @param result Optionally, the user can pass in a result to be sent to any clients of the goal
+ */
+ void setCanceled(const Result& result = Result());
+
+ /**
+ * @brief Set the status of the goal associated with the ServerGoalHandle to rejected
+ * @param result Optionally, the user can pass in a result to be sent to any clients of the goal
+ */
+ void setRejected(const Result& result = Result());
+
+ /**
+ * @brief Set the status of the goal associated with the ServerGoalHandle to aborted
+ * @param result Optionally, the user can pass in a result to be sent to any clients of the goal
+ */
+ void setAborted(const Result& result = Result());
+
+ /**
+ * @brief Set the status of the goal associated with the ServerGoalHandle to succeeded
+ * @param result Optionally, the user can pass in a result to be sent to any clients of the goal
+ */
+ void setSucceeded(const Result& result = Result());
+
+ /**
+ * @brief Send feedback to any clients of the goal associated with this ServerGoalHandle
+ * @param feedback The feedback to send to the client
+ */
+ void publishFeedback(const Feedback& feedback);
+
+ /**
+ * @brief Accessor for the goal associated with the ServerGoalHandle
+ * @return A shared_ptr to the goal object
+ */
+ boost::shared_ptr<const Goal> getGoal() const;
+
+ /**
+ * @brief Accessor for the goal id associated with the ServerGoalHandle
+ * @return The goal id
+ */
+ GoalID getGoalID() const;
+
+ /**
+ * @brief Accessor for the status associated with the ServerGoalHandle
+ * @return The goal status
+ */
+ GoalStatus getGoalStatus() const;
+
+ /**
+ * @brief Equals operator for ServerGoalHandles
+ * @param other The ServerGoalHandle to compare to
+ * @return True if the ServerGoalHandles refer to the same goal, false otherwise
+ */
+ bool operator==(const ServerGoalHandle& other);
+
+ /**
+ * @brief != operator for ServerGoalHandles
+ * @param other The ServerGoalHandle to compare to
+ * @return True if the ServerGoalHandles refer to different goals, false otherwise
+ */
+ bool operator!=(const ServerGoalHandle& other);
+
+ private:
+ /**
+ * @brief A private constructor used by the ActionServer to initialize a ServerGoalHandle
+ */
+ ServerGoalHandle(typename std::list<StatusTracker<ActionSpec> >::iterator status_it,
+ ActionServer<ActionSpec>* as, boos...
[truncated message content] |
|
From: <vij...@us...> - 2009-08-11 01:30:24
|
Revision: 21496
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21496&view=rev
Author: vijaypradeep
Date: 2009-08-11 01:30:07 +0000 (Tue, 11 Aug 2009)
Log Message:
-----------
Building basic action for capturing gripper LED location in cameras
Modified Paths:
--------------
pkg/trunk/calibration/sandbox/pr2_calibration_actions/CMakeLists.txt
pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/robot_pixels_capture.cpp
pkg/trunk/sandbox/action_translator/include/action_translator/action_translator.h
pkg/trunk/vision/led_detection/stereo_left_detect.launch
pkg/trunk/vision/led_detection/stereo_right_detect.launch
Added Paths:
-----------
pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/capture_robot_pixels_action_server.cpp
pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/capture_robot_pixels_sample_client.cpp
Modified: pkg/trunk/calibration/sandbox/pr2_calibration_actions/CMakeLists.txt
===================================================================
--- pkg/trunk/calibration/sandbox/pr2_calibration_actions/CMakeLists.txt 2009-08-11 01:23:19 UTC (rev 21495)
+++ pkg/trunk/calibration/sandbox/pr2_calibration_actions/CMakeLists.txt 2009-08-11 01:30:07 UTC (rev 21496)
@@ -24,7 +24,12 @@
rospack_add_executable(run_robot_pixels_capture src/run_robot_pixels_capture.cpp)
target_link_libraries(run_robot_pixels_capture ${PROJECT_NAME})
+rospack_add_executable(capture_robot_pixels_action_server src/capture_robot_pixels_action_server.cpp)
+target_link_libraries(capture_robot_pixels_action_server ${PROJECT_NAME})
+rospack_add_executable(capture_robot_pixels_sample_client src/capture_robot_pixels_sample_client.cpp)
+target_link_libraries(capture_robot_pixels_sample_client ${PROJECT_NAME})
+
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
-add_subdirectory(test EXCLUDE_FROM_ALL)
\ No newline at end of file
+add_subdirectory(test EXCLUDE_FROM_ALL)
Added: pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/capture_robot_pixels_action_server.cpp
===================================================================
--- pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/capture_robot_pixels_action_server.cpp (rev 0)
+++ pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/capture_robot_pixels_action_server.cpp 2009-08-11 01:30:07 UTC (rev 21496)
@@ -0,0 +1,114 @@
+/*********************************************************************
+* Software License Agreement (BSD License)
+*
+* Copyright (c) 2009, 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.
+*********************************************************************/
+
+#include <ros/ros.h>
+#include <actionlib/server/single_goal_action_server.h>
+#include <pr2_calibration_actions/robot_pixels_capture.h>
+#include <pr2_calibration_actions/CaptureRobotPixelsAction.h>
+
+using namespace pr2_calibration_actions;
+
+class CaptureRobotPixelsActionServer
+{
+public:
+ CaptureRobotPixelsActionServer(ros::NodeHandle nh, std::string action_name) :
+ as_(nh, action_name)
+ {
+ as_.registerPreemptCallback( boost::bind(&CaptureRobotPixelsActionServer::preemptCallback, this));
+ as_.registerGoalCallback( boost::bind(&CaptureRobotPixelsActionServer::goalCallback, this));
+ }
+
+ void preemptCallback()
+ {
+ boost::mutex::scoped_lock lock(capture_mutex_);
+ ROS_FATAL_COND(!capture_, "Trying to preempt a null capture_");
+ capture_->shutdown();
+ as_.setPreempted();
+ }
+
+ void goalCallback()
+ {
+ ROS_INFO("Got a Goal. Going to start listening to data");
+ boost::mutex::scoped_lock lock(capture_mutex_);
+ if ( as_.isActive() )
+ {
+ ROS_FATAL_COND(!capture_, "Trying to shutdown a null capture_");
+ capture_->shutdown();
+ as_.setPreempted();
+ }
+ capture_.reset();
+
+ cur_goal_ = as_.acceptNewGoal();
+
+ capture_.reset(new RobotPixelsCapture(cur_goal_->config,
+ boost::bind(&CaptureRobotPixelsActionServer::completionCallback, this, _1),
+ boost::bind(&CaptureRobotPixelsActionServer::sendFeedback, this, _1)));
+ }
+
+ void completionCallback(const RobotPixelsResult& result)
+ {
+ capture_->shutdown();
+ CaptureRobotPixelsResult full_result;
+ full_result.result = result;
+ as_.setSucceeded(full_result);
+ }
+
+ void sendFeedback(const RobotPixelsFeedback& feedback)
+ {
+ CaptureRobotPixelsFeedback full_feedback;
+ full_feedback.feedback = feedback;
+ //as_.publishFeedback(full_feedback);
+ }
+
+
+private:
+ actionlib::SingleGoalActionServer<pr2_calibration_actions::CaptureRobotPixelsAction> as_;
+
+ boost::mutex capture_mutex_;
+ boost::shared_ptr<RobotPixelsCapture> capture_;
+ CaptureRobotPixelsGoalConstPtr cur_goal_;
+
+};
+
+
+int main(int argc, char** argv)
+{
+ ros::init(argc, argv, "capture_robot_pixels_action_node");
+
+ ros::NodeHandle nh;
+
+ CaptureRobotPixelsActionServer act(nh, "capture_robot_pixels");
+
+ ros::spin();
+}
Added: pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/capture_robot_pixels_sample_client.cpp
===================================================================
--- pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/capture_robot_pixels_sample_client.cpp (rev 0)
+++ pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/capture_robot_pixels_sample_client.cpp 2009-08-11 01:30:07 UTC (rev 21496)
@@ -0,0 +1,153 @@
+/*********************************************************************
+* Software License Agreement (BSD License)
+*
+* Copyright (c) 2009, 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.
+*********************************************************************/
+
+#include <ros/ros.h>
+#include <actionlib/client/simple_action_client.h>
+#include <pr2_calibration_actions/CaptureRobotPixelsAction.h>
+#include <pr2_calibration_actions/robot_pixels_capture.h>
+
+using namespace pr2_calibration_actions;
+
+
+RobotPixelsConfig buildCommand()
+{
+ RobotPixelsConfig config;
+
+ config.joint_states_config.joint_states_topic = "joint_states";
+ config.joint_states_config.joint_names.resize(9);
+ config.joint_states_config.joint_names[0] = "head_pan_joint";
+ config.joint_states_config.joint_names[1] = "head_tilt_joint";
+ config.joint_states_config.joint_names[2] = "r_shoulder_pan_joint";
+ config.joint_states_config.joint_names[3] = "r_shoulder_lift_joint";
+ config.joint_states_config.joint_names[4] = "r_upper_arm_roll_joint";
+ config.joint_states_config.joint_names[5] = "r_elbow_flex_joint";
+ config.joint_states_config.joint_names[6] = "r_forearm_roll_joint";
+ config.joint_states_config.joint_names[7] = "r_wrist_flex_joint";
+ config.joint_states_config.joint_names[8] = "r_wrist_roll_joint";
+
+ config.joint_states_config.tolerances.resize(9);
+ config.joint_states_config.tolerances[0] = 0.0;
+ config.joint_states_config.tolerances[1] = 0.0;
+ config.joint_states_config.tolerances[2] = 0.0;
+ config.joint_states_config.tolerances[3] = 0.0;
+ config.joint_states_config.tolerances[4] = 0.0;
+ config.joint_states_config.tolerances[5] = 0.0;
+ config.joint_states_config.tolerances[6] = 0.0;
+ config.joint_states_config.tolerances[7] = 0.0;
+ config.joint_states_config.tolerances[8] = 0.0;
+
+ config.joint_states_config.padding = ros::Duration(1,0);
+ config.joint_states_config.min_samples = 30;
+ config.joint_states_config.cache_size = 450;
+
+ // *************************************
+
+ config.pixel_configs.resize(2);
+ config.pixel_configs[0].pixel_topic = "/stereo/left/led";
+ config.pixel_configs[0].image_topic = "/stereo/left/image_rect";
+ config.pixel_configs[0].channel_name = "Left_Rect";
+ config.pixel_configs[0].tolerance = 1.5;
+ config.pixel_configs[0].padding = ros::Duration().fromSec(.5);
+ config.pixel_configs[0].min_samples = 4;
+
+ config.pixel_configs[1].pixel_topic = "/stereo/right/led";
+ config.pixel_configs[1].image_topic = "/stereo/right/image_rect";
+ config.pixel_configs[1].channel_name = "Right_Rect";
+ config.pixel_configs[1].tolerance = 1.5;
+ config.pixel_configs[1].padding = ros::Duration().fromSec(.5);
+ config.pixel_configs[1].min_samples = 4;
+
+ // *************************************
+
+ config.joint_states_timeshift = ros::Duration(0,0);
+
+ // *************************************
+
+ config.pixel_timeshifts.resize(1);
+ config.pixel_timeshifts[0].chan1 = 0;
+ config.pixel_timeshifts[0].chan2 = 1;
+ config.pixel_timeshifts[0].max_timeshift = ros::Duration(0,0);
+
+ return config;
+}
+
+void activeCallback()
+{
+ ROS_INFO("Request transitioned to ACTIVE!");
+}
+
+void feedbackCallback(const CaptureRobotPixelsFeedbackConstPtr& feedback)
+{
+ printf("%s:\n", feedback->feedback.joint_states_channel.channel_name.c_str());
+ for (unsigned int i=0; i<feedback->feedback.joint_states_channel.ranges.size(); i++)
+ {
+ printf(" ranges[%2u]: %5.3f\n", i, feedback->feedback.joint_states_channel.ranges[i]);
+ }
+
+ for (unsigned int i=0; i<feedback->feedback.pixel_channels.size(); i++)
+ {
+ printf("%s:\n", feedback->feedback.pixel_channels[i].channel_name.c_str());
+ for (unsigned int j=0; j<feedback->feedback.pixel_channels[i].ranges.size(); j++)
+ {
+ printf(" ranges[%2u]: %5.3f\n", i, feedback->feedback.pixel_channels[i].ranges[j]);
+ }
+ }
+}
+
+void doneCallback(const actionlib::TerminalState& terminal_state, const CaptureRobotPixelsResultConstPtr& result)
+{
+ ROS_INFO("DONE! With terminal_state [%s]", terminal_state.toString().c_str());
+}
+
+int main(int argc, char** argv)
+{
+ ros::init(argc, argv, "robot_pixel_capture_node");
+
+ ros::NodeHandle nh;
+
+ actionlib::SimpleActionClient<CaptureRobotPixelsAction> ac(nh, "capture_robot_pixels");
+
+ RobotPixelsConfig config = buildCommand();
+ CaptureRobotPixelsGoal full_goal;
+ full_goal.config = config;
+
+ sleep(1);
+
+ ac.sendGoal(full_goal, &doneCallback, &activeCallback, &feedbackCallback);
+
+ ros::spin();
+
+}
+
+
Modified: pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/robot_pixels_capture.cpp
===================================================================
--- pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/robot_pixels_capture.cpp 2009-08-11 01:23:19 UTC (rev 21495)
+++ pkg/trunk/calibration/sandbox/pr2_calibration_actions/src/robot_pixels_capture.cpp 2009-08-11 01:30:07 UTC (rev 21496)
@@ -55,6 +55,7 @@
const unsigned int N = config.pixel_configs.size();
pixel_channels_.resize(N);
stationary_pixels_.resize(N);
+ cur_feedback_.pixel_channels.resize(N);
for (unsigned int i=0; i<N; i++)
{
@@ -143,7 +144,7 @@
boost::mutex::scoped_lock lock(joint_states_mutex_);
if (stationary_joint_states_->size() == 0)
{
- ROS_INFO("Haven't received data from JointStates yet");
+ ROS_INFO("Haven't received data any stationary JointStates in a while");
return;
}
success = stationary_joint_states_->getClosestElem(time, joint_states);
@@ -159,7 +160,7 @@
{
if (stationary_pixels_[i]->size() == 0)
{
- ROS_INFO("Haven't received data for PixelChannel[%u] yet", i);
+ ROS_INFO("Haven't received stationary PixelChannel[%u] data in a while", i);
return;
}
success = stationary_pixels_[i]->getClosestElem(time, pixel_vec[i]);
@@ -167,7 +168,6 @@
}
}
-
// If timeshift is 0, then it's a special case, and we skip the timeshift checking
if (joint_states_timeshift_ != ros::Duration(0,0))
{
@@ -189,7 +189,7 @@
}
}
else
- ROS_INFO("Ignote joint states timeshift");
+ ROS_INFO("Ignore joint states timeshift");
// Verify all cross pixel timeshifts are within bounds
for (unsigned int i=0; i<pixel_timeshifts_.size(); i++)
Modified: pkg/trunk/sandbox/action_translator/include/action_translator/action_translator.h
===================================================================
--- pkg/trunk/sandbox/action_translator/include/action_translator/action_translator.h 2009-08-11 01:23:19 UTC (rev 21495)
+++ pkg/trunk/sandbox/action_translator/include/action_translator/action_translator.h 2009-08-11 01:30:07 UTC (rev 21496)
@@ -43,6 +43,9 @@
namespace action_translator
{
+/**
+ * \brief A helper class used to convert between the old actions (robot_actions) and the new actions (actionlib)
+ */
template<class ActionSpec, class OldGoal, class OldFeedback>
class ActionTranslator : public robot_actions::Action<OldGoal, OldFeedback>
{
@@ -55,6 +58,13 @@
typedef boost::function< OldFeedback(const Feedback&)> FromActionFeedbackFunc;
typedef boost::function< OldFeedback(const Result&)> FromActionResultFunc;
+ /**
+ * \param new_action_name The namespace in which actionlib should communicate. The robot_actions
+ * part will communicate in the namespace [new_action_name]_old
+ * \param from_old_goal_func Function to translate the robot_actions goal into the actionlib goal
+ * \param from_action_feedback_func Function to translate the actionlib feedback into a robot_actions feedback
+ * \param from_action_result_func Function to translate the actionlib result into a robot_actions feedback
+ */
ActionTranslator(const std::string& new_action_name,
FromOldGoalFunc from_old_goal_func,
FromActionFeedbackFunc from_action_feedback_func = FromActionFeedbackFunc(),
@@ -69,6 +79,9 @@
}
+ /**
+ * \brief Blocking call to actionlib with a goal request
+ */
robot_actions::ResultStatus execute(const OldGoal& old_goal, OldFeedback& old_feedback)
{
ac_.stopTrackingGoal();
Modified: pkg/trunk/vision/led_detection/stereo_left_detect.launch
===================================================================
--- pkg/trunk/vision/led_detection/stereo_left_detect.launch 2009-08-11 01:23:19 UTC (rev 21495)
+++ pkg/trunk/vision/led_detection/stereo_left_detect.launch 2009-08-11 01:30:07 UTC (rev 21496)
@@ -5,7 +5,7 @@
<node pkg="led_detection" type="led_detector_node" name="stereo_left_detector" output="screen">
<remap from="image" to="/stereo/left/image_rect" />
<remap from="cam_info" to="/stereo/left/cam_info" />
- <param name="use_led_pose" type="bool" value="true" />
+ <param name="use_led_pose" type="bool" value="false" />
<param name="led_frame" type="string" value="r_gripper_tool_frame" />
<remap from="~led" to="stereo/left/led" />
<remap from="~debug_image" to="stereo/left/led_debug_image" />
Modified: pkg/trunk/vision/led_detection/stereo_right_detect.launch
===================================================================
--- pkg/trunk/vision/led_detection/stereo_right_detect.launch 2009-08-11 01:23:19 UTC (rev 21495)
+++ pkg/trunk/vision/led_detection/stereo_right_detect.launch 2009-08-11 01:30:07 UTC (rev 21496)
@@ -5,7 +5,7 @@
<node pkg="led_detection" type="led_detector_node" name="stereo_right_detector" output="screen">
<remap from="image" to="/stereo/right/image_rect" />
<remap from="cam_info" to="/stereo/right/cam_info" />
- <param name="use_led_pose" type="bool" value="true" />
+ <param name="use_led_pose" type="bool" value="false" />
<param name="led_frame" type="string" value="r_gripper_tool_frame" />
<remap from="~led" to="stereo/right/led" />
<remap from="~debug_image" to="stereo/right/led_debug_image" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jfa...@us...> - 2009-08-12 18:55:27
|
Revision: 21672
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21672&view=rev
Author: jfaustwg
Date: 2009-08-12 18:55:19 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
Remove use of Polyline from nav_view, rviz
rviz PolyLine2D display split into GridCells, Path, Polygon
Modified Paths:
--------------
pkg/trunk/highlevel/move_base_stage/move_base/nav_view.xml
pkg/trunk/stacks/navigation/nav_view/src/nav_view/nav_view_panel.cpp
pkg/trunk/stacks/navigation/nav_view/src/nav_view/nav_view_panel.h
pkg/trunk/stacks/visualization/rviz/CMakeLists.txt
pkg/trunk/stacks/visualization/rviz/src/rviz/factory.cpp
pkg/trunk/stacks/visualization/rviz/src/rviz/visualization_manager.i
Added Paths:
-----------
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/grid_cells_display.cpp
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/grid_cells_display.h
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/path_display.cpp
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/path_display.h
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/polygon_display.cpp
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/polygon_display.h
Removed Paths:
-------------
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/poly_line_2d_display.cpp
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/poly_line_2d_display.h
Modified: pkg/trunk/highlevel/move_base_stage/move_base/nav_view.xml
===================================================================
--- pkg/trunk/highlevel/move_base_stage/move_base/nav_view.xml 2009-08-12 18:42:45 UTC (rev 21671)
+++ pkg/trunk/highlevel/move_base_stage/move_base/nav_view.xml 2009-08-12 18:55:19 UTC (rev 21672)
@@ -1,10 +1,10 @@
<launch>
<node pkg="nav_view" type="nav_view" respawn="false">
<remap from="goal" to="/move_base/activate" />
- <remap from="raw_obstacles" to="/move_base/local_costmap/raw_obstacles" />
- <remap from="inflated_obstacles" to="/move_base/local_costmap/inflated_obstacles" />
- <remap from="gui_path" to="/move_base/NavfnROS/plan" />
- <remap from="local_path" to="/move_base/TrajectoryPlannerROS/local_plan" />
- <remap from="robot_footprint" to="/move_base/TrajectoryPlannerROS/robot_footprint"/>
+ <remap from="obstacles" to="/move_base/local_costmap/obstacles_new" />
+ <remap from="inflated_obstacles" to="/move_base/local_costmap/inflated_obstacles_new" />
+ <remap from="global_plan" to="/move_base/NavfnROS/plan_new" />
+ <remap from="local_plan" to="/move_base/TrajectoryPlannerROS/local_plan_new" />
+ <remap from="robot_footprint" to="/move_base/TrajectoryPlannerROS/robot_footprint_new"/>
</node>
</launch>
Modified: pkg/trunk/stacks/navigation/nav_view/src/nav_view/nav_view_panel.cpp
===================================================================
--- pkg/trunk/stacks/navigation/nav_view/src/nav_view/nav_view_panel.cpp 2009-08-12 18:42:45 UTC (rev 21671)
+++ pkg/trunk/stacks/navigation/nav_view/src/nav_view/nav_view_panel.cpp 2009-08-12 18:55:19 UTC (rev 21672)
@@ -67,8 +67,8 @@
, map_object_( NULL )
, cloud_object_( NULL )
, radius_object_( NULL )
-, path_line_object_( NULL )
-, local_path_object_( NULL )
+, global_plan_object_( NULL )
+, local_plan_object_( NULL )
, footprint_object_( NULL )
, inflated_obstacles_object_( NULL )
, raw_obstacles_object_( NULL )
@@ -98,25 +98,22 @@
particle_cloud_sub_ = nh_.subscribe("particlecloud", 1, &NavViewPanel::incomingPoseArray, this);
- gui_path_sub_.subscribe(nh_, "gui_path", 2);
- local_path_sub_.subscribe(nh_, "local_path", 2);
+ global_plan_sub_.subscribe(nh_, "global_plan", 2);
+ local_plan_sub_.subscribe(nh_, "local_plan", 2);
robot_footprint_sub_.subscribe(nh_, "robot_footprint", 2);
inflated_obs_sub_.subscribe(nh_, "inflated_obstacles", 2);
- raw_obs_sub_.subscribe(nh_, "raw_obstacles", 2);
- gui_laser_sub_.subscribe(nh_, "gui_laser", 2);
- gui_path_filter_ = PolylineFilterPtr(new PolylineFilter(gui_path_sub_, *tf_client_, global_frame_id_, 2));
- local_path_filter_ = PolylineFilterPtr(new PolylineFilter(local_path_sub_, *tf_client_, global_frame_id_, 2));
- robot_footprint_filter_ = PolylineFilterPtr(new PolylineFilter(robot_footprint_sub_, *tf_client_, global_frame_id_, 2));
- inflated_obs_filter_ = PolylineFilterPtr(new PolylineFilter(inflated_obs_sub_, *tf_client_, global_frame_id_, 2));
- raw_obs_filter_ = PolylineFilterPtr(new PolylineFilter(raw_obs_sub_, *tf_client_, global_frame_id_, 2));
- gui_laser_filter_ = PolylineFilterPtr(new PolylineFilter(gui_laser_sub_, *tf_client_, global_frame_id_, 2));
+ raw_obs_sub_.subscribe(nh_, "obstacles", 2);
+ global_plan_filter_.reset(new PathFilter(global_plan_sub_, *tf_client_, global_frame_id_, 2));
+ local_plan_filter_.reset(new PathFilter(local_plan_sub_, *tf_client_, global_frame_id_, 2));
+ robot_footprint_filter_.reset(new PolygonFilter(robot_footprint_sub_, *tf_client_, global_frame_id_, 2));
+ inflated_obs_filter_.reset(new GridCellsFilter(inflated_obs_sub_, *tf_client_, global_frame_id_, 2));
+ raw_obs_filter_.reset(new GridCellsFilter(raw_obs_sub_, *tf_client_, global_frame_id_, 2));
- gui_path_filter_->registerCallback(boost::bind(&NavViewPanel::incomingGuiPath, this, _1));
- local_path_filter_->registerCallback(boost::bind(&NavViewPanel::incomingLocalPath, this, _1));
+ global_plan_filter_->registerCallback(boost::bind(&NavViewPanel::incomingGuiPath, this, _1));
+ local_plan_filter_->registerCallback(boost::bind(&NavViewPanel::incomingLocalPath, this, _1));
robot_footprint_filter_->registerCallback(boost::bind(&NavViewPanel::incomingRobotFootprint, this, _1));
inflated_obs_filter_->registerCallback(boost::bind(&NavViewPanel::incomingInflatedObstacles, this, _1));
raw_obs_filter_->registerCallback(boost::bind(&NavViewPanel::incomingRawObstacles, this, _1));
- gui_laser_filter_->registerCallback(boost::bind(&NavViewPanel::incomingGuiLaser, this, _1));
render_panel_->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( NavViewPanel::onRenderWindowMouseEvents ), NULL, this );
render_panel_->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( NavViewPanel::onRenderWindowMouseEvents ), NULL, this );
@@ -160,18 +157,16 @@
render_panel_->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( NavViewPanel::onRenderWindowMouseEvents ), NULL, this );
particle_cloud_sub_.shutdown();
- gui_path_sub_.unsubscribe();
- local_path_sub_.unsubscribe();
+ global_plan_sub_.unsubscribe();
+ local_plan_sub_.unsubscribe();
robot_footprint_sub_.unsubscribe();
inflated_obs_sub_.unsubscribe();
raw_obs_sub_.unsubscribe();
- gui_laser_sub_.unsubscribe();
- gui_path_filter_.reset();
- local_path_filter_.reset();
+ global_plan_filter_.reset();
+ local_plan_filter_.reset();
robot_footprint_filter_.reset();
inflated_obs_filter_.reset();
raw_obs_filter_.reset();
- gui_laser_filter_.reset();
delete update_timer_;
delete current_tool_;
@@ -425,7 +420,7 @@
{
static int count = 0;
std::stringstream ss;
- ss << "NavViewPathLine" << count++;
+ ss << "NavViewPolyLine" << count++;
object = scene_manager_->createManualObject( ss.str() );
Ogre::SceneNode* node = root_node_->createChildSceneNode();
node->attachObject( object );
@@ -474,6 +469,136 @@
queueRender();
}
+void NavViewPanel::createObjectFromPath(Ogre::ManualObject*& object, const nav_msgs::Path& path, const Ogre::ColourValue& color, float depth)
+{
+ if ( !object )
+ {
+ static int count = 0;
+ std::stringstream ss;
+ ss << "NavViewPath" << count++;
+ object = scene_manager_->createManualObject( ss.str() );
+ Ogre::SceneNode* node = root_node_->createChildSceneNode();
+ node->attachObject( object );
+ }
+
+ object->clear();
+
+ size_t num_points = path.poses.size();
+
+ if ( num_points > 0 )
+ {
+ object->estimateVertexCount( num_points);
+ object->begin( "BaseWhiteNoLighting", Ogre::RenderOperation::OT_LINE_STRIP );
+ for( size_t i=0; i < num_points; ++i)
+ {
+ tf::Stamped<tf::Point> point;
+ tf::pointMsgToTF(path.poses[i].pose.position, point);
+ point.frame_id_ = path.header.frame_id;
+ point.stamp_ = path.header.stamp;
+
+ tf_client_->transformPoint(global_frame_id_, point, point);
+
+ object->position(point.x(), point.y(), point.z());
+ object->colour( color );
+ }
+
+ object->end();
+
+ object->getParentSceneNode()->setPosition( Ogre::Vector3( 0.0f, 0.0f, depth ) );
+ }
+
+ queueRender();
+}
+
+void point32MsgToTF(const geometry_msgs::Point32& from, tf::Point& to)
+{
+ to.setX(from.x);
+ to.setY(from.y);
+ to.setZ(from.z);
+}
+
+void NavViewPanel::createObjectFromPolygon(Ogre::ManualObject*& object, const geometry_msgs::PolygonStamped& polygon, const Ogre::ColourValue& color, float depth)
+{
+ if ( !object )
+ {
+ static int count = 0;
+ std::stringstream ss;
+ ss << "NavViewPolygon" << count++;
+ object = scene_manager_->createManualObject( ss.str() );
+ Ogre::SceneNode* node = root_node_->createChildSceneNode();
+ node->attachObject( object );
+ }
+
+ object->clear();
+
+ size_t num_points = polygon.polygon.points.size();
+
+ if ( num_points > 0 )
+ {
+ object->estimateVertexCount( num_points);
+ object->begin( "BaseWhiteNoLighting", Ogre::RenderOperation::OT_LINE_STRIP );
+ for( size_t i=0; i < num_points + 1; ++i)
+ {
+ tf::Stamped<tf::Point> point;
+ point32MsgToTF(polygon.polygon.points[i % num_points], point);
+ point.frame_id_ = polygon.header.frame_id;
+ point.stamp_ = polygon.header.stamp;
+
+ tf_client_->transformPoint(global_frame_id_, point, point);
+
+ object->position(point.x(), point.y(), point.z());
+ object->colour( color );
+ }
+
+ object->end();
+
+ object->getParentSceneNode()->setPosition( Ogre::Vector3( 0.0f, 0.0f, depth ) );
+ }
+
+ queueRender();
+}
+
+void NavViewPanel::createObjectFromGridCells(Ogre::ManualObject*& object, const nav_msgs::GridCells& cells, const Ogre::ColourValue& color, float depth)
+{
+ if ( !object )
+ {
+ static int count = 0;
+ std::stringstream ss;
+ ss << "NavViewGridCells" << count++;
+ object = scene_manager_->createManualObject( ss.str() );
+ Ogre::SceneNode* node = root_node_->createChildSceneNode();
+ node->attachObject( object );
+ }
+
+ object->clear();
+
+ size_t num_points = cells.cells.size();
+
+ if ( num_points > 0 )
+ {
+ object->estimateVertexCount( num_points);
+ object->begin( "BaseWhiteNoLighting", Ogre::RenderOperation::OT_POINT_LIST );
+ for( size_t i=0; i < num_points; ++i)
+ {
+ tf::Stamped<tf::Point> point;
+ tf::pointMsgToTF(cells.cells[i], point);
+ point.frame_id_ = cells.header.frame_id;
+ point.stamp_ = cells.header.stamp;
+
+ tf_client_->transformPoint(global_frame_id_, point, point);
+
+ object->position(point.x(), point.y(), point.z());
+ object->colour( color );
+ }
+
+ object->end();
+
+ object->getParentSceneNode()->setPosition( Ogre::Vector3( 0.0f, 0.0f, depth ) );
+ }
+
+ queueRender();
+}
+
void NavViewPanel::incomingPoseArray(const geometry_msgs::PoseArray::ConstPtr& msg)
{
if ( !cloud_object_ )
@@ -524,36 +649,31 @@
queueRender();
}
-void NavViewPanel::incomingGuiPath(const visualization_msgs::Polyline::ConstPtr& msg)
+void NavViewPanel::incomingGuiPath(const nav_msgs::Path::ConstPtr& msg)
{
- createObjectFromPolyLine( path_line_object_, *msg, Ogre::RenderOperation::OT_LINE_LIST, PATH_LINE_DEPTH, false );
+ createObjectFromPath( global_plan_object_, *msg, Ogre::ColourValue(0.0, 1.0, 0.0), PATH_LINE_DEPTH );
}
-void NavViewPanel::incomingLocalPath(const visualization_msgs::Polyline::ConstPtr& msg)
+void NavViewPanel::incomingLocalPath(const nav_msgs::Path::ConstPtr& msg)
{
- createObjectFromPolyLine( local_path_object_, *msg, Ogre::RenderOperation::OT_LINE_LIST, LOCAL_PATH_DEPTH, false );
+ createObjectFromPath( local_plan_object_, *msg, Ogre::ColourValue(0.0, 0.0, 1.0), LOCAL_PATH_DEPTH );
}
-void NavViewPanel::incomingRobotFootprint(const visualization_msgs::Polyline::ConstPtr& msg)
+void NavViewPanel::incomingRobotFootprint(const geometry_msgs::PolygonStamped::ConstPtr& msg)
{
- createObjectFromPolyLine( footprint_object_, *msg, Ogre::RenderOperation::OT_LINE_LIST, FOOTPRINT_DEPTH, true );
+ createObjectFromPolygon( footprint_object_, *msg, Ogre::ColourValue(1.0, 0.0, 0.0), FOOTPRINT_DEPTH );
}
-void NavViewPanel::incomingInflatedObstacles(const visualization_msgs::Polyline::ConstPtr& msg)
+void NavViewPanel::incomingInflatedObstacles(const nav_msgs::GridCells::ConstPtr& msg)
{
- createObjectFromPolyLine( inflated_obstacles_object_, *msg, Ogre::RenderOperation::OT_POINT_LIST, INFLATED_OBSTACLES_DEPTH, false );
+ createObjectFromGridCells( inflated_obstacles_object_, *msg, Ogre::ColourValue(0.0, 0.0, 1.0), INFLATED_OBSTACLES_DEPTH );
}
-void NavViewPanel::incomingRawObstacles(const visualization_msgs::Polyline::ConstPtr& msg)
+void NavViewPanel::incomingRawObstacles(const nav_msgs::GridCells::ConstPtr& msg)
{
- createObjectFromPolyLine( raw_obstacles_object_, *msg, Ogre::RenderOperation::OT_POINT_LIST, RAW_OBSTACLES_DEPTH, false );
+ createObjectFromGridCells( raw_obstacles_object_, *msg, Ogre::ColourValue(1.0, 0.0, 0.0), RAW_OBSTACLES_DEPTH );
}
-void NavViewPanel::incomingGuiLaser(const visualization_msgs::Polyline::ConstPtr& msg)
-{
- createObjectFromPolyLine( laser_scan_object_, *msg, Ogre::RenderOperation::OT_POINT_LIST, LASER_SCAN_DEPTH, false );
-}
-
void NavViewPanel::onRenderWindowMouseEvents( wxMouseEvent& event )
{
int last_x = mouse_x_;
Modified: pkg/trunk/stacks/navigation/nav_view/src/nav_view/nav_view_panel.h
===================================================================
--- pkg/trunk/stacks/navigation/nav_view/src/nav_view/nav_view_panel.h 2009-08-12 18:42:45 UTC (rev 21671)
+++ pkg/trunk/stacks/navigation/nav_view/src/nav_view/nav_view_panel.h 2009-08-12 18:55:19 UTC (rev 21672)
@@ -34,8 +34,11 @@
#include "geometry_msgs/PoseArray.h"
#include "geometry_msgs/PoseStamped.h"
+#include "geometry_msgs/PolygonStamped.h"
+#include "nav_msgs/Path.h"
+#include "nav_msgs/GridCells.h"
+#include "geometry_msgs/PoseWithCovarianceStamped.h"
#include "visualization_msgs/Polyline.h"
-#include "geometry_msgs/PoseWithCovarianceStamped.h"
#include <OGRE/OgreTexture.h>
#include <OGRE/OgreMaterial.h>
@@ -89,17 +92,16 @@
@section topic ROS topics
Subscribes to (name/type):
-- @b "particlecloud"geometry_msgs/PoseArray : a set particles from a probabilistic localization system. Rendered is a set of small arrows.
-- @b "gui_path"/Polyline : a path from a planner. Rendered as a dashed line.
-- @b "gui_laser"/Polyline : re-projected laser scan from a planner. Rendered as a set of points.
-- @b "local_path"/Polyline : local path from a planner. Rendered as a dashed line.
-- @b "robot_footprint"/Polyline : Box "footprint" around the robot. Rendered as a dashed line
-- @b "raw_obstacles"/Polyline : Raw obstacle data. Rendered as points
-- @b "inflated_obstacles"/Polyline : Inflated obstacle data. Rendered as points
+- @b "particlecloud" - geometry_msgs/PoseArray : a set particles from a probabilistic localization system. Rendered is a set of small arrows.
+- @b "global_plan" - nav_msgs/Path : a path from a planner. Rendered as a line.
+- @b "local_plan" - nav_msgs/Path: local path from a planner. Rendered as a line.
+- @b "robot_footprint" - geometry_msgs/Polygon : Box "footprint" around the robot. Rendered as a dashed line
+- @b "obstacles" - nav_msgs/GridCells : Raw obstacle data. Rendered as points
+- @b "inflated_obstacles" - nav_msgs/GridCells : Inflated obstacle data. Rendered as points
Publishes to (name / type):
-- @b "goal"/PoseStamped : goal for planner. Sent when using the Goal tool
-- @b "initialpose"/Pose2DFloat32 : pose to initialize localization system. Sent when using the Pose tool
+- @b "goal" - geometry_msgs/PoseStamped : goal for planner. Sent when using the Goal tool
+- @b "initialpose" - geometry_msgs/PoseWithCovarianceStamped : pose to initialize localization system. Sent when using the Pose tool
<hr>
@@ -165,11 +167,11 @@
void loadMap();
void clearMap();
void incomingPoseArray(const geometry_msgs::PoseArray::ConstPtr& msg);
- void incomingGuiPath(const visualization_msgs::Polyline::ConstPtr& msg);
- void incomingLocalPath(const visualization_msgs::Polyline::ConstPtr& msg);
- void incomingRobotFootprint(const visualization_msgs::Polyline::ConstPtr& msg);
- void incomingInflatedObstacles(const visualization_msgs::Polyline::ConstPtr& msg);
- void incomingRawObstacles(const visualization_msgs::Polyline::ConstPtr& msg);
+ void incomingGuiPath(const nav_msgs::Path::ConstPtr& msg);
+ void incomingLocalPath(const nav_msgs::Path::ConstPtr& msg);
+ void incomingRobotFootprint(const geometry_msgs::PolygonStamped::ConstPtr& msg);
+ void incomingInflatedObstacles(const nav_msgs::GridCells::ConstPtr& msg);
+ void incomingRawObstacles(const nav_msgs::GridCells::ConstPtr& msg);
void incomingGuiLaser(const visualization_msgs::Polyline::ConstPtr& msg);
void onRenderWindowMouseEvents( wxMouseEvent& event );
@@ -177,7 +179,10 @@
void createRadiusObject();
void updateRadiusPosition();
- void createObjectFromPolyLine( Ogre::ManualObject*& object, const visualization_msgs::Polyline& path, Ogre::RenderOperation::OperationType op, float depth, bool loop );
+ void createObjectFromPolyLine(Ogre::ManualObject*& object, const visualization_msgs::Polyline& path, Ogre::RenderOperation::OperationType op, float depth, bool loop);
+ void createObjectFromPath(Ogre::ManualObject*& object, const nav_msgs::Path& path, const Ogre::ColourValue& color, float depth);
+ void createObjectFromPolygon(Ogre::ManualObject*& object, const geometry_msgs::PolygonStamped& polygon, const Ogre::ColourValue& color, float depth);
+ void createObjectFromGridCells(Ogre::ManualObject*& object, const nav_msgs::GridCells& cells, const Ogre::ColourValue& color, float depth);
void createTransientObject();
@@ -198,26 +203,30 @@
typedef tf::MessageFilter<visualization_msgs::Polyline> PolylineFilter;
typedef boost::shared_ptr<PolylineFilter> PolylineFilterPtr;
- message_filters::Subscriber<visualization_msgs::Polyline> gui_path_sub_;
- PolylineFilterPtr gui_path_filter_;
- message_filters::Subscriber<visualization_msgs::Polyline> local_path_sub_;
- PolylineFilterPtr local_path_filter_;
- message_filters::Subscriber<visualization_msgs::Polyline> robot_footprint_sub_;
- PolylineFilterPtr robot_footprint_filter_;
- message_filters::Subscriber<visualization_msgs::Polyline> inflated_obs_sub_;
- PolylineFilterPtr inflated_obs_filter_;
- message_filters::Subscriber<visualization_msgs::Polyline> raw_obs_sub_;
- PolylineFilterPtr raw_obs_filter_;
- message_filters::Subscriber<visualization_msgs::Polyline> gui_laser_sub_;
- PolylineFilterPtr gui_laser_filter_;
+ typedef tf::MessageFilter<nav_msgs::Path> PathFilter;
+ typedef boost::shared_ptr<PathFilter> PathFilterPtr;
+ typedef tf::MessageFilter<nav_msgs::GridCells> GridCellsFilter;
+ typedef boost::shared_ptr<GridCellsFilter> GridCellsFilterPtr;
+ typedef tf::MessageFilter<geometry_msgs::PolygonStamped> PolygonFilter;
+ typedef boost::shared_ptr<PolygonFilter> PolygonFilterPtr;
+ message_filters::Subscriber<nav_msgs::Path> global_plan_sub_;
+ PathFilterPtr global_plan_filter_;
+ message_filters::Subscriber<nav_msgs::Path> local_plan_sub_;
+ PathFilterPtr local_plan_filter_;
+ message_filters::Subscriber<geometry_msgs::PolygonStamped> robot_footprint_sub_;
+ PolygonFilterPtr robot_footprint_filter_;
+ message_filters::Subscriber<nav_msgs::GridCells> inflated_obs_sub_;
+ GridCellsFilterPtr inflated_obs_filter_;
+ message_filters::Subscriber<nav_msgs::GridCells> raw_obs_sub_;
+ GridCellsFilterPtr raw_obs_filter_;
Ogre::ManualObject* map_object_;
Ogre::MaterialPtr map_material_;
Ogre::ManualObject* cloud_object_;
Ogre::ManualObject* radius_object_;
- Ogre::ManualObject* path_line_object_;
- Ogre::ManualObject* local_path_object_;
+ Ogre::ManualObject* global_plan_object_;
+ Ogre::ManualObject* local_plan_object_;
Ogre::ManualObject* footprint_object_;
Ogre::ManualObject* inflated_obstacles_object_;
Ogre::ManualObject* raw_obstacles_object_;
Modified: pkg/trunk/stacks/visualization/rviz/CMakeLists.txt
===================================================================
--- pkg/trunk/stacks/visualization/rviz/CMakeLists.txt 2009-08-12 18:42:45 UTC (rev 21671)
+++ pkg/trunk/stacks/visualization/rviz/CMakeLists.txt 2009-08-12 18:55:19 UTC (rev 21672)
@@ -71,7 +71,6 @@
src/rviz/displays/robot_model_display.h
src/rviz/displays/robot_base2d_pose_display.h
src/rviz/displays/particle_cloud_2d_display.h
- src/rviz/displays/poly_line_2d_display.h
src/rviz/displays/map_display.h
src/rviz/displays/tf_display.h
src/rviz/displays/camera_display.h
@@ -120,7 +119,9 @@
src/rviz/displays/planning_display.cpp
src/rviz/displays/robot_base2d_pose_display.cpp
src/rviz/displays/particle_cloud_2d_display.cpp
- src/rviz/displays/poly_line_2d_display.cpp
+ src/rviz/displays/path_display.cpp
+ src/rviz/displays/polygon_display.cpp
+ src/rviz/displays/grid_cells_display.cpp
src/rviz/displays/polygonal_map_display.cpp
src/rviz/displays/collision_map_display.cpp
src/rviz/displays/map_display.cpp
Copied: pkg/trunk/stacks/visualization/rviz/src/rviz/displays/grid_cells_display.cpp (from rev 21616, pkg/trunk/stacks/visualization/rviz/src/rviz/displays/poly_line_2d_display.cpp)
===================================================================
--- pkg/trunk/stacks/visualization/rviz/src/rviz/displays/grid_cells_display.cpp (rev 0)
+++ pkg/trunk/stacks/visualization/rviz/src/rviz/displays/grid_cells_display.cpp 2009-08-12 18:55:19 UTC (rev 21672)
@@ -0,0 +1,264 @@
+/*
+ * 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, 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 "grid_cells_display.h"
+#include "visualization_manager.h"
+#include "properties/property.h"
+#include "properties/property_manager.h"
+#include "common.h"
+
+#include "ogre_tools/arrow.h"
+
+#include <tf/transform_listener.h>
+
+#include <boost/bind.hpp>
+
+#include <OGRE/OgreSceneNode.h>
+#include <OGRE/OgreSceneManager.h>
+#include <OGRE/OgreManualObject.h>
+#include <OGRE/OgreBillboardSet.h>
+
+#include <ogre_tools/point_cloud.h>
+
+namespace rviz
+{
+
+GridCellsDisplay::GridCellsDisplay( const std::string& name, VisualizationManager* manager )
+: Display( name, manager )
+, color_( 0.1f, 1.0f, 0.0f )
+, tf_filter_(*manager->getTFClient(), "", 10, update_nh_)
+{
+ scene_node_ = scene_manager_->getRootSceneNode()->createChildSceneNode();
+
+ static int count = 0;
+ std::stringstream ss;
+ ss << "PolyLine" << count++;
+
+ cloud_ = new ogre_tools::PointCloud();
+ cloud_->setRenderMode( ogre_tools::PointCloud::RM_BILLBOARDS_COMMON_FACING );
+ cloud_->setCommonDirection( Ogre::Vector3::UNIT_Y );
+ cloud_->setCommonUpVector( Ogre::Vector3::NEGATIVE_UNIT_Z );
+ scene_node_->attachObject(cloud_);
+ setAlpha( 1.0f );
+
+ tf_filter_.connectInput(sub_);
+ tf_filter_.registerCallback(boost::bind(&GridCellsDisplay::incomingMessage, this, _1));
+}
+
+GridCellsDisplay::~GridCellsDisplay()
+{
+ unsubscribe();
+ clear();
+
+ scene_manager_->destroySceneNode(scene_node_->getName());
+ delete cloud_;
+}
+
+void GridCellsDisplay::clear()
+{
+ cloud_->clear();
+}
+
+void GridCellsDisplay::setTopic( const std::string& topic )
+{
+ unsubscribe();
+
+ topic_ = topic;
+
+ subscribe();
+
+ propertyChanged(topic_property_);
+
+ causeRender();
+}
+
+void GridCellsDisplay::setColor( const Color& color )
+{
+ color_ = color;
+
+ propertyChanged(color_property_);
+
+ processMessage(current_message_);
+ causeRender();
+}
+
+void GridCellsDisplay::setAlpha( float alpha )
+{
+ alpha_ = alpha;
+
+ cloud_->setAlpha( alpha );
+
+ propertyChanged(alpha_property_);
+
+ processMessage(current_message_);
+ causeRender();
+}
+
+void GridCellsDisplay::subscribe()
+{
+ if ( !isEnabled() )
+ {
+ return;
+ }
+
+ sub_.subscribe(update_nh_, topic_, 10);
+}
+
+void GridCellsDisplay::unsubscribe()
+{
+ sub_.unsubscribe();
+}
+
+void GridCellsDisplay::onEnable()
+{
+ scene_node_->setVisible( true );
+ subscribe();
+}
+
+void GridCellsDisplay::onDisable()
+{
+ unsubscribe();
+ clear();
+ scene_node_->setVisible( false );
+}
+
+void GridCellsDisplay::fixedFrameChanged()
+{
+ clear();
+
+ tf_filter_.setTargetFrame( fixed_frame_ );
+}
+
+void GridCellsDisplay::update(float wall_dt, float ros_dt)
+{
+}
+
+void GridCellsDisplay::processMessage(const nav_msgs::GridCells::ConstPtr& msg)
+{
+ if (!msg)
+ {
+ return;
+ }
+
+ clear();
+
+ std::string frame_id = msg->header.frame_id;
+ if (frame_id.empty())
+ {
+ frame_id = "/map";
+ }
+
+ tf::Stamped<tf::Pose> pose( btTransform( btQuaternion( 0.0f, 0.0f, 0.0f ), btVector3( 0.0f, 0.0f, 0.0f ) ),
+ ros::Time(), frame_id);
+
+ if (vis_manager_->getTFClient()->canTransform(fixed_frame_, frame_id, ros::Time()))
+ {
+ try
+ {
+ vis_manager_->getTFClient()->transformPose( fixed_frame_, pose, pose );
+ }
+ catch(tf::TransformException& e)
+ {
+ ROS_ERROR( "Error transforming from frame 'map' to frame '%s'", fixed_frame_.c_str() );
+ }
+ }
+
+ Ogre::Vector3 position = Ogre::Vector3( pose.getOrigin().x(), pose.getOrigin().y(), pose.getOrigin().z() );
+ robotToOgre( position );
+
+ btQuaternion quat;
+ pose.getBasis().getRotation( quat );
+ Ogre::Quaternion orientation( Ogre::Quaternion::IDENTITY );
+ ogreToRobot( orientation );
+ orientation = Ogre::Quaternion( quat.w(), quat.x(), quat.y(), quat.z() ) * orientation;
+ robotToOgre( orientation );
+
+ scene_node_->setPosition( position );
+ scene_node_->setOrientation( orientation );
+
+ Ogre::ColourValue color( color_.r_, color_.g_, color_.b_, alpha_ );
+
+ cloud_->setDimensions(msg->cell_width, msg->cell_height, 0.0);
+
+ uint32_t num_points = msg->cells.size();
+
+ typedef std::vector< ogre_tools::PointCloud::Point > V_Point;
+ V_Point points;
+ points.resize( num_points );
+ for(uint32_t i = 0; i < num_points; i++)
+ {
+ ogre_tools::PointCloud::Point& current_point = points[ i ];
+
+ Ogre::Vector3 pos(msg->cells[i].x, msg->cells[i].y, msg->cells[i].z);
+ robotToOgre(pos);
+
+ current_point.x = pos.x;
+ current_point.y = pos.y;
+ current_point.z = pos.z;
+ current_point.setColor(color.r, color.g, color.b);
+ }
+
+ cloud_->clear();
+
+ if ( !points.empty() )
+ {
+ cloud_->addPoints( &points.front(), points.size() );
+ }
+}
+
+void GridCellsDisplay::incomingMessage(const nav_msgs::GridCells::ConstPtr& msg)
+{
+ processMessage(msg);
+}
+
+void GridCellsDisplay::reset()
+{
+ clear();
+}
+
+void GridCellsDisplay::createProperties()
+{
+ color_property_ = property_manager_->createProperty<ColorProperty>( "Color", property_prefix_, boost::bind( &GridCellsDisplay::getColor, this ),
+ boost::bind( &GridCellsDisplay::setColor, this, _1 ), category_, this );
+ alpha_property_ = property_manager_->createProperty<FloatProperty>( "Alpha", property_prefix_, boost::bind( &GridCellsDisplay::getAlpha, this ),
+ boost::bind( &GridCellsDisplay::setAlpha, this, _1 ), category_, this );
+
+ topic_property_ = property_manager_->createProperty<ROSTopicStringProperty>( "Topic", property_prefix_, boost::bind( &GridCellsDisplay::getTopic, this ),
+ boost::bind( &GridCellsDisplay::setTopic, this, _1 ), category_, this );
+ ROSTopicStringPropertyPtr topic_prop = topic_property_.lock();
+ topic_prop->setMessageType(nav_msgs::GridCells::__s_getDataType());
+}
+
+const char* GridCellsDisplay::getDescription()
+{
+ return "Displays data from a nav_msgs::GridCells message as either points or lines.";
+}
+
...
[truncated message content] |
|
From: <ei...@us...> - 2009-08-12 20:32:50
|
Revision: 21700
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21700&view=rev
Author: eitanme
Date: 2009-08-12 20:32:42 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
Working towards removing Polyline for good. Updated all navigation stack related files to work with the new types
Modified Paths:
--------------
pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/nav_view/nav_view_move_base.launch
pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/nav_view/nav_view_move_base_local.launch
pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/rviz/move_base.vcg
pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/rviz/move_base_local.vcg
pkg/trunk/highlevel/move_base_stage/move_base/nav_view.xml
pkg/trunk/highlevel/move_base_stage/move_base_multi_robot.launch
pkg/trunk/nav/wavefront/src/wavefront_node.cpp
pkg/trunk/stacks/navigation/base_local_planner/include/base_local_planner/trajectory_planner_ros.h
pkg/trunk/stacks/navigation/base_local_planner/src/trajectory_planner_ros.cpp
pkg/trunk/stacks/navigation/costmap_2d/include/costmap_2d/costmap_2d_publisher.h
pkg/trunk/stacks/navigation/costmap_2d/src/costmap_2d_publisher.cpp
pkg/trunk/stacks/navigation/navfn/include/navfn/navfn_ros.h
pkg/trunk/stacks/navigation/navfn/src/navfn_ros.cpp
Removed Paths:
-------------
pkg/trunk/stacks/navigation/costmap_2d/src/costmap_test.cpp
Modified: pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/nav_view/nav_view_move_base.launch
===================================================================
--- pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/nav_view/nav_view_move_base.launch 2009-08-12 20:29:45 UTC (rev 21699)
+++ pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/nav_view/nav_view_move_base.launch 2009-08-12 20:32:42 UTC (rev 21700)
@@ -2,10 +2,10 @@
<master auto="start"/>
<node pkg="nav_view" type="nav_view" respawn="false">
<remap from="goal" to="/move_base/activate" />
- <remap from="raw_obstacles" to="/move_base/local_costmap/raw_obstacles" />
+ <remap from="obstacles" to="/move_base/local_costmap/obstacles" />
<remap from="inflated_obstacles" to="/move_base/local_costmap/inflated_obstacles" />
- <remap from="gui_path" to="/move_base/NavfnROS/plan" />
- <remap from="local_path" to="/move_base/TrajectoryPlannerROS/local_plan" />
+ <remap from="global_plan" to="/move_base/NavfnROS/plan" />
+ <remap from="local_plan" to="/move_base/TrajectoryPlannerROS/local_plan" />
<remap from="robot_footprint" to="/move_base/TrajectoryPlannerROS/robot_footprint"/>
</node>
</launch>
Modified: pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/nav_view/nav_view_move_base_local.launch
===================================================================
--- pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/nav_view/nav_view_move_base_local.launch 2009-08-12 20:29:45 UTC (rev 21699)
+++ pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/nav_view/nav_view_move_base_local.launch 2009-08-12 20:32:42 UTC (rev 21700)
@@ -2,10 +2,10 @@
<master auto="start"/>
<node pkg="nav_view" type="nav_view" respawn="false">
<remap from="goal" to="/move_base_local/activate" />
- <remap from="raw_obstacles" to="/move_base_local/local_costmap/raw_obstacles" />
+ <remap from="obstacles" to="/move_base_local/local_costmap/obstacles" />
<remap from="inflated_obstacles" to="/move_base_local/local_costmap/inflated_obstacles" />
- <remap from="gui_path" to="/move_base_local/NavfnROS/plan" />
- <remap from="local_path" to="/move_base_local/TrajectoryPlannerROS/local_plan" />
+ <remap from="global_plan" to="/move_base_local/NavfnROS/plan" />
+ <remap from="local_plan" to="/move_base_local/TrajectoryPlannerROS/local_plan" />
<remap from="robot_footprint" to="/move_base_local/TrajectoryPlannerROS/robot_footprint"/>
</node>
</launch>
Modified: pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/rviz/move_base.vcg
===================================================================
--- pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/rviz/move_base.vcg 2009-08-12 20:29:45 UTC (rev 21699)
+++ pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/rviz/move_base.vcg 2009-08-12 20:32:42 UTC (rev 21700)
@@ -57,15 +57,11 @@
Floor\ Scan.Style=1
Floor\ Scan.Topic=/base_scan_throttled
Global\ Plan.Alpha=1
-Global\ Plan.ColorR=0.1
+Global\ Plan.ColorR=0
Global\ Plan.ColorG=1
Global\ Plan.ColorB=0
Global\ Plan.Enabled=1
-Global\ Plan.Loop=0
-Global\ Plan.Override\ Color=0
-Global\ Plan.Render\ Operation=0
Global\ Plan.Topic=/move_base/TrajectoryPlannerROS/global_plan
-Global\ Plan.Z\ Position=0
Grid.Alpha=0.5
Grid.Cell\ Size=1
Grid.ColorR=0.5
@@ -98,25 +94,17 @@
Head\ Scan.Style=1
Head\ Scan.Topic=/tilt_scan
Inflated\ Obstacles.Alpha=1
-Inflated\ Obstacles.ColorR=0.1
-Inflated\ Obstacles.ColorG=1
-Inflated\ Obstacles.ColorB=0
+Inflated\ Obstacles.ColorR=0
+Inflated\ Obstacles.ColorG=0
+Inflated\ Obstacles.ColorB=1
Inflated\ Obstacles.Enabled=1
-Inflated\ Obstacles.Loop=0
-Inflated\ Obstacles.Override\ Color=0
-Inflated\ Obstacles.Render\ Operation=1
Inflated\ Obstacles.Topic=/move_base/local_costmap/inflated_obstacles
-Inflated\ Obstacles.Z\ Position=0
Local\ Plan.Alpha=1
-Local\ Plan.ColorR=0.1
-Local\ Plan.ColorG=1
-Local\ Plan.ColorB=0
+Local\ Plan.ColorR=0
+Local\ Plan.ColorG=0
+Local\ Plan.ColorB=1
Local\ Plan.Enabled=1
-Local\ Plan.Loop=0
-Local\ Plan.Override\ Color=0
-Local\ Plan.Render\ Operation=0
Local\ Plan.Topic=/move_base/TrajectoryPlannerROS/local_plan
-Local\ Plan.Z\ Position=0
Map.Alpha=0.7
Map.Enabled=1
Map.Request\ Frequency=0
@@ -138,39 +126,27 @@
New\ Ground\ Plane\ Cloud.Selectable=1
New\ Ground\ Plane\ Cloud.Style=1
New\ Ground\ Plane\ Cloud.Topic=/ground_object_cloud
+Obstacles.Alpha=1
+Obstacles.ColorR=1
+Obstacles.ColorG=0
+Obstacles.ColorB=0
+Obstacles.Enabled=1
+Obstacles.Topic=/move_base/local_costmap/obstacles
Origin\ Axes.Enabled=0
Origin\ Axes.Length=1
Origin\ Axes.Radius=0.1
Planner\ Plan.Alpha=1
-Planner\ Plan.ColorR=1
-Planner\ Plan.ColorG=0.572549
+Planner\ Plan.ColorR=0
+Planner\ Plan.ColorG=1
Planner\ Plan.ColorB=0
Planner\ Plan.Enabled=1
-Planner\ Plan.Loop=0
-Planner\ Plan.Override\ Color=1
-Planner\ Plan.Render\ Operation=0
Planner\ Plan.Topic=/move_base/NavfnROS/plan
-Planner\ Plan.Z\ Position=0
-Raw\ Obstacles.Alpha=1
-Raw\ Obstacles.ColorR=0.1
-Raw\ Obstacles.ColorG=1
-Raw\ Obstacles.ColorB=0
-Raw\ Obstacles.Enabled=1
-Raw\ Obstacles.Loop=0
-Raw\ Obstacles.Override\ Color=0
-Raw\ Obstacles.Render\ Operation=1
-Raw\ Obstacles.Topic=/move_base/local_costmap/raw_obstacles
-Raw\ Obstacles.Z\ Position=0
Robot\ Footprint.Alpha=1
-Robot\ Footprint.ColorR=0.1
-Robot\ Footprint.ColorG=1
+Robot\ Footprint.ColorR=1
+Robot\ Footprint.ColorG=0
Robot\ Footprint.ColorB=0
Robot\ Footprint.Enabled=1
-Robot\ Footprint.Loop=0
-Robot\ Footprint.Override\ Color=0
-Robot\ Footprint.Render\ Operation=0
Robot\ Footprint.Topic=/move_base/TrajectoryPlannerROS/robot_footprint
-Robot\ Footprint.Z\ Position=0
Robot\ Model.Alpha=0.5
Robot\ Model.Collision\ Enabled=0
Robot\ Model.Enabled=1
@@ -178,118 +154,6 @@
Robot\ Model.Robot\ Description=robot_description
Robot\ Model.Update\ Rate=0.1
Robot\ Model.Visual\ Enabled=1
-Robot\:\ Robot\ Model\ Link\ base_laserShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ base_laserShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ base_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ base_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_l_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_l_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_r_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_r_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_rotation_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_rotation_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ br_caster_l_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ br_caster_l_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ br_caster_r_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ br_caster_r_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ br_caster_rotation_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ br_caster_rotation_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_l_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_l_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_r_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_r_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_rotation_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_rotation_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_l_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_l_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_r_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_r_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_rotation_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_rotation_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ head_pan_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ head_pan_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ head_plate_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ head_plate_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ head_tilt_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ head_tilt_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ high_def_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ high_def_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ high_def_optical_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ high_def_optical_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_elbow_flex_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_elbow_flex_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_forearm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_forearm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_forearm_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_forearm_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_l_finger_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_l_finger_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_l_finger_tip_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_l_finger_tip_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_palm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_palm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_r_finger_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_r_finger_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_r_finger_tip_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_r_finger_tip_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_tool_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_tool_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_shoulder_lift_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_shoulder_lift_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_shoulder_pan_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_shoulder_pan_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_upper_arm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_upper_arm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_upper_arm_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_upper_arm_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_wrist_flex_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_wrist_flex_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_wrist_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_wrist_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ laser_tilt_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ laser_tilt_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ laser_tilt_mount_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ laser_tilt_mount_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_elbow_flex_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_elbow_flex_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_forearm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_forearm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_forearm_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_forearm_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_l_finger_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_l_finger_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_l_finger_tip_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_l_finger_tip_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_palm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_palm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_r_finger_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_r_finger_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_r_finger_tip_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_r_finger_tip_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_tool_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_tool_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_shoulder_lift_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_shoulder_lift_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_shoulder_pan_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_shoulder_pan_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_upper_arm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_upper_arm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_upper_arm_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_upper_arm_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_wrist_flex_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_wrist_flex_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_wrist_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_wrist_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ stereo_l_stereo_camera_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ stereo_l_stereo_camera_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ stereo_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ stereo_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ stereo_optical_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ stereo_optical_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ stereo_r_stereo_camera_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ stereo_r_stereo_camera_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ torso_lift_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ torso_lift_linkShow\ Trail=0
Stereo\ Cloud.Alpha=1
Stereo\ Cloud.Autocompute\ Intensity\ Bounds=1
Stereo\ Cloud.Billboard\ Size=0.01
@@ -315,8 +179,8 @@
Transforms.Update\ Rate=1
Visualization\ Markers.Enabled=1
Camera\ Type=Orbit
-Camera\ Config=0.510797 1.5408 17.9393 -25.91 2.90947 -25.9677
-Property\ Grid\ State=selection=FilteredTiltCloud.Enabled;expanded=.Global Options,Visualization Markers,Robot Model,Map,Head Scan,Floor Scan,Transforms.Frames,Transforms.Tree,FilteredTiltCloud,New Ground Plane Cloud,AMCL Cloud,Raw Obstacles,Inflated Obstacles,Robot Footprint,Local Plan,Global Plan,Planner Plan;scrollpos=0,88;splitterpos=248,483;ispageselected=1
+Camera\ Config=0.001 1.5758 20.1811 -29.0894 -3.0576 -20.589
+Property\ Grid\ State=selection=Planner Plan.Color;expanded=.Global Options,Visualization Markers,Robot Model,Map,Head Scan,Floor Scan,Transforms.Frames,Transforms.Tree,FilteredTiltCloud,New Ground Plane Cloud,AMCL Cloud,Obstacles,Inflated Obstacles,Robot Footprint,Global Plan,Local Plan,Planner Plan;scrollpos=0,64;splitterpos=249,485;ispageselected=1
[Display0]
Type=Grid
Name=Grid
@@ -360,20 +224,20 @@
Type=ParticleCloud
Name=AMCL Cloud
[Display14]
-Type=PolyLine
-Name=Raw Obstacles
+Type=GridCells
+Name=Obstacles
[Display15]
-Type=PolyLine
+Type=GridCells
Name=Inflated Obstacles
[Display16]
-Type=PolyLine
+Type=Polygon
Name=Robot Footprint
[Display17]
-Type=PolyLine
-Name=Local Plan
-[Display18]
-Type=PolyLine
+Type=Path
Name=Global Plan
+[Display18]
+Type=Path
+Name=Local Plan
[Display19]
-Type=PolyLine
+Type=Path
Name=Planner Plan
Modified: pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/rviz/move_base_local.vcg
===================================================================
--- pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/rviz/move_base_local.vcg 2009-08-12 20:29:45 UTC (rev 21699)
+++ pkg/trunk/applications/2dnav_pr2_app/2dnav_pr2/rviz/move_base_local.vcg 2009-08-12 20:32:42 UTC (rev 21700)
@@ -1,8 +1,8 @@
Background\ ColorR=0
Background\ ColorG=0
Background\ ColorB=0
-Fixed\ Frame=/odom_combined
-Target\ Frame=/odom_combined
+Fixed\ Frame=/map
+Target\ Frame=/map
2D\ Pose\:\ Localized.Angle\ Tolerance=0.1
2D\ Pose\:\ Localized.ColorR=0
2D\ Pose\:\ Localized.ColorG=0.1
@@ -31,11 +31,11 @@
FilteredTiltCloud.Max\ ColorR=0.980392
FilteredTiltCloud.Max\ ColorG=0.721569
FilteredTiltCloud.Max\ ColorB=0.235294
-FilteredTiltCloud.Max\ Intensity=2533
+FilteredTiltCloud.Max\ Intensity=2000.01
FilteredTiltCloud.Min\ ColorR=0.988235
FilteredTiltCloud.Min\ ColorG=0.643137
FilteredTiltCloud.Min\ ColorB=0.156863
-FilteredTiltCloud.Min\ Intensity=0
+FilteredTiltCloud.Min\ Intensity=1999.99
FilteredTiltCloud.Selectable=1
FilteredTiltCloud.Style=1
FilteredTiltCloud.Topic=/tilt_scan_filtered
@@ -57,15 +57,11 @@
Floor\ Scan.Style=1
Floor\ Scan.Topic=/base_scan_throttled
Global\ Plan.Alpha=1
-Global\ Plan.ColorR=0.1
+Global\ Plan.ColorR=0
Global\ Plan.ColorG=1
Global\ Plan.ColorB=0
Global\ Plan.Enabled=1
-Global\ Plan.Loop=0
-Global\ Plan.Override\ Color=0
-Global\ Plan.Render\ Operation=0
Global\ Plan.Topic=/move_base_local/TrajectoryPlannerROS/global_plan
-Global\ Plan.Z\ Position=0
Grid.Alpha=0.5
Grid.Cell\ Size=1
Grid.ColorR=0.5
@@ -85,38 +81,30 @@
Head\ Scan.Billboard\ Size=0.01
Head\ Scan.Channel=0
Head\ Scan.Decay\ Time=2
-Head\ Scan.Enabled=1
+Head\ Scan.Enabled=0
Head\ Scan.Max\ ColorR=1
Head\ Scan.Max\ ColorG=0
Head\ Scan.Max\ ColorB=0.901961
-Head\ Scan.Max\ Intensity=2000.01
+Head\ Scan.Max\ Intensity=4096
Head\ Scan.Min\ ColorR=0.972549
Head\ Scan.Min\ ColorG=0
Head\ Scan.Min\ ColorB=0.870588
-Head\ Scan.Min\ Intensity=101
+Head\ Scan.Min\ Intensity=115
Head\ Scan.Selectable=1
Head\ Scan.Style=1
Head\ Scan.Topic=/tilt_scan
Inflated\ Obstacles.Alpha=1
-Inflated\ Obstacles.ColorR=0.1
-Inflated\ Obstacles.ColorG=1
-Inflated\ Obstacles.ColorB=0
+Inflated\ Obstacles.ColorR=0
+Inflated\ Obstacles.ColorG=0
+Inflated\ Obstacles.ColorB=1
Inflated\ Obstacles.Enabled=1
-Inflated\ Obstacles.Loop=0
-Inflated\ Obstacles.Override\ Color=0
-Inflated\ Obstacles.Render\ Operation=1
Inflated\ Obstacles.Topic=/move_base_local/local_costmap/inflated_obstacles
-Inflated\ Obstacles.Z\ Position=0
Local\ Plan.Alpha=1
-Local\ Plan.ColorR=0.1
-Local\ Plan.ColorG=1
-Local\ Plan.ColorB=0
+Local\ Plan.ColorR=0
+Local\ Plan.ColorG=0
+Local\ Plan.ColorB=1
Local\ Plan.Enabled=1
-Local\ Plan.Loop=0
-Local\ Plan.Override\ Color=0
-Local\ Plan.Render\ Operation=0
Local\ Plan.Topic=/move_base_local/TrajectoryPlannerROS/local_plan
-Local\ Plan.Z\ Position=0
Map.Alpha=0.7
Map.Enabled=1
Map.Request\ Frequency=0
@@ -126,170 +114,46 @@
New\ Ground\ Plane\ Cloud.Billboard\ Size=0.05
New\ Ground\ Plane\ Cloud.Channel=0
New\ Ground\ Plane\ Cloud.Decay\ Time=3
-New\ Ground\ Plane\ Cloud.Enabled=1
+New\ Ground\ Plane\ Cloud.Enabled=0
New\ Ground\ Plane\ Cloud.Max\ ColorR=0.0313726
New\ Ground\ Plane\ Cloud.Max\ ColorG=0.952941
New\ Ground\ Plane\ Cloud.Max\ ColorB=1
-New\ Ground\ Plane\ Cloud.Max\ Intensity=-999999
+New\ Ground\ Plane\ Cloud.Max\ Intensity=1784
New\ Ground\ Plane\ Cloud.Min\ ColorR=0
New\ Ground\ Plane\ Cloud.Min\ ColorG=0
New\ Ground\ Plane\ Cloud.Min\ ColorB=0
-New\ Ground\ Plane\ Cloud.Min\ Intensity=-999999
+New\ Ground\ Plane\ Cloud.Min\ Intensity=1539
New\ Ground\ Plane\ Cloud.Selectable=1
New\ Ground\ Plane\ Cloud.Style=1
New\ Ground\ Plane\ Cloud.Topic=/ground_object_cloud
+Obstacles.Alpha=1
+Obstacles.ColorR=1
+Obstacles.ColorG=0
+Obstacles.ColorB=0
+Obstacles.Enabled=1
+Obstacles.Topic=/move_base_local/local_costmap/obstacles
Origin\ Axes.Enabled=0
Origin\ Axes.Length=1
Origin\ Axes.Radius=0.1
Planner\ Plan.Alpha=1
-Planner\ Plan.ColorR=0.1
+Planner\ Plan.ColorR=0
Planner\ Plan.ColorG=1
Planner\ Plan.ColorB=0
-Planner\ Plan.Enabled=0
-Planner\ Plan.Loop=0
-Planner\ Plan.Override\ Color=0
-Planner\ Plan.Render\ Operation=0
+Planner\ Plan.Enabled=1
Planner\ Plan.Topic=/move_base_local/NavfnROS/plan
-Planner\ Plan.Z\ Position=0
-Raw\ Obstacles.Alpha=1
-Raw\ Obstacles.ColorR=0.1
-Raw\ Obstacles.ColorG=1
-Raw\ Obstacles.ColorB=0
-Raw\ Obstacles.Enabled=1
-Raw\ Obstacles.Loop=0
-Raw\ Obstacles.Override\ Color=0
-Raw\ Obstacles.Render\ Operation=1
-Raw\ Obstacles.Topic=/move_base_local/local_costmap/raw_obstacles
-Raw\ Obstacles.Z\ Position=0
Robot\ Footprint.Alpha=1
-Robot\ Footprint.ColorR=0.1
-Robot\ Footprint.ColorG=1
+Robot\ Footprint.ColorR=1
+Robot\ Footprint.ColorG=0
Robot\ Footprint.ColorB=0
Robot\ Footprint.Enabled=1
-Robot\ Footprint.Loop=0
-Robot\ Footprint.Override\ Color=0
-Robot\ Footprint.Render\ Operation=0
Robot\ Footprint.Topic=/move_base_local/TrajectoryPlannerROS/robot_footprint
-Robot\ Footprint.Z\ Position=0
-Robot\ Model.Alpha=1
+Robot\ Model.Alpha=0.5
Robot\ Model.Collision\ Enabled=0
Robot\ Model.Enabled=1
-Robot\ Model.Mechanism\ Topic=mechanism_state
+Robot\ Model.Mechanism\ Topic=
Robot\ Model.Robot\ Description=robot_description
Robot\ Model.Update\ Rate=0.1
Robot\ Model.Visual\ Enabled=1
-Robot\:\ Robot\ Model\ Link\ base_laserShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ base_laserShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ base_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ base_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_l_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_l_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_r_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_r_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_rotation_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ bl_caster_rotation_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ br_caster_l_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ br_caster_l_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ br_caster_r_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ br_caster_r_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ br_caster_rotation_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ br_caster_rotation_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_l_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_l_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_r_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_r_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_rotation_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fl_caster_rotation_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_l_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_l_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_r_wheel_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_r_wheel_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_rotation_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ fr_caster_rotation_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ head_pan_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ head_pan_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ head_plate_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ head_plate_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ head_tilt_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ head_tilt_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ high_def_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ high_def_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ high_def_optical_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ high_def_optical_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_elbow_flex_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_elbow_flex_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_forearm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_forearm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_forearm_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_forearm_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_l_finger_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_l_finger_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_l_finger_tip_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_l_finger_tip_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_palm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_palm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_r_finger_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_r_finger_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_r_finger_tip_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_r_finger_tip_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_tool_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_gripper_tool_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_shoulder_lift_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_shoulder_lift_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_shoulder_pan_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_shoulder_pan_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_upper_arm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_upper_arm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_upper_arm_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_upper_arm_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_wrist_flex_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_wrist_flex_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ l_wrist_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ l_wrist_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ laser_tilt_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ laser_tilt_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ laser_tilt_mount_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ laser_tilt_mount_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_elbow_flex_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_elbow_flex_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_forearm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_forearm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_forearm_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_forearm_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_l_finger_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_l_finger_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_l_finger_tip_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_l_finger_tip_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_palm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_palm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_r_finger_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_r_finger_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_r_finger_tip_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_r_finger_tip_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_tool_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_gripper_tool_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_shoulder_lift_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_shoulder_lift_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_shoulder_pan_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_shoulder_pan_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_upper_arm_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_upper_arm_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_upper_arm_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_upper_arm_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_wrist_flex_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_wrist_flex_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ r_wrist_roll_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ r_wrist_roll_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ stereo_l_stereo_camera_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ stereo_l_stereo_camera_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ stereo_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ stereo_linkShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ stereo_optical_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ stereo_optical_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ stereo_r_stereo_camera_frameShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ stereo_r_stereo_camera_frameShow\ Trail=0
-Robot\:\ Robot\ Model\ Link\ torso_lift_linkShow\ Axes=0
-Robot\:\ Robot\ Model\ Link\ torso_lift_linkShow\ Trail=0
Stereo\ Cloud.Alpha=1
Stereo\ Cloud.Autocompute\ Intensity\ Bounds=1
Stereo\ Cloud.Billboard\ Size=0.01
@@ -315,8 +179,8 @@
Transforms.Update\ Rate=1
Visualization\ Markers.Enabled=1
Camera\ Type=Orbit
-Camera\ Config=0.936 1.7208 12.0025 0 0 0
-Property\ Grid\ State=selection=Visualization Markers.Enabled;expanded=.Global Options,Visualization Markers,Robot Model,Map,Head Scan,Floor Scan,Transforms.Frames,Transforms.Tree,FilteredTiltCloud,New Ground Plane Cloud,AMCL Cloud,Raw Obstacles,Inflated Obstacles,Robot Footprint,Local Plan,Global Plan,Planner Plan;scrollpos=0,0;splitterpos=248,483;ispageselected=1
+Camera\ Config=0.001 1.5758 20.1811 -29.0894 -3.0576 -20.589
+Property\ Grid\ State=selection=Local Plan.Alpha;expanded=.Global Options,Visualization Markers,Robot Model,Map,Head Scan,Floor Scan,Transforms.Frames,Transforms.Tree,FilteredTiltCloud,New Ground Plane Cloud,AMCL Cloud,Obstacles,Inflated Obstacles,Robot Footprint,Global Plan,Local Plan,Planner Plan;scrollpos=0,64;splitterpos=249,485;ispageselected=1
[Display0]
Type=Grid
Name=Grid
@@ -360,20 +224,20 @@
Type=ParticleCloud
Name=AMCL Cloud
[Display14]
-Type=PolyLine
-Name=Raw Obstacles
+Type=GridCells
+Name=Obstacles
[Display15]
-Type=PolyLine
+Type=GridCells
Name=Inflated Obstacles
[Display16]
-Type=PolyLine
+Type=Polygon
Name=Robot Footprint
[Display17]
-Type=PolyLine
-Name=Local Plan
-[Display18]
-Type=PolyLine
+Type=Path
Name=Global Plan
+[Display18]
+Type=Path
+Name=Local Plan
[Display19]
-Type=PolyLine
+Type=Path
Name=Planner Plan
Modified: pkg/trunk/highlevel/move_base_stage/move_base/nav_view.xml
===================================================================
--- pkg/trunk/highlevel/move_base_stage/move_base/nav_view.xml 2009-08-12 20:29:45 UTC (rev 21699)
+++ pkg/trunk/highlevel/move_base_stage/move_base/nav_view.xml 2009-08-12 20:32:42 UTC (rev 21700)
@@ -1,10 +1,10 @@
<launch>
<node pkg="nav_view" type="nav_view" respawn="false">
<remap from="...
[truncated message content] |
|
From: <ei...@us...> - 2009-08-12 21:11:57
|
Revision: 21710
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21710&view=rev
Author: eitanme
Date: 2009-08-12 21:11:49 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
Changing topic remappings in some more launch files
Modified Paths:
--------------
pkg/trunk/demos/door_demos/launch/move_base_door.launch
pkg/trunk/demos/milestone2/milestone2_tests/test/move_base.launch
pkg/trunk/motion_planning/planning_research/sbpl_door_planner_action/sbpl_door_action_planner.launch
pkg/trunk/nav/nav_apps/costmap_2d_tutorials/launch_example/costmap.launch
pkg/trunk/stacks/navigation/costmap_2d/include/costmap_2d/costmap_2d_ros.h
Modified: pkg/trunk/demos/door_demos/launch/move_base_door.launch
===================================================================
--- pkg/trunk/demos/door_demos/launch/move_base_door.launch 2009-08-12 21:11:03 UTC (rev 21709)
+++ pkg/trunk/demos/door_demos/launch/move_base_door.launch 2009-08-12 21:11:49 UTC (rev 21710)
@@ -66,7 +66,7 @@
<param name="costmap/cost_scaling_factor" value="1.0" />
<param name="costmap/lethal_cost_threshold" value="100" />
<!-- End Costmap Parameters -->
- <remap from="raw_obstacles" to="~raw_obstacles" />
+ <remap from="obstacles" to="~obstacles" />
<remap from="inflated_obstacles" to="~inflated_obstacles" />
</node>
</group>
Modified: pkg/trunk/demos/milestone2/milestone2_tests/test/move_base.launch
===================================================================
--- pkg/trunk/demos/milestone2/milestone2_tests/test/move_base.launch 2009-08-12 21:11:03 UTC (rev 21709)
+++ pkg/trunk/demos/milestone2/milestone2_tests/test/move_base.launch 2009-08-12 21:11:49 UTC (rev 21710)
@@ -24,10 +24,10 @@
<node pkg="fake_localization" type="fake_localization" respawn="false" />
<node pkg="rviz" type="rviz" respawn="false">
<remap from="goal" to="/move_base/activate" />
- <remap from="raw_obstacles" to="/move_base/base_local_planner/raw_obstacles" />
+ <remap from="obstacles" to="/move_base/base_local_planner/obstacles" />
<remap from="inflated_obstacles" to="/move_base/base_local_planner/inflated_obstacles" />
- <remap from="gui_path" to="/move_base/base_local_planner/global_plan" />
- <remap from="local_path" to="/move_base/base_local_planner/local_plan" />
+ <remap from="global_plan" to="/move_base/base_local_planner/global_plan" />
+ <remap from="local_plan" to="/move_base/base_local_planner/local_plan" />
<remap from="robot_footprint" to="/move_base/base_local_planner/robot_footprint"/>
</node>
</group>
Modified: pkg/trunk/motion_planning/planning_research/sbpl_door_planner_action/sbpl_door_action_planner.launch
===================================================================
--- pkg/trunk/motion_planning/planning_research/sbpl_door_planner_action/sbpl_door_action_planner.launch 2009-08-12 21:11:03 UTC (rev 21709)
+++ pkg/trunk/motion_planning/planning_research/sbpl_door_planner_action/sbpl_door_action_planner.launch 2009-08-12 21:11:49 UTC (rev 21710)
@@ -37,7 +37,7 @@
<param name="costmap/cost_scaling_factor" value="1.0" />
<param name="costmap/lethal_cost_threshold" value="100" />
<!-- End Costmap Parameters -->
- <remap from="raw_obstacles" to="~raw_obstacles" />
+ <remap from="obstacles" to="~obstacles" />
<remap from="inflated_obstacles" to="~inflated_obstacles" />
<!--param name="sbpl_action_file" textfile="$(find mpbench)/data/pr2sides.mprim" /-->
Modified: pkg/trunk/nav/nav_apps/costmap_2d_tutorials/launch_example/costmap.launch
===================================================================
--- pkg/trunk/nav/nav_apps/costmap_2d_tutorials/launch_example/costmap.launch 2009-08-12 21:11:03 UTC (rev 21709)
+++ pkg/trunk/nav/nav_apps/costmap_2d_tutorials/launch_example/costmap.launch 2009-08-12 21:11:49 UTC (rev 21710)
@@ -10,7 +10,7 @@
</node>
<node pkg="fake_localization" type="fake_localization" respawn="false" />
<node pkg="nav_view" type="nav_view" respawn="false">
- <remap from="raw_obstacles" to="/costmap_test/costmap/raw_obstacles" />
+ <remap from="obstacles" to="/costmap_test/costmap/obstacles" />
<remap from="inflated_obstacles" to="/costmap_test/costmap/inflated_obstacles" />
</node>
</launch>
Modified: pkg/trunk/stacks/navigation/costmap_2d/include/costmap_2d/costmap_2d_ros.h
===================================================================
--- pkg/trunk/stacks/navigation/costmap_2d/include/costmap_2d/costmap_2d_ros.h 2009-08-12 21:11:03 UTC (rev 21709)
+++ pkg/trunk/stacks/navigation/costmap_2d/include/costmap_2d/costmap_2d_ros.h 2009-08-12 21:11:49 UTC (rev 21710)
@@ -45,7 +45,6 @@
#include <costmap_2d/observation_buffer.h>
#include <costmap_2d/voxel_costmap_2d.h>
#include <costmap_2d/VoxelGrid.h>
-#include <visualization_msgs/Polyline.h>
#include <map>
#include <vector>
#include <string>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <is...@us...> - 2009-08-12 21:41:32
|
Revision: 21711
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21711&view=rev
Author: isucan
Date: 2009-08-12 21:41:23 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
moved files around, so we can improve the dependency tree
Modified Paths:
--------------
pkg/trunk/mapping/collision_map/CMakeLists.txt
pkg/trunk/mapping/collision_map/src/collision_map_self_occ.cpp
pkg/trunk/motion_planning/ompl/CMakeLists.txt
pkg/trunk/motion_planning/ompl/code/ompl/base/Planner.h
pkg/trunk/motion_planning/ompl/code/ompl/base/SpaceInformation.h
pkg/trunk/motion_planning/ompl/code/ompl/base/src/Planner.cpp
pkg/trunk/motion_planning/ompl/code/ompl/base/src/SpaceInformation.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/dynamic/extension/kpiece/src/KPIECE1.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/dynamic/extension/rrt/src/RRT.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/est/src/EST.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/ik/GAIK.h
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/ik/IKPlanner.h
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/ik/src/GAIK.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/kpiece/src/KPIECE1.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/kpiece/src/LBKPIECE1.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/rrt/pRRT.h
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/rrt/src/LazyRRT.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/rrt/src/RRT.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/rrt/src/pRRT.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/sbl/pSBL.h
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/sbl/src/SBL.cpp
pkg/trunk/motion_planning/ompl/code/ompl/extension/kinematic/extension/sbl/src/pSBL.cpp
pkg/trunk/motion_planning/ompl/code/tests/compile/compile.cpp
pkg/trunk/motion_planning/ompl/code/tests/dynamic/2dmap/2dmap.cpp
pkg/trunk/motion_planning/ompl/code/tests/kinematic/2dmap/2dmap.cpp
pkg/trunk/motion_planning/ompl/manifest.xml
pkg/trunk/motion_planning/ompl_planning/src/motion_planner.cpp
pkg/trunk/motion_planning/planning_environment/include/planning_environment/models/robot_models.h
pkg/trunk/motion_planning/planning_environment/src/models/robot_models.cpp
pkg/trunk/sandbox/3dnav_pr2/launch/perception/laser-perception.launch
pkg/trunk/sandbox/3dnav_pr2/params/collision/collision_checks_both_arms.yaml
pkg/trunk/sandbox/3dnav_pr2/params/collision/collision_checks_left_arm.yaml
pkg/trunk/sandbox/3dnav_pr2/params/collision/collision_checks_right_arm.yaml
pkg/trunk/sandbox/test_arm_vision_calibration/src/test_arm_vision_calibration.cpp
pkg/trunk/stacks/laser_drivers/point_cloud_assembler/mainpage.dox
pkg/trunk/stacks/laser_drivers/point_cloud_assembler/src/merge_clouds.cpp
pkg/trunk/util/robot_self_filter/include/robot_self_filter/self_mask.h
pkg/trunk/util/robot_self_filter/self_filter.launch
pkg/trunk/util/robot_self_filter/src/self_filter.cpp
pkg/trunk/util/robot_self_filter/src/self_mask.cpp
pkg/trunk/util/robot_self_filter/src/test_filter.cpp
Added Paths:
-----------
pkg/trunk/sandbox/3dnav_pr2/launch/perception/components/
pkg/trunk/sandbox/3dnav_pr2/launch/perception/components/collision_map_self_occ.launch
pkg/trunk/sandbox/3dnav_pr2/launch/perception/components/narrow_stereoproc.launch
pkg/trunk/sandbox/3dnav_pr2/launch/perception/components/tilt_laser_self_filter.launch
Removed Paths:
-------------
pkg/trunk/mapping/collision_map/src/collision_map_occ.cpp
pkg/trunk/motion_planning/ompl/code/ompl/base/util/output.h
pkg/trunk/motion_planning/ompl/code/ompl/base/util/src/output.cpp
pkg/trunk/motion_planning/ompl/code/ompl/base/util/src/time.cpp
pkg/trunk/motion_planning/ompl/code/ompl/base/util/time.h
pkg/trunk/sandbox/3dnav_pr2/launch/perception/collision_map_occ.launch
pkg/trunk/sandbox/3dnav_pr2/launch/perception/collision_map_self_occ.launch
pkg/trunk/sandbox/3dnav_pr2/launch/perception/narrow_stereoproc.launch
Modified: pkg/trunk/mapping/collision_map/CMakeLists.txt
===================================================================
--- pkg/trunk/mapping/collision_map/CMakeLists.txt 2009-08-12 21:11:49 UTC (rev 21710)
+++ pkg/trunk/mapping/collision_map/CMakeLists.txt 2009-08-12 21:41:23 UTC (rev 21711)
@@ -79,9 +79,6 @@
rospack_add_executable(collision_map_node src/collision_map.cpp)
rospack_add_executable(collision_map_buffer_node src/collision_map_buffer.cpp)
-rospack_add_executable(collision_map_occ_node src/collision_map_occ.cpp)
-rospack_add_openmp_flags(collision_map_occ_node)
-rospack_link_boost(collision_map_occ_node thread)
rospack_add_executable(collision_map_self_occ_node src/collision_map_self_occ.cpp)
rospack_add_openmp_flags(collision_map_self_occ_node)
Deleted: pkg/trunk/mapping/collision_map/src/collision_map_occ.cpp
===================================================================
--- pkg/trunk/mapping/collision_map/src/collision_map_occ.cpp 2009-08-12 21:11:49 UTC (rev 21710)
+++ pkg/trunk/mapping/collision_map/src/collision_map_occ.cpp 2009-08-12 21:41:23 UTC (rev 21711)
@@ -1,843 +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 <sensor_msgs/PointCloud.h>
-#include <mapping_msgs/CollisionMap.h>
-#include <tf/transform_listener.h>
-#include <tf/message_notifier.h>
-#include <robot_self_filter/self_mask.h>
-#include <boost/thread/mutex.hpp>
-#include <boost/bind.hpp>
-#include <vector>
-#include <algorithm>
-#include <set>
-#include <iterator>
-#include <cstdlib>
-
-class CollisionMapperOcc
-{
-public:
-
- CollisionMapperOcc(void) : sf_(tf_)
- {
- // read ROS params
- loadParams();
-
- // advertise our topics: full map and updates
- cmapPublisher_ = nh_.advertise<mapping_msgs::CollisionMap>("collision_map_occ", 1);
- cmapUpdPublisher_ = nh_.advertise<mapping_msgs::CollisionMap>("collision_map_occ_update", 1);
- if (publishOcclusion_)
- occPublisher_ = nh_.advertise<mapping_msgs::CollisionMap>("collision_map_occ_occlusion", 1);
-
- // create a message notifier (and enable subscription) for both the full map and for the updates
- mnCloud_ = new tf::MessageNotifier<sensor_msgs::PointCloud>(tf_, boost::bind(&CollisionMapperOcc::cloudCallback, this, _1), "cloud_in", "", 1);
- mnCloudIncremental_ = new tf::MessageNotifier<sensor_msgs::PointCloud>(tf_, boost::bind(&CollisionMapperOcc::cloudIncrementalCallback, this, _1), "cloud_incremental_in", "", 1);
-
- // configure the self mask and the message notifier
- std::vector<std::string> frames;
- sf_.getLinkNames(frames);
- if (std::find(frames.begin(), frames.end(), robotFrame_) == frames.end())
- frames.push_back(robotFrame_);
- mnCloud_->setTargetFrame(frames);
- mnCloudIncremental_->setTargetFrame(frames);
- }
-
- ~CollisionMapperOcc(void)
- {
- delete mnCloud_;
- delete mnCloudIncremental_;
- }
-
-private:
-
- struct CollisionPoint
- {
- CollisionPoint(void) {}
- CollisionPoint(int _x, int _y, int _z) : x(_x), y(_y), z(_z) {}
-
- int x, y, z;
-
- ros::Time t;
- };
-
- // define an order on points
- struct CollisionPointOrder
- {
- bool operator()(const CollisionPoint &a, const CollisionPoint &b) const
- {
- if (a.x < b.x)
- return true;
- if (a.x > b.x)
- return false;
- if (a.y < b.y)
- return true;
- if (a.y > b.y)
- return false;
- return a.z < b.z;
- }
- };
-
- int collisionPointDistance(const CollisionPoint &a, const CollisionPoint &b) const
- {
- return std::max(abs(a.x - b.x), std::max(abs(a.y - b.y), abs(a.z - b.z)));
- }
-
- typedef std::set<CollisionPoint, CollisionPointOrder> CMap;
-
- // parameters & precomputed values for the box that represents the collision map
- // around the robot
- struct BoxInfo
- {
- double dimensionX, dimensionY, dimensionZ;
- double originX, originY, originZ;
- double sensorX, sensorY, sensorZ;
- double resolution;
- int radius;
- int sx, sy, sz;
- int minX, minY, minZ;
- int maxX, maxY, maxZ;
- double real_minX, real_minY, real_minZ;
- double real_maxX, real_maxY, real_maxZ;
- ros::Duration keepOccluded;
- };
-
- void loadParams(void)
- {
- // flag that indicates whether obstacles should be added for self occlusion
- nh_.param<bool>("~mark_self_occlusion", markSelfOcclusion_, true);
-
- // a frame that does not move with the robot
- nh_.param<std::string>("~fixed_frame", fixedFrame_, "odom");
-
- // a frame that moves with the robot
- nh_.param<std::string>("~robot_frame", robotFrame_, "base_link");
-
- // bounds of collision map in robot frame
- nh_.param<double>("~dimension_x", bi_.dimensionX, 1.0);
- nh_.param<double>("~dimension_y", bi_.dimensionY, 1.5);
- nh_.param<double>("~dimension_z", bi_.dimensionZ, 2.0);
-
- // origin of collision map in the robot frame
- nh_.param<double>("~origin_x", bi_.originX, 1.1);
- nh_.param<double>("~origin_y", bi_.originY, 0.0);
- nh_.param<double>("~origin_z", bi_.originZ, 0.0);
-
- // sensor origin in robot frame
- nh_.param<double>("~sensor_x", bi_.sensorX, 0.05);
- nh_.param<double>("~sensor_y", bi_.sensorY, 0.0);
- nh_.param<double>("~sensor_z", bi_.sensorZ, 1.0);
-
- // resolution
- nh_.param<double>("~resolution", bi_.resolution, 0.015);
-
- // when occluded obstacles are raytraced, keep boxes from occluded space within a given radius
- nh_.param<int>("~radius", bi_.radius, 1);
-
- // when occluded obstacles are raytraced, keep boxes from occluded space for a max amount of time
- double v;
- nh_.param<double>("~keep_occluded", v, 30.0);
- bi_.keepOccluded = ros::Duration(v);
-
- ROS_INFO("Maintaining occlusion map in frame '%s', with origin at (%f, %f, %f) and dimension (%f, %f, %f), resolution of %f; "
- "sensor is at (%f, %f, %f), fixed fame is '%s', radius for raytraced occlusions is %d.",
- robotFrame_.c_str(), bi_.dimensionX, bi_.dimensionY, bi_.dimensionZ, bi_.originX, bi_.originY, bi_.originZ, bi_.resolution,
- bi_.sensorX, bi_.sensorY, bi_.sensorZ, fixedFrame_.c_str(), bi_.radius);
-
- nh_.param<std::string>("~cloud_annotation", cloud_annotation_, std::string());
- nh_.param<bool>("~publish_occlusion", publishOcclusion_, false);
-
- // compute some useful values
- bi_.sx = (int)(0.5 + (bi_.sensorX - bi_.originX) / bi_.resolution);
- bi_.sy = (int)(0.5 + (bi_.sensorY - bi_.originY) / bi_.resolution);
- bi_.sz = (int)(0.5 + (bi_.sensorZ - bi_.originZ) / bi_.resolution);
-
- bi_.minX = (int)(0.5 + (-bi_.dimensionX - bi_.originX) / bi_.resolution) - 1;
- bi_.maxX = (int)(0.5 + (bi_.dimensionX - bi_.originX) / bi_.resolution) + 1;
-
- bi_.minY = (int)(0.5 + (-bi_.dimensionY - bi_.originY) / bi_.resolution) - 1;
- bi_.maxY = (int)(0.5 + (bi_.dimensionY - bi_.originY) / bi_.resolution) + 1;
-
- bi_.minZ = (int)(0.5 + (-bi_.dimensionZ - bi_.originZ) / bi_.resolution) - 1;
- bi_.maxZ = (int)(0.5 + (bi_.dimensionZ - bi_.originZ) / bi_.resolution) + 1;
-
- bi_.real_minX = -bi_.dimensionX + bi_.originX;
- bi_.real_maxX = bi_.dimensionX + bi_.originX;
- bi_.real_minY = -bi_.dimensionY + bi_.originY;
- bi_.real_maxY = bi_.dimensionY + bi_.originY;
- bi_.real_minZ = -bi_.dimensionZ + bi_.originZ;
- bi_.real_maxZ = bi_.dimensionZ + bi_.originZ;
- }
-
- void keepCMapLatest(CMap &map)
- {
- CMap::iterator it = map.begin();
- while (it != map.end())
- {
- const CollisionPoint &cp = *it;
- if (header_.stamp - cp.t > bi_.keepOccluded)
- {
- CMap::iterator e = it;
- ++it;
- map.erase(e);
- }
- else
- ++it;
- }
- }
-
- void computeCloudMask(const sensor_msgs::PointCloud &cloud, std::vector<int> &mask)
- {
- if (cloud_annotation_.empty())
- sf_.maskContainment(cloud, mask);
- else
- {
- int c = -1;
- for (unsigned int i = 0 ; i < cloud.channels.size() ; ++i)
- if (cloud.channels[i].name == cloud_annotation_)
- {
- c = i;
- break;
- }
- if (c < 0)
- {
- ROS_WARN("Cloud annotation channel '%s' is missing", cloud_annotation_.c_str());
- sf_.maskContainment(cloud, mask);
- }
- else
- {
- ROS_ASSERT(cloud.channels[c].values.size() == cloud.points.size());
- mask.resize(cloud.points.size());
- for (unsigned int i = 0 ; i < mask.size() ; ++i)
- mask[i] = cloud.channels[c].values[i] > 0.0;
- }
- }
- }
-
- void cloudIncrementalCallback(const sensor_msgs::PointCloudConstPtr &cloud)
- {
- if (!mapProcessing_.try_lock())
- return;
-
- ROS_DEBUG("Got pointcloud update that is %f seconds old", (ros::Time::now() - cloud->header.stamp).toSec());
-
- std::vector<int> mask;
- sensor_msgs::PointCloud out;
- ros::WallTime tm = ros::WallTime::now();
-
-#pragma omp parallel sections
- {
-
-#pragma omp section
- {
- // transform the pointcloud to the robot frame
- // since we need the points in this frame (around the robot)
- // to compute the collision map
- tf_.transformPointCloud(robotFrame_, *cloud, out);
- }
-
-#pragma omp section
- {
- // separate the received points into ones on the robot and ones that are obstacles
- // the frame of the cloud does not matter here
- computeCloudMask(*cloud, mask);
- }
- }
-
- CMap obstacles;
- constructCollisionMap(out, mask, 1, obstacles);
- CMap diff;
- set_difference(obstacles.begin(), obstacles.end(), currentMap_.begin(), currentMap_.end(),
- std::inserter(diff, diff.begin()), CollisionPointOrder());
- mapProcessing_.unlock();
- if (!diff.empty())
- publishCollisionMap(diff, out.header, cmapUpdPublisher_);
- }
-
- void cloudCallback(const sensor_msgs::PointCloudConstPtr &cloud)
- {
- ROS_DEBUG("Got pointcloud that is %f seconds old", (ros::Time::now() - cloud->header.stamp).toSec());
-
- mapProcessing_.lock();
-
- std::vector<int> mask;
- sensor_msgs::PointCloud out;
- ros::WallTime tm = ros::WallTime::now();
-
-#pragma omp parallel sections
- {
-
-#pragma omp section
- {
- // transform the pointcloud to the robot frame
- // since we need the points in this frame (around the robot)
- // to compute the collision map
- tf_.transformPointCloud(robotFrame_, *cloud, out);
- }
-
-#pragma omp section
- {
- // separate the received points into ones on the robot and ones that are obstacles
- // the frame of the cloud does not matter here
- computeCloudMask(*cloud, mask);
- }
- }
-
- CMap obstacles;
- CMap self;
-
- // compute collision maps for the points on the robot and points that define obstacles
-#pragma omp parallel sections
- {
-
-#pragma omp section
- {
- constructCollisionMap(out, mask, 1, obstacles);
- }
-#pragma omp section
- {
- constructCollisionMap(out, mask, 0, self);
- }
-#pragma omp section
- {
- // try to transform the previous map (if it exists) to the new frame
- if (!currentMap_.empty())
- if (!transformMap(currentMap_, header_, out.header))
- currentMap_.clear();
- header_ = out.header;
- }
- }
-
- // update map
- updateMap(obstacles, self);
-
- double sec = (ros::WallTime::now() - tm).toSec();
- ROS_INFO("Updated collision map with %d points at %f Hz", currentMap_.size(), 1.0/sec);
-
- publishCollisionMap(currentMap_, header_, cmapPublisher_);
- mapProcessing_.unlock();
- }
-
- void updateMap(CMap &obstacles, CMap &self)
- {
- if (currentMap_.empty())
- {
- // if we have no previous information, the map is simply what we see + we assume space hidden by self is obstructed
- // we ignore points that were previously occluded by robot but are now free due to motion
-
- if (markSelfOcclusion_)
- {
- CMap occ_self;
- CMap dummy;
- findSelfOcclusion(self, occ_self, dummy);
- std::set_union(obstacles.begin(), obstacles.end(),
- occ_self.begin(), occ_self.end(),
- std::inserter(currentMap_, currentMap_.begin()),
- CollisionPointOrder());
- }
- else
- currentMap_ = obstacles;
- }
- else
- {
- CMap diff;
- CMap occ;
-#pragma omp parallel sections
- {
-#pragma omp section
- {
- // this is the set of points that could be occluding information (the new collision map)
- std::set_union(obstacles.begin(), obstacles.end(),
- self.begin(), self.end(),
- std::inserter(occ, occ.begin()),
- CollisionPointOrder());
- }
-#pragma omp section
- {
- // find the points from the old map that are no longer visible
- set_difference(currentMap_.begin(), currentMap_.end(), obstacles.begin(), obstacles.end(),
- std::inserter(diff, diff.begin()), CollisionPointOrder());
- }
- }
-
- // find the points in the previous map that are now occluded (raytracing)
- CMap keep;
- findOcclusionsInMap(diff, occ, keep);
-
- sf_.assumeFrame(header_);
-
-#pragma omp parallel sections
- {
-
-#pragma omp section
- {
- keepCMapLatest(obstacles);
- }
-
-#pragma omp section
- {
- keepCMapLatest(keep);
- }
- }
-
- // the new map is the new set of obstacles + occluded information
- currentMap_.clear();
-
- std::set_union(obstacles.begin(), obstacles.end(),
- keep.begin(), keep.end(),
- std::inserter(currentMap_, currentMap_.begin()),
- CollisionPointOrder());
-
- // this can be used for debugging
- if (publishOcclusion_)
- publishCollisionMap(keep, header_, occPublisher_);
- }
- }
-
- bool transformMap(CMap &map, const roslib::Header &from, const roslib::Header &to)
- {
- if (tf_.canTransform(to.frame_id, to.stamp, from.frame_id, from.stamp, fixedFrame_))
- {
- tf::Stamped<btTransform> transf;
- tf_.lookupTransform(to.frame_id, to.stamp, from.frame_id, from.stamp, fixedFrame_, transf);
-
- // copy data to temporary location
- const int n = map.size();
- std::vector<CollisionPoint> pts(n);
- std::copy(map.begin(), map.end(), pts.begin());
- map.clear();
-
-#pragma omp parallel for
- for (int i = 0 ; i < n ; ++i)
- {
- btVector3 p(((double)pts[i].x - 0.5) * bi_.resolution + bi_.originX,
- ((double)pts[i].y - 0.5) * bi_.resolution + bi_.originY,
- ((double)pts[i].z - 0.5) * bi_.resolution + bi_.originZ);
- p = transf * p;
- if (p.x() > bi_.real_minX && p.x() < bi_.real_maxX && p.y() > bi_.real_minY && p.y() < bi_.real_maxY && p.z() > bi_.real_minZ && p.z() < bi_.real_maxZ)
- {
- CollisionPoint c((int)(0.5 + (p.x() - bi_.originX) / bi_.resolution),
- (int)(0.5 + (p.y() - bi_.originY) / bi_.resolution),
- (int)(0.5 + (p.z() - bi_.originZ) / bi_.resolution));
- c.t = pts[i].t;
-#pragma omp critical
- {
- map.insert(c);
- }
- }
- }
-
- return true;
- }
- else
- {
- ROS_WARN("Unable to transform previous collision map into new frame");
- return false;
- }
- }
-
- void findOcclusionsInMap(const CMap &possiblyOccluded, const CMap &occluding, CMap &keep)
- {
- // OpenMP need an int as the lookup variable, but for set,
- // this is not possible, so we copy to a vector
- int n = possiblyOccluded.size();
- std::vector<CollisionPoint> pts(n);
- std::copy(possiblyOccluded.begin(), possiblyOccluded.end(), pts.begin());
-
- ROS_DEBUG("Raytracing %d cells", n);
-
-#pragma omp parallel for schedule(dynamic)
- for (int i = 0 ; i < n ; ++i)
- {
- // run this function in a visitor pattern (it calls the callback at every cell it finds along the line)
- // we start at a possibly occluded point and go towards the sensor
- // if we hit a point in the occluding set, we have an occluded point. Otherwise, the point was part of a
- // moving obstacle so we ignore it
- int result = 0;
- int state = -1;
- bresenham_line_3D(pts[i].x, pts[i].y, pts[i].z, bi_.sx, bi_.sy, bi_.sz,
- boost::bind(&CollisionMapperOcc::findOcclusionsInMapAux, this, &occluding, &state, &result, _1, _2, _3));
- if (result == 1)
- {
-#pragma omp critical
- {
- keep.insert(pts[i]);
- }
- }
- }
- }
-
- bool findOcclusionsInMapAux(const CMap *occluding, int *state, int *result, int x, int y, int z)
- {
- // we want to ignore the first few cells
- if (*state <= bi_.radius)
- *state = *state + 1;
- else
- {
- CollisionPoint p(x, y, z);
- CMap::const_iterator it = occluding->lower_bound(p);
-
- if (it != occluding->end())
- {
- if (collisionPointDistance(*it, p) <= bi_.radius)
- {
- // we hit a point that is occluding, our start point is occluded
- *result = 1;
- return true;
- }
- }
- }
-
- // continue looking
- return false;
- }
-
- void findSelfOcclusion(const CMap &self, CMap &occ_current, CMap &occ_moving)
- {
- // tell the self filter the frame in which we call getMask()
- sf_.assumeFrame(header_);
-
- // we are doing OpenMP parallelism, but we use a mutex to synchronize
- boost::mutex lock_current;
- boost::mutex lock_moving;
-
- // OpenMP need an int as the lookup variable, but for set,
- // this is not possible, so we copy to a vector
- const int n = self.size();
- std::vector<CollisionPoint> pts(n);
- std::copy(self.begin(), self.end(), pts.begin());
-
-#pragma omp parallel for schedule(dynamic)
- for (int i = 0 ; i < n ; ++i)
- {
- int state = 0;
- // run this function in a visitor pattern (it calls the callback at every cell it finds along the line)
- bresenham_line_3D(bi_.sx, bi_.sy, bi_.sz, pts[i].x, pts[i].y, pts[i].z,
- bi_.minX, bi_.minY, bi_.minZ, bi_.maxX, bi_.maxY, bi_.maxZ,
- boost::bind(&CollisionMapperOcc::findSelfOcclusionAux, this, &occ_current, &occ_moving, &state, &lock_current, &lock_moving, _1, _2, _3));
- }
- }
-
- bool findSelfOcclusionAux(CMap *occ_current, CMap *occ_moving, int *state, boost::mutex *lock_current, boost::mutex *lock_moving, int x, int y, int z)
- {
- if (*state == 16)
- {
- // here we have the option of adding further points in the occluded space
- // but for now, we stop
-
- return true;
- }
- else
- {
- // this is the point in the robotFrame_; check if it is currently inside the robot
- bool out = sf_.getMaskContainment(x * bi_.resolution + bi_.originX, y * bi_.resolution + bi_.originY, z * bi_.resolution + bi_.originZ);
-
- // if we are already inside the robot, we mark the fact we want to stop when we are outside
- if (out == false)
- {
- *state = 8;
- return false;
- }
- else
- {
- // if we are now outside, but have seen the inside, we have a point we need to add to the collision map
- if (*state == 8)
- {
- CollisionPoint c(x, y, z);
- c.t = header_.stamp;
- lock_current->lock();
- occ_current->insert(c);
- lock_current->unlock();
-
- // mark that we are now outside the robot and have added a first point
- *state = 16;
-
- // continue looking on the ray
- return false;
- }
- else
- // if we have not seen the inside, but we are outside, it could be we are just above the obstacle,
- // so we check the next cell along the line as well
- if (*state == 0)
- {
- *state = 1;
-
- // continue further on the ray
- return false;
- }
- else
- {
- // if we get to this point, it means the point was in self collision, but it no longer is
- // so at least a part of the robot has moved; we will need to raytrace from this point later on
- // and check if we are occluding anything
- CollisionPoint c(x, y, z);
- c.t = header_.stamp;
- lock_moving->lock();
- occ_moving->insert(c);
- lock_moving->unlock();
-
- // and we stop looking on this ray
- return true;
- }
- }
- }
- }
-
- /** Construct an axis-aligned collision map from a point cloud assumed to be in the robot frame */
- void constructCollisionMap(const sensor_msgs::PointCloud &cloud, const std::vector<int> &mask, int keep, CMap &map)
- {
- const unsigned int n = cloud.points.size();
- CollisionPoint c;
-
- for (unsigned int i = 0 ; i < n ; ++i)
- if (mask[i] == keep)
- {
- const geometry_msgs::Point32 &p = cloud.points[i];
- if (p.x > bi_.real_minX && p.x < bi_.real_maxX && p.y > bi_.real_minY && p.y < bi_.real_maxY && p.z > bi_.real_minZ && p.z < bi_.real_maxZ)
- {
- c.x = (int)(0.5 + (p.x - bi_.originX) / bi_.resolution);
- c.y = (int)(0.5 + (p.y - bi_.originY) / bi_.resolution);
- c.z = (int)(0.5 + (p.z - bi_.originZ) / bi_.resolution);
- c.t = cloud.header.stamp;
- map.insert(c);
- }
- }
- }
-
-
- /* Based on http://www.cit.gu.edu.au/~anthony/info/graphics/bresenham.procs */
- /* Form the line (x1, y1, z1) -> (x2, y2, z2) and generate points on it starting at (x2, y2, z2)
- * until it reaches a boundary of the box (minX, minY, minZ) -> (maxX, maxY, maxZ).
- * If the callback returns true, the segment is stopped */
-
- void bresenham_line_3D(int x1, int y1, int z1, int x2, int y2, int z2,
- const boost::function<bool(int, int, int)> &callback) const
- {
- int pixel[3];
- int dx, dy, dz;
-
- pixel[0] = x1;
- pixel[1] = y1;
- pixel[2] = z1;
-
- dx = x2 - x1;
- dy = y2 - y1;
- dz = z2 - z1;
-
- bresenham_line_3D(dx, dy, dz, pixel, callback);
- }
-
- void bresenham_line_3D(int x1, int y1, int z1, int x2, int y2, int z2,
- int minX, int minY, int minZ, int maxX, int maxY, int maxZ,
- const boost::function<bool(int, int, int)> &callback) const
- {
- int pixel[3];
- int dx, dy, dz;
-
- pixel[0] = x2;
- pixel[1] = y2;
- pixel[2] = z2;
- dx = x2 - x1;
- dy = y2 - y1;
- dz = z2 - z1;
-
- int c = -1;
- if (dx != 0)
- {
- int cx = (maxX - x1) / dx;
- if (cx <= 0)
- cx = (minX - x1) / dx;
- if (cx < c || c < 0)
- c = cx;
- }
-
- if (dy != 0)
- {
- int cy = (maxY - y1) / dy;
- if (cy <= 0)
- cy = (minY - y1) / dy;
- if (cy < c || c < 0)
- c = cy;
- }
-
- if (dz != 0)
- {
- int cz = (maxZ - z1) / dz;
- if (cz <= 0)
- cz = (minZ - z1) / dz;
- if (cz < c || c < 0)
- c = cz;
- }
-
- if (c > 0)
- {
- dx *= c;
- dy *= c;
- dz *= c;
- }
-
- bresenham_line_3D(dx, dy, dz, pixel, callback);
- }
-
- void bresenham_line_3D(int dx, int dy, int dz, int pixel[3], const boost::function<bool(int, int, int)> &callback) const
- {
- int i, l, m, n, x_inc, y_inc, z_inc, err_1, err_2, dx2, dy2, dz2;
-
- x_inc = (dx < 0) ? -1 : 1;
- l = abs(dx);
- y_inc = (dy < 0) ? -1 : 1;
- m = abs(dy);
- z_inc = (dz < 0) ? -1 : 1;
- n = abs(dz);
- dx2 = l << 1;
- dy2 = m << 1;
- dz2 = n << 1;
-
- if ((l >= m) && (l >= n)) {
- err_1 = dy2 - l;
- err_2 = dz2 - l;
- for (i = 0; i < l; i++) {
- if (callback(pixel[0], pixel[1], pixel[2]))
- return;
- if (err_1 > 0) {
- pixel[1] += y_inc;
- err_1 -= dx2;
- }
- if (err_2 > 0) {
- pixel[2] += z_inc;
- err_2 -= dx2;
- }
- err_1 += dy2;
- err_2 += dz2;
- pixel[0] += x_inc;
- }
- } else if ((m >= l) && (m >= n)) {
- err_1 = dx2 - m;
- err_2 = dz2 - m;
- for (i = 0; i < m; i++) {
- if (callback(pixel[0], pixel[1], pixel[2]))
- return;
- if (err_1 > 0) {
- pixel[0] += x_inc;
- err_1 -= dy2;
- }
- if (err_2 > 0) {
- pixel[2] += z_inc;
- err_2 -= dy2;
- }
- err_1 += dx2;
- err_2 += dz2;
- pixel[1] += y_inc;
- }
- } else {
- err_1 = dy2 - n;
- err_2 = dx2 - n;
- for (i = 0; i < n; i++) {
- if (callback(pixel[0], pixel[1], pixel[2]))
- return;
- if (err_1 > 0) {
- pixel[1] += y_inc;
- err_1 -= dz2;
- }
- if (err_2 > 0) {
- pixel[0] += x_inc;
- err_2 -= dz2;
- }
- err_1 += dy2;
- err_2 += dx2;
- pixel[2] += z_inc;
- }
- }
- callback(pixel[0], pixel[1], pixel[2]);
- }
-
- void publishCollisionMap(const CMap &map, const roslib::Header &header, ros::Publisher &pub) const
- {
- mapping_msgs::CollisionMap cmap;
- cmap.header = header;
- const unsigned int ms = map.size();
-
- for (CMap::const_iterator it = map.begin() ; it != map.end() ; ++it)
- {
- const CollisionPoint &cp = *it;
- mapping_msgs::OrientedBoundingBox box;
- box.extents.x = box.extents.y = box.extents.z = bi_.resolution;
- box.axis.x = box.axis.y = 0.0; box.axis.z = 1.0;
- ...
[truncated message content] |
|
From: <sy...@us...> - 2009-08-12 21:46:59
|
Revision: 21715
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21715&view=rev
Author: syrnick
Date: 2009-08-12 21:46:50 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
camera offsetter. The package to calibrate the camera by hand.
Modified Paths:
--------------
pkg/trunk/calibration/sandbox/camera_offsetter/include/camera_offsetter/generic_offsetter.h
pkg/trunk/pr2/teleop/teleop_spacenav/manifest.xml
pkg/trunk/stacks/pr2/pr2_alpha/prg.launch
pkg/trunk/stacks/pr2/pr2_defs/calibration/prg_cal.xml
Added Paths:
-----------
pkg/trunk/calibration/sandbox/camera_offsetter/config/
pkg/trunk/calibration/sandbox/camera_offsetter/config/prg.narrow_stereo.offset
pkg/trunk/calibration/sandbox/camera_offsetter/launch/
pkg/trunk/calibration/sandbox/camera_offsetter/launch/narrow_stereo_offsetter.launch
pkg/trunk/calibration/sandbox/camera_offsetter/test/
pkg/trunk/calibration/sandbox/camera_offsetter/test/test_stereo_offsetter.launch
pkg/trunk/stacks/stereo/stereo_image_proc/narrow_stereoproc_offset.launch
pkg/trunk/stacks/stereo/stereo_image_proc/throttle_narrow_stereo_offset.launch
Removed Paths:
-------------
pkg/trunk/calibration/sandbox/camera_offsetter/test_stereo_offsetter.launch
Property Changed:
----------------
pkg/trunk/calibration/sandbox/camera_offsetter/
Property changes on: pkg/trunk/calibration/sandbox/camera_offsetter
___________________________________________________________________
Added: svn:ignore
+ build
.build_version
lib
bin
Added: pkg/trunk/calibration/sandbox/camera_offsetter/config/prg.narrow_stereo.offset
===================================================================
--- pkg/trunk/calibration/sandbox/camera_offsetter/config/prg.narrow_stereo.offset (rev 0)
+++ pkg/trunk/calibration/sandbox/camera_offsetter/config/prg.narrow_stereo.offset 2009-08-12 21:46:50 UTC (rev 21715)
@@ -0,0 +1,2 @@
+-0.000235494 -0.000141299 0.0269986
+0.00261665 -0.00523329 9.12921e-06 0.999983
\ No newline at end of file
Modified: pkg/trunk/calibration/sandbox/camera_offsetter/include/camera_offsetter/generic_offsetter.h
===================================================================
--- pkg/trunk/calibration/sandbox/camera_offsetter/include/camera_offsetter/generic_offsetter.h 2009-08-12 21:46:47 UTC (rev 21714)
+++ pkg/trunk/calibration/sandbox/camera_offsetter/include/camera_offsetter/generic_offsetter.h 2009-08-12 21:46:50 UTC (rev 21715)
@@ -48,6 +48,8 @@
#include <boost/thread.hpp>
#include <boost/thread/mutex.hpp>
+#include <fstream>
+
namespace camera_offsetter
{
@@ -61,8 +63,55 @@
nh_.param("~position_scaling", position_scaling_, 1.0);
nh_.param("~angular_scaling", angular_scaling_, 1.0);
+
+ nh_.param("~config_file", config_file_, std::string("N/A"));
+
+ readConfig();
}
+ void readConfig()
+ {
+ if(config_file_==std::string("N/A"))
+ {
+ ROS_WARN("No config file is set");
+ return;
+ }
+
+ geometry_msgs::PosePtr p(new geometry_msgs::Pose());
+ std::fstream f (config_file_.c_str(), std::fstream::in);
+ if(!f.is_open())
+ {
+ ROS_WARN("Couldn't open config file");
+ return;
+ }
+ f >> p->position.x;
+ f >> p->position.y;
+ f >> p->position.z;
+ f >> p->orientation.x;
+ f >> p->orientation.y;
+ f >> p->orientation.z;
+ f >> p->orientation.w;
+ ROS_INFO_STREAM(p->orientation.x);
+ ROS_INFO_STREAM(p);
+ poseCb(p);
+ }
+ void saveConfig()
+ {
+ if(config_file_==std::string("N/A"))
+ {
+ ROS_WARN("No config file is set");
+ return;
+ }
+ std::fstream f (config_file_.c_str(), std::fstream::out);
+ f << virtual_offset_.getOrigin().x() << " ";
+ f << virtual_offset_.getOrigin().y() << " ";
+ f << virtual_offset_.getOrigin().z() << std::endl;
+ f << virtual_offset_.getRotation().x()<< " ";
+ f << virtual_offset_.getRotation().y()<< " ";
+ f << virtual_offset_.getRotation().z()<< " ";
+ f << virtual_offset_.getRotation().w();
+ }
+
void poseCb(const geometry_msgs::PoseConstPtr& msg)
{
boost::mutex::scoped_lock lock(offset_mutex_);
@@ -89,6 +138,8 @@
btTransform incrementalT(rot, trans);
virtual_offset_ = virtual_offset_ * incrementalT;
+
+ saveConfig();
}
void publishTransform(const ros::Time& time, const std::string frame_id, const std::string parent_id)
@@ -116,6 +167,8 @@
double position_scaling_;
double angular_scaling_;
+ std::string config_file_;
+
boost::mutex offset_mutex_;
btTransform virtual_offset_;
} ;
Added: pkg/trunk/calibration/sandbox/camera_offsetter/launch/narrow_stereo_offsetter.launch
===================================================================
--- pkg/trunk/calibration/sandbox/camera_offsetter/launch/narrow_stereo_offsetter.launch (rev 0)
+++ pkg/trunk/calibration/sandbox/camera_offsetter/launch/narrow_stereo_offsetter.launch 2009-08-12 21:46:50 UTC (rev 21715)
@@ -0,0 +1,14 @@
+<launch>
+
+ <!-- node type="spacenav_node" pkg="spacenav_node" name="spacenav_node" / -->
+ <node type="stereo_offsetter" pkg="camera_offsetter" name="narrow_stereo_offsetter" output="screen">
+ <remap from="~virtual_twist" to="keyboard_twist" />
+ <param name="cam_name" type="string" value="/narrow_stereo" />
+ <param name="position_scaling" type="double" value=".0001" />
+ <param name="angular_scaling" type="double" value="1.0" />
+ <param name="cam_name" type="string" value="/narrow_stereo" />
+ <param name="config_file" type="string" value="$(find camera_offsetter)/config/$(env ROBOT).narrow_stereo.offset" />
+
+ </node>
+
+</launch>
\ No newline at end of file
Added: pkg/trunk/calibration/sandbox/camera_offsetter/test/test_stereo_offsetter.launch
===================================================================
--- pkg/trunk/calibration/sandbox/camera_offsetter/test/test_stereo_offsetter.launch (rev 0)
+++ pkg/trunk/calibration/sandbox/camera_offsetter/test/test_stereo_offsetter.launch 2009-08-12 21:46:50 UTC (rev 21715)
@@ -0,0 +1,11 @@
+<launch>
+
+ <!-- node type="spacenav_node" pkg="spacenav_node" name="spacenav_node" / -->
+ <node type="stereo_offsetter" pkg="camera_offsetter" name="narrow_stereo_offsetter" output="screen">
+ <remap from="~virtual_twist" to="keyboard_twist" />
+ <param name="cam_name" type="string" value="/narrow_stereo" />
+ <param name="position_scaling" type="double" value=".0001" />
+ <param name="angular_scaling" type="double" value="1.0" />
+ </node>
+
+</launch>
\ No newline at end of file
Deleted: pkg/trunk/calibration/sandbox/camera_offsetter/test_stereo_offsetter.launch
===================================================================
--- pkg/trunk/calibration/sandbox/camera_offsetter/test_stereo_offsetter.launch 2009-08-12 21:46:47 UTC (rev 21714)
+++ pkg/trunk/calibration/sandbox/camera_offsetter/test_stereo_offsetter.launch 2009-08-12 21:46:50 UTC (rev 21715)
@@ -1,11 +0,0 @@
-<launch>
-
- <!-- node type="spacenav_node" pkg="spacenav_node" name="spacenav_node" / -->
- <node type="stereo_offsetter" pkg="camera_offsetter" name="narrow_stereo_offsetter" output="screen">
- <remap from="~virtual_twist" to="keyboard_twist" />
- <param name="cam_name" type="string" value="/narrow_stereo" />
- <param name="position_scaling" type="double" value=".0001" />
- <param name="angular_scaling" type="double" value="1.0" />
- </node>
-
-</launch>
\ No newline at end of file
Modified: pkg/trunk/pr2/teleop/teleop_spacenav/manifest.xml
===================================================================
--- pkg/trunk/pr2/teleop/teleop_spacenav/manifest.xml 2009-08-12 21:46:47 UTC (rev 21714)
+++ pkg/trunk/pr2/teleop/teleop_spacenav/manifest.xml 2009-08-12 21:46:50 UTC (rev 21715)
@@ -11,6 +11,8 @@
<depend package="robot_mechanism_controllers" />
<depend package="mechanism_control" />
<depend package="spacenav_node" />
+ <depend package="joy" />
+
<url>http://pr.willowgarage.com</url>
<export>
</export>
Modified: pkg/trunk/stacks/pr2/pr2_alpha/prg.launch
===================================================================
--- pkg/trunk/stacks/pr2/pr2_alpha/prg.launch 2009-08-12 21:46:47 UTC (rev 21714)
+++ pkg/trunk/stacks/pr2/pr2_alpha/prg.launch 2009-08-12 21:46:50 UTC (rev 21715)
@@ -50,13 +50,13 @@
<node machine="four" pkg="imu_node" type="imu_node" output="screen"/>
<!-- Prosilica camera setup -->
- <group ns="prosilica">
+ <!--group ns="prosilica">
<include file="$(find prosilica_cam)/cam_settings.xml"/>
<param name="acquisition_mode" type="str" value="Triggered"/>
<param name="ip_address" type="str" value="10.68.7.20"/>
</group>
- <node machine="three" name="prosilica" pkg="prosilica_cam" type="prosilica_node" output="screen" respawn="true"/>
+ <node machine="three" name="prosilica" pkg="prosilica_cam" type="prosilica_node" output="screen" respawn="true"/-->
<!-- Double stereo setup -->
<!-- Wide is on robot right, goes to four -->
Modified: pkg/trunk/stacks/pr2/pr2_defs/calibration/prg_cal.xml
===================================================================
--- pkg/trunk/stacks/pr2/pr2_defs/calibration/prg_cal.xml 2009-08-12 21:46:47 UTC (rev 21714)
+++ pkg/trunk/stacks/pr2/pr2_defs/calibration/prg_cal.xml 2009-08-12 21:46:50 UTC (rev 21715)
@@ -2,56 +2,41 @@
<root>
<!-- *************************************************************** -->
- <!-- * Calibration values for the PRG2-Gandolf robot at Willow Garage * -->
+ <!-- * Calibration values for the PR2-Frodo robot at Willow Garage * -->
<!-- *************************************************************** -->
-
- <!-- Stereocam Position (Nominally 0) -->
- <property name="cal_stereo_x" value="0.0" />
- <property name="cal_stereo_y" value="0.0" />
- <property name="cal_stereo_z" value="0.0" />
- <property name="cal_stereo_roll" value="0.0" />
- <property name="cal_stereo_pitch" value="0.0" />
- <property name="cal_stereo_yaw" value="0.0" />
-
- <!-- Prosilica Cam Pose (Nominally 0) -->
- <property name="cal_high_def_x" value="0.0" />
- <property name="cal_high_def_y" value="0.0" />
- <property name="cal_high_def_z" value="0.0" />
- <property name="cal_high_def_roll" value="0.0" />
- <property name="cal_high_def_pitch" value="0.0" />
- <property name="cal_high_def_yaw" value="0.0" />
-
-
- <!-- Sensor Head Pose (Nominally 0) -->
- <property name="cal_head_x" value="0.0" />
- <property name="cal_head_y" value="0.0" />
- <property name="cal_head_z" value="0.0" />
- <property name="cal_head_roll" value="0.0" />
- <property name="cal_head_pitch" value="0.0" />
- <property name="cal_head_yaw" value="0.0" />
-
- <!-- Head joint gearing (Nominally 1) -->
- <property name="cal_head_pan_gearing" value="0.0" />
- <property name="cal_head_tilt_gearing" value="0.0" />
-
- <!-- Head joint offsets -->
- <property name="cal_head_pan_flag" value="0.0" />
- <property name="cal_head_tilt_flag" value="0.0" />
-
- <!-- Arm joint offsets (Nominally 0) -->
- <property name="cal_r_shoulder_pan_flag" value="0.0" />
- <property name="cal_r_shoulder_lift_flag" value="0.0" />
- <property name="cal_r_upper_arm_roll_flag" value="0.0" />
- <property name="cal_r_elbow_flex_flag" value="0.0" />
- <property name="cal_r_forearm_roll_flag" value="0.0" />
- <property name="cal_r_wrist_flex_flag" value="0.0" />
- <property name="cal_r_wrist_roll_flag" value="0.4" /> <!-- Manually Set -->
-
- <!-- Arm Gearing (Nominally 1) -->
- <property name="cal_r_shoulder_pan_gearing" value="1.0" />
- <property name="cal_r_shoulder_lift_gearing" value="1.0" />
- <property name="cal_r_upper_arm_roll_gearing" value="1.0" />
+ <property name="cal_stereo_x" value="0.039115" />
+ <property name="cal_stereo_y" value="0.006051" />
+ <property name="cal_stereo_z" value="-0.038254" />
+ <property name="cal_stereo_roll" value="0.011096" />
+ <property name="cal_stereo_pitch" value="-0.007152" />
+ <property name="cal_stereo_yaw" value="-0.009792" />
+ <property name="cal_high_def_x" value="0.009476" />
+ <property name="cal_high_def_y" value="0.003106" />
+ <property name="cal_high_def_z" value="-0.035546" />
+ <property name="cal_high_def_roll" value="0.011479" />
+ <property name="cal_high_def_pitch" value="0.006041" />
+ <property name="cal_high_def_yaw" value="0.013658" />
+ <property name="cal_head_x" value="-0.000819" />
+ <property name="cal_head_y" value="0.002317" />
+ <property name="cal_head_z" value="0.038099" />
+ <property name="cal_head_roll" value="0.000000" />
+ <property name="cal_head_pitch" value="0.000000" />
+ <property name="cal_head_yaw" value="0.000000" />
+ <property name="cal_r_shoulder_pan_flag" value="0.000000" />
+ <property name="cal_r_shoulder_lift_flag" value="-0.014003" />
+ <property name="cal_r_upper_arm_roll_flag" value="-0.008987" />
+ <property name="cal_r_elbow_flex_flag" value="-0.021100" />
+ <property name="cal_r_forearm_roll_flag" value="-0.032453" />
+ <property name="cal_r_wrist_flex_flag" value="0.034690" />
+ <property name="cal_r_wrist_roll_flag" value="0.4" /> <!-- Manually Set -->
+ <property name="cal_r_shoulder_pan_gearing" value="0.996635" />
+ <property name="cal_r_shoulder_lift_gearing" value="0.981056" />
+ <property name="cal_r_upper_arm_roll_gearing" value="1.005774" />
+ <property name="cal_head_pan_flag" value="-0.020095" />
+ <property name="cal_head_tilt_flag" value="0.000000" />
+ <property name="cal_head_pan_gearing" value="0.991906" />
+ <property name="cal_head_tilt_gearing" value="0.970987" />
-</root>
+</root>
\ No newline at end of file
Copied: pkg/trunk/stacks/stereo/stereo_image_proc/narrow_stereoproc_offset.launch (from rev 21634, pkg/trunk/stacks/stereo/stereo_image_proc/narrow_stereoproc.launch)
===================================================================
--- pkg/trunk/stacks/stereo/stereo_image_proc/narrow_stereoproc_offset.launch (rev 0)
+++ pkg/trunk/stacks/stereo/stereo_image_proc/narrow_stereoproc_offset.launch 2009-08-12 21:46:50 UTC (rev 21715)
@@ -0,0 +1,41 @@
+<launch>
+ <!-- videre_mode should be one of the following:
+ disparity: Disparity and rectification done on chip.
+ Provides: Disparity and left mono image
+ disparity_raw: Disparity done on chip (debayer and rectification in software).
+ Provides: disparity and left color image.
+ none: No stereo on chip (all processing done in software).
+ Provides: all 3 images available
+ rectified: Rectification on chip
+ Provides: all 3 images available but no color
+ -->
+ <!-- stereo processing parameters
+ texture_thresh: Threshold for removing bad disparities based on texture
+ Default value: 30
+ unique_thresh: Threshold for removing bad disparities based on ambiguity
+ Default value: 36
+ speckle_diff: Threshold for region-growing (1/16 pixel disparity)
+ Default value: 10
+ speckle_size: Threshold for disparity region size (pixels)
+ Default value: 100
+ horopter: X offset for close-in stereo (pixels)
+ Default value: 0
+ corr_size: Correlation window size (pixels)
+ Default value: 15
+ num_disp: Number of disparities (pixels)
+ Default value: 64
+ -->
+ <group ns="narrow_stereo_offset">
+ <node pkg="stereo_image_proc" type="stereoproc" respawn="false" output="screen" name="stereoproc">
+ <param name="videre_mode" type="str" value="none"/>
+ <param name="do_colorize" type="bool" value="True"/>
+ <param name="do_rectify" type="bool" value="True"/>
+ <param name="do_stereo" type="bool" value="True"/>
+ <param name="do_calc_points" type="bool" value="True"/>
+ <param name="do_keep_coords" type="bool" value="True"/>
+ <param name="num_disp" type="int" value="128"/>
+ <param name="corr_size" type="int" value="7"/>
+ </node>
+ </group>
+</launch>
+
Property changes on: pkg/trunk/stacks/stereo/stereo_image_proc/narrow_stereoproc_offset.launch
___________________________________________________________________
Added: svn:mergeinfo
+ /pkg/branches/gazebo-branch-merge/vision/stereo_image_proc/narrow_stereoproc.launch:15683-15684,15739-15794,15797-15820,15822-15839,15852-15870,15983-16008,16010-16016,16129-16141,16145-16169,16245-16262,16274-16334
Added: pkg/trunk/stacks/stereo/stereo_image_proc/throttle_narrow_stereo_offset.launch
===================================================================
--- pkg/trunk/stacks/stereo/stereo_image_proc/throttle_narrow_stereo_offset.launch (rev 0)
+++ pkg/trunk/stacks/stereo/stereo_image_proc/throttle_narrow_stereo_offset.launch 2009-08-12 21:46:50 UTC (rev 21715)
@@ -0,0 +1,9 @@
+<launch>
+
+<node pkg="topic_tools" type="throttle" name="stereo_cloud" args="messages /narrow_stereo_offset/cloud 1.0" />
+
+<node pkg="topic_tools" type="throttle" name="stereo_cloud" args="messages /narrow_stereo_offset/left/image_rect 1.0" />
+
+
+
+</launch>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mee...@us...> - 2009-08-13 00:28:40
|
Revision: 21741
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21741&view=rev
Author: meeussen
Date: 2009-08-13 00:28:28 +0000 (Thu, 13 Aug 2009)
Log Message:
-----------
reorganize controller access through interface class on mc and put controller base class in separate package
Modified Paths:
--------------
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller_effort.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_position_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_servoing_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_qualification.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_traj_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_gripper_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_hybrid_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_pose_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_tff_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_trajectory_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller_ik.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/dynamic_loader_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_autotuner.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_blind_calibration_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_sine_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_inverse_dynamics_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_pd_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_smoothing_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/probe.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/trigger_controller.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/joint_trajectory_controller2.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/plug_controller.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h
pkg/trunk/stacks/mechanism/mechanism_control/CMakeLists.txt
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller_spec.h
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/mechanism_control.h
pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml
pkg/trunk/stacks/mechanism/mechanism_control/src/mechanism_control.cpp
Added Paths:
-----------
pkg/trunk/stacks/mechanism/controller_interface/
pkg/trunk/stacks/mechanism/controller_interface/CMakeLists.txt
pkg/trunk/stacks/mechanism/controller_interface/Makefile
pkg/trunk/stacks/mechanism/controller_interface/include/
pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/
pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller.h
pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller_provider.h
pkg/trunk/stacks/mechanism/controller_interface/mainpage.dox
pkg/trunk/stacks/mechanism/controller_interface/manifest.xml
pkg/trunk/stacks/mechanism/controller_interface/src/
Removed Paths:
-------------
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller.h
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller_handle.h
pkg/trunk/stacks/mechanism/mechanism_control/src/controller_handle.cpp
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -37,7 +37,7 @@
#include <ros/node.h>
#include <boost/thread/mutex.hpp>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_position_controller.h>
#include <robot_mechanism_controllers/joint_velocity_controller.h>
#include <robot_mechanism_controllers/joint_effort_controller.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -36,7 +36,7 @@
*/
#include <mechanism_model/robot.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <geometry_msgs/Twist.h>
#include <geometry_msgs/Point.h>
#include <control_toolbox/filters.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -44,7 +44,7 @@
#include "ros/node_handle.h"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "mechanism_model/robot.h"
#include "control_toolbox/pid.h"
#include "robot_mechanism_controllers/joint_velocity_controller.h"
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller_effort.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller_effort.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller_effort.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -41,7 +41,7 @@
#ifndef CASTER_CONTROLLER_EFFORT_H
#define CASTER_CONTROLLER_EFFORT_H
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "mechanism_model/robot.h"
#include "control_toolbox/pid.h"
#include "robot_mechanism_controllers/joint_velocity_controller.h"
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_position_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_position_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_position_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -41,7 +41,7 @@
#include <ros/node.h>
#include <ros/node_handle.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <tf/transform_listener.h>
#include <tf/message_notifier.h>
#include <tf/transform_datatypes.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_servoing_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_servoing_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_servoing_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -39,7 +39,7 @@
#include <ros/node.h>
#include <ros/node_handle.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <tf/transform_listener.h>
#include <tf/message_notifier.h>
#include <tf/transform_datatypes.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -37,7 +37,7 @@
#include <ros/node.h>
#include <boost/thread/mutex.hpp>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_pd_controller.h>
// Services
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_qualification.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_qualification.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_qualification.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -36,7 +36,7 @@
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_velocity_controller.h>
// Services
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_traj_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_traj_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_traj_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -36,7 +36,7 @@
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_position_smoothing_controller.h>
#include <realtime_tools/realtime_publisher.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_gripper_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_gripper_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_gripper_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -37,7 +37,7 @@
#include <ros/node.h>
#include <mechanism_model/robot.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_effort_controller.h>
#include <pr2_mechanism_controllers/GripperControllerCmd.h>
#include <pr2_msgs/GripperControllerState.h>
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -52,7 +52,7 @@
#include <math.h>
#include <joint_qualification_controllers/RobotData.h>
#include <realtime_tools/realtime_srv_call.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <boost/scoped_ptr.hpp>
namespace controller
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -50,7 +50,7 @@
#include <math.h>
#include <joint_qualification_controllers/HoldSetData.h>
#include <realtime_tools/realtime_srv_call.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_position_controller.h>
#include <control_toolbox/dither.h>
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -49,7 +49,7 @@
#include <math.h>
#include <joint_qualification_controllers/TestData.h>
#include <realtime_tools/realtime_srv_call.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_velocity_controller.h>
#include <boost/scoped_ptr.hpp>
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -47,7 +47,7 @@
#include <math.h>
#include <joint_qualification_controllers/TestData.h>
#include <realtime_tools/realtime_srv_call.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <control_toolbox/sine_sweep.h>
#include <boost/scoped_ptr.hpp>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_hybrid_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_hybrid_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_hybrid_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -32,7 +32,7 @@
#include "ros/node.h"
#include "boost/scoped_ptr.hpp"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include <kdl/chain.hpp>
#include <kdl/frames.hpp>
#include "mechanism_model/chain.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_pose_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_pose_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_pose_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -76,7 +76,7 @@
#include <ros/node.h>
#include <geometry_msgs/PoseStamped.h>
#include <geometry_msgs/Twist.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <realtime_tools/realtime_publisher.h>
#include <boost/scoped_ptr.hpp>
#include "robot_mechanism_controllers/cartesian_twist_controller.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_tff_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_tff_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_tff_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -41,7 +41,7 @@
#include <ros/node.h>
#include <manipulation_msgs/TaskFrameFormalism.h>
#include <geometry_msgs/Twist.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <tf/transform_datatypes.h>
#include <control_toolbox/pid.h>
#include <boost/scoped_ptr.hpp>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_trajectory_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_trajectory_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_trajectory_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -43,7 +43,7 @@
#include <tf/message_notifier.h>
#include <ros/node.h>
#include <geometry_msgs/PoseStamped.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/cartesian_pose_controller.h>
#include <deprecated_srvs/MoveToPose.h>
#include <std_srvs/Empty.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -40,7 +40,7 @@
#include <kdl/frames.hpp>
#include <ros/node.h>
#include <geometry_msgs/Twist.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <tf/transform_datatypes.h>
#include <robot_mechanism_controllers/cartesian_wrench_controller.h>
#include <control_toolbox/pid.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller_ik.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller_ik.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller_ik.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -43,7 +43,7 @@
#include <kdl/chainiksolver.hpp>
#include <ros/node.h>
#include <geometry_msgs/Twist.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <mechanism_model/chain.h>
#include <tf/transform_datatypes.h>
#include <control_toolbox/pid.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -40,7 +40,7 @@
#include <kdl/chainjnttojacsolver.hpp>
#include <ros/node_handle.h>
#include <geometry_msgs/Wrench.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <mechanism_model/chain.h>
#include <tf/transform_datatypes.h>
#include <diagnostic_msgs/DiagnosticArray.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/dynamic_loader_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/dynamic_loader_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/dynamic_loader_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -34,7 +34,8 @@
#ifndef DYNAMIC_LOADER_CONTROLLER_H
#define DYNAMIC_LOADER_CONTROLLER_H
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
+#include <tinyxml/tinyxml.h>
#include <ltdl.h>
namespace controller {
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -44,7 +44,7 @@
#include "ros/node.h"
#include "geometry_msgs/Wrench.h"
#include "misc_utils/subscription_guard.h"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "tf/transform_datatypes.h"
#include "misc_utils/advertised_service_guard.h"
#include "joy/Joy.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_autotuner.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_autotuner.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_autotuner.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -46,7 +46,7 @@
#include <ros/node.h>
#include <vector>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <control_toolbox/pid.h>
// Services
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_blind_calibration_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_blind_calibration_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_blind_calibration_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -56,7 +56,7 @@
/***************************************************/
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "robot_mechanism_controllers/joint_velocity_controller.h"
#include "misc_utils/advertised_service_guard.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -62,7 +62,7 @@
#include "geometry_msgs/Wrench.h"
#include "robot_mechanism_controllers/ChangeConstraints.h"
#include "robot_mechanism_controllers/JointConstraint.h"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "mechanism_model/chain.h"
#include "tf/transform_datatypes.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_sine_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_sine_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_sine_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -58,7 +58,7 @@
#ifndef JOINT_CHAIN_SINE_CONTROLLER_H_
#define JOINT_CHAIN_SINE_CONTROLLER_H_
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <kdl/chain.hpp>
#include <kdl/chainfksolver.hpp>
#include <mechanism_model/chain.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -52,7 +52,7 @@
*/
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <std_msgs/Float64.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_inverse_dynamics_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_inverse_dynamics_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_inverse_dynamics_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -46,7 +46,7 @@
#include <ros/node.h>
#include <std_msgs/Float64MultiArray.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <mechanism_model/chain.h>
#include <tf/transform_datatypes.h>
#include <diagnostic_msgs/DiagnosticArray.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_pd_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_pd_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_pd_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -53,7 +53,7 @@
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#includ...
[truncated message content] |
|
From: <vij...@us...> - 2009-08-13 01:57:47
|
Revision: 21754
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21754&view=rev
Author: vijaypradeep
Date: 2009-08-13 01:57:33 +0000 (Thu, 13 Aug 2009)
Log Message:
-----------
Porting move_arm to the new actionlib interface. Code compiles, but not yet tested
Modified Paths:
--------------
pkg/trunk/highlevel/move_arm/CMakeLists.txt
pkg/trunk/highlevel/move_arm/launch/move_rarm.launch
pkg/trunk/highlevel/move_arm/manifest.xml
pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg
pkg/trunk/highlevel/move_arm/src/actuate_gripper_action.cpp
pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp
pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp
pkg/trunk/stacks/common/actionlib/include/actionlib/server/single_goal_action_server.h
pkg/trunk/stacks/common/actionlib/include/actionlib/server/single_goal_action_server_imp.h
Added Paths:
-----------
pkg/trunk/highlevel/move_arm/action/
pkg/trunk/highlevel/move_arm/action/ActuateGripper.action
pkg/trunk/highlevel/move_arm/action/MoveArm.action
pkg/trunk/highlevel/move_arm/include/
pkg/trunk/highlevel/move_arm/include/move_arm/
pkg/trunk/highlevel/move_arm/include/move_arm/move_arm_core.h
pkg/trunk/highlevel/move_arm/msg/ActuateGripperAction.msg
pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionFeedback.msg
pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionGoal.msg
pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionResult.msg
pkg/trunk/highlevel/move_arm/msg/ActuateGripperFeedback.msg
pkg/trunk/highlevel/move_arm/msg/ActuateGripperGoal.msg
pkg/trunk/highlevel/move_arm/msg/ActuateGripperResult.msg
pkg/trunk/highlevel/move_arm/msg/MoveArmAction.msg
pkg/trunk/highlevel/move_arm/msg/MoveArmActionFeedback.msg
pkg/trunk/highlevel/move_arm/msg/MoveArmActionGoal.msg
pkg/trunk/highlevel/move_arm/msg/MoveArmActionResult.msg
pkg/trunk/highlevel/move_arm/msg/MoveArmFeedback.msg
pkg/trunk/highlevel/move_arm/msg/MoveArmResult.msg
Removed Paths:
-------------
pkg/trunk/highlevel/move_arm/msg/MoveArmState.msg
Modified: pkg/trunk/highlevel/move_arm/CMakeLists.txt
===================================================================
--- pkg/trunk/highlevel/move_arm/CMakeLists.txt 2009-08-13 01:35:58 UTC (rev 21753)
+++ pkg/trunk/highlevel/move_arm/CMakeLists.txt 2009-08-13 01:57:33 UTC (rev 21754)
@@ -22,8 +22,8 @@
# simple tests
-rospack_add_executable(oscillate_move test/oscillate_move.cpp)
-rospack_link_boost(oscillate_move thread)
+# rospack_add_executable(oscillate_move test/oscillate_move.cpp)
+# rospack_link_boost(oscillate_move thread)
# actuate gripper action test
-rospack_add_executable(actuate_gripper_action_test test/test_actuate_gripper.cpp)
+#rospack_add_executable(actuate_gripper_action_test test/test_actuate_gripper.cpp)
Added: pkg/trunk/highlevel/move_arm/action/ActuateGripper.action
===================================================================
--- pkg/trunk/highlevel/move_arm/action/ActuateGripper.action (rev 0)
+++ pkg/trunk/highlevel/move_arm/action/ActuateGripper.action 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,3 @@
+float64 data
+---
+---
Copied: pkg/trunk/highlevel/move_arm/action/MoveArm.action (from rev 21753, pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg)
===================================================================
--- pkg/trunk/highlevel/move_arm/action/MoveArm.action (rev 0)
+++ pkg/trunk/highlevel/move_arm/action/MoveArm.action 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,18 @@
+
+# The goal state for the model to plan for. The state is not necessarily explicit.
+# The goal is considered achieved if all the constraints are satisfied.
+# An explicit state can be specified by setting joint constraints to a specific value.
+motion_planning_msgs/KinematicConstraints goal_constraints
+
+# The set of constraints that need to be satisfied by the entire solution path.
+motion_planning_msgs/KinematicConstraints path_constraints
+
+# The set of allowed contacts
+motion_planning_msgs/AcceptableContact[] contacts
+---
+---
+int32 mode
+int32 PLANNING=1
+int32 MOVING=2
+
+duration time_to_completion
Added: pkg/trunk/highlevel/move_arm/include/move_arm/move_arm_core.h
===================================================================
--- pkg/trunk/highlevel/move_arm/include/move_arm/move_arm_core.h (rev 0)
+++ pkg/trunk/highlevel/move_arm/include/move_arm/move_arm_core.h 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,207 @@
+/*********************************************************************
+ *
+ * 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.
+
+ *
+ * Authors: Sachin Chitta, Ioan Sucan
+ *********************************************************************/
+
+#ifndef MOVE_ARM_MOVE_ARM_CORE_H_
+#define MOVE_ARM_MOVE_ARM_CORE_H_
+
+#include <ros/ros.h>
+
+#include <pr2_mechanism_controllers/TrajectoryStart.h>
+#include <pr2_mechanism_controllers/TrajectoryQuery.h>
+#include <pr2_mechanism_controllers/TrajectoryCancel.h>
+
+#include <planning_environment/monitors/planning_monitor.h>
+
+namespace move_arm
+{
+
+/// the string used internally to access control starting service; this should be remaped in the launch file
+static const std::string CONTROL_START_NAME = "controller_start";
+
+/// the string used internally to access control querying service; this should be remaped in the launch file
+static const std::string CONTROL_QUERY_NAME = "controller_query";
+
+/// the string used internally to access control canceling service; this should be remaped in the launch file
+static const std::string CONTROL_CANCEL_NAME = "controller_cancel";
+
+/// the string used internally to access the long range motion planning service; this should be remaped in the launch file
+static const std::string LR_MOTION_PLAN_NAME = "get_motion_plan_lr";
+
+/// the string used internally to access the short range motion planning service; this should be remaped in the launch file
+static const std::string SR_MOTION_PLAN_NAME = "get_motion_plan_sr";
+
+/// the string used internally to access valid state searching service; this should be remaped in the launch file
+static const std::string SEARCH_VALID_STATE_NAME = "get_valid_state";
+
+/// the string used internally to access inverse kinematics service; this should be remaped in the launch file
+static const std::string ARM_IK_NAME = "arm_ik";
+
+
+/** \brief Configuration of actions that need to actuate parts of the robot */
+class MoveArmCore
+{
+ friend class MoveArm;
+
+public:
+
+ MoveArmCore(void)
+ {
+ collisionModels_ = NULL;
+ planningMonitor_ = NULL;
+ }
+
+ virtual ~MoveArmCore(void)
+ {
+ if (planningMonitor_)
+ delete planningMonitor_;
+ if (collisionModels_)
+ delete collisionModels_;
+ }
+
+
+ bool configure(void)
+ {
+ nodeHandle_.param<std::string>("~group", group_, std::string());
+
+ if (group_.empty())
+ {
+ ROS_ERROR("No '~group' parameter specified. Without the name of the group of joints to plan for, action cannot start");
+ return false;
+ }
+
+ // monitor robot
+ collisionModels_ = new planning_environment::CollisionModels("robot_description");
+ planningMonitor_ = new planning_environment::PlanningMonitor(collisionModels_, &tf_);
+
+ if (!collisionModels_->loadedModels())
+ return false;
+
+ nodeHandle_.param<bool>("~perform_ik", perform_ik_, true);
+
+ if (collisionModels_->getKinematicModel()->getGroupID(group_) < 0)
+ {
+ ROS_ERROR("Group '%s' is not known", group_.c_str());
+ return false;
+ }
+ else
+ ROS_INFO("Configuring action core for '%s' (IK is %senabled)", group_.c_str(), perform_ik_ ? "" : "not ");
+
+ planningMonitor_->waitForState();
+ planningMonitor_->waitForMap();
+
+ if (!getControlJointNames(groupJointNames_))
+ return false;
+
+ nodeHandle_.param<bool>("~show_collisions", show_collisions_, false);
+
+ if (show_collisions_)
+ ROS_INFO("Found collisions will be displayed as visualization markers");
+
+ return true;
+ }
+
+protected:
+
+ bool getControlJointNames(std::vector<std::string> &joint_names)
+ {
+ ros::ServiceClient client_query = nodeHandle_.serviceClient<pr2_mechanism_controllers::TrajectoryQuery>(CONTROL_QUERY_NAME);
+ pr2_mechanism_controllers::TrajectoryQuery::Request req_query;
+ pr2_mechanism_controllers::TrajectoryQuery::Response res_query;
+ req_query.trajectoryid = pr2_mechanism_controllers::TrajectoryQuery::Request::Query_Joint_Names;
+
+ bool result = client_query.call(req_query, res_query);
+
+ if (!result)
+ {
+ ROS_INFO("Querying controller for joint names ...");
+ ros::Duration(5.0).sleep();
+ result = client_query.call(req_query, res_query);
+ if (result)
+ ROS_INFO("Joint names received");
+ }
+
+ if (!result)
+ {
+ ROS_ERROR("Unable to retrieve controller joint names from control query service");
+ return false;
+ }
+
+ joint_names = res_query.jointnames;
+
+ // make sure we have the right joint names
+ for(unsigned int i = 0; i < joint_names.size() ; ++i)
+ {
+ if (planning_models::KinematicModel::Joint *j = planningMonitor_->getKinematicModel()->getJoint(joint_names[i]))
+ {
+ ROS_DEBUG("Using joing '%s' with %u parameters", j->name.c_str(), j->usedParams);
+ if (planningMonitor_->getKinematicModel()->getJointIndexInGroup(j->name, group_) < 0)
+ return false;
+ }
+ else
+ {
+ ROS_ERROR("Joint '%s' is not known", joint_names[i].c_str());
+ return false;
+ }
+ }
+
+ std::vector<std::string> groupNames;
+ planningMonitor_->getKinematicModel()->getJointsInGroup(groupNames, group_);
+ if (groupNames.size() != joint_names.size())
+ {
+ ROS_ERROR("The group '%s' does not have the same number of joints as the controller can handle", group_.c_str());
+ return false;
+ }
+
+ return true;
+ }
+
+ ros::NodeHandle nodeHandle_;
+ tf::TransformListener tf_;
+ planning_environment::CollisionModels *collisionModels_;
+ planning_environment::PlanningMonitor *planningMonitor_;
+
+ std::string group_;
+ std::vector<std::string> groupJointNames_;
+ bool perform_ik_;
+ bool show_collisions_;
+
+};
+
+}
+
+#endif
Modified: pkg/trunk/highlevel/move_arm/launch/move_rarm.launch
===================================================================
--- pkg/trunk/highlevel/move_arm/launch/move_rarm.launch 2009-08-13 01:35:58 UTC (rev 21753)
+++ pkg/trunk/highlevel/move_arm/launch/move_rarm.launch 2009-08-13 01:57:33 UTC (rev 21754)
@@ -23,7 +23,7 @@
<param name="refresh_interval_kinematic_state" type="double" value="1.0" />
<param name="bounding_planes" type="string" value="0 0 1 -0.01" />
</node>
-
+<!--
<include file="$(find move_arm)/launch/gripper_rarm.launch" />
-
+ -->
</launch>
Modified: pkg/trunk/highlevel/move_arm/manifest.xml
===================================================================
--- pkg/trunk/highlevel/move_arm/manifest.xml 2009-08-13 01:35:58 UTC (rev 21753)
+++ pkg/trunk/highlevel/move_arm/manifest.xml 2009-08-13 01:57:33 UTC (rev 21754)
@@ -20,8 +20,7 @@
<depend package="geometric_shapes" />
<depend package="planning_models" />
<depend package="planning_environment" />
- <depend package="robot_actions"/>
- <depend package="pr2_robot_actions"/>
+ <depend package="actionlib"/>
<depend package="pr2_mechanism_controllers"/>
<export>
Added: pkg/trunk/highlevel/move_arm/msg/ActuateGripperAction.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/ActuateGripperAction.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/ActuateGripperAction.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,4 @@
+
+ActuateGripperActionGoal action_goal
+ActuateGripperActionResult action_result
+ActuateGripperActionFeedback action_feedback
Added: pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionFeedback.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionFeedback.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionFeedback.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,4 @@
+
+Header header
+actionlib/GoalStatus status
+ActuateGripperFeedback feedback
Added: pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionGoal.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionGoal.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionGoal.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,4 @@
+
+Header header
+actionlib/GoalID goal_id
+ActuateGripperGoal goal
Added: pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionResult.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionResult.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/ActuateGripperActionResult.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,4 @@
+
+Header header
+actionlib/GoalStatus status
+ActuateGripperResult result
Added: pkg/trunk/highlevel/move_arm/msg/ActuateGripperFeedback.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/ActuateGripperFeedback.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/ActuateGripperFeedback.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,2 @@
+float64 crap
+
Added: pkg/trunk/highlevel/move_arm/msg/ActuateGripperGoal.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/ActuateGripperGoal.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/ActuateGripperGoal.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1 @@
+float64 data
Added: pkg/trunk/highlevel/move_arm/msg/ActuateGripperResult.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/ActuateGripperResult.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/ActuateGripperResult.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1 @@
+float64 crap
Added: pkg/trunk/highlevel/move_arm/msg/MoveArmAction.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmAction.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmAction.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,4 @@
+
+MoveArmActionGoal action_goal
+MoveArmActionResult action_result
+MoveArmActionFeedback action_feedback
Added: pkg/trunk/highlevel/move_arm/msg/MoveArmActionFeedback.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmActionFeedback.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmActionFeedback.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,4 @@
+
+Header header
+actionlib/GoalStatus status
+MoveArmFeedback feedback
Added: pkg/trunk/highlevel/move_arm/msg/MoveArmActionGoal.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmActionGoal.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmActionGoal.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,4 @@
+
+Header header
+actionlib/GoalID goal_id
+MoveArmGoal goal
Added: pkg/trunk/highlevel/move_arm/msg/MoveArmActionResult.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmActionResult.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmActionResult.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,4 @@
+
+Header header
+actionlib/GoalStatus status
+MoveArmResult result
Added: pkg/trunk/highlevel/move_arm/msg/MoveArmFeedback.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmFeedback.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmFeedback.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -0,0 +1,6 @@
+int32 mode
+int32 PLANNING=1
+int32 MOVING=2
+
+duration time_to_completion
+
Modified: pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg 2009-08-13 01:35:58 UTC (rev 21753)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -1,3 +1,4 @@
+
# The goal state for the model to plan for. The state is not necessarily explicit.
# The goal is considered achieved if all the constraints are satisfied.
# An explicit state can be specified by setting joint constraints to a specific value.
Deleted: pkg/trunk/highlevel/move_arm/msg/MoveArmState.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmState.msg 2009-08-13 01:35:58 UTC (rev 21753)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmState.msg 2009-08-13 01:57:33 UTC (rev 21754)
@@ -1,9 +0,0 @@
-# Status
-robot_actions/ActionStatus status
-
-MoveArmGoal goal
-
-int32 PLANNING=1 # when arm is stopped and planning is being performed
-int32 MOVING=2 # when we are executing a plan
-
-int32 feedback
Modified: pkg/trunk/highlevel/move_arm/src/actuate_gripper_action.cpp
===================================================================
--- pkg/trunk/highlevel/move_arm/src/actuate_gripper_action.cpp 2009-08-13 01:35:58 UTC (rev 21753)
+++ pkg/trunk/highlevel/move_arm/src/actuate_gripper_action.cpp 2009-08-13 01:57:33 UTC (rev 21754)
@@ -1,13 +1,13 @@
/*********************************************************************
* 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
@@ -17,7 +17,7 @@
* * Neither the name of 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
@@ -34,81 +34,74 @@
/* Author: Sachin Chitta */
-#include "pr2_robot_actions/ActuateGripperState.h"
-#include "std_msgs/Float64.h"
-
-/** Actions and messages */
-#include <robot_actions/action.h>
-#include <robot_actions/action_runner.h>
-
#include <ros/ros.h>
-class ActuateGripperAction : public robot_actions::Action<std_msgs::Float64, std_msgs::Float64>
+#include <actionlib/server/single_goal_action_server.h>
+#include <move_arm/ActuateGripperAction.h>
+#include <std_msgs/Float64.h>
+
+class ActuateGripperAction
{
-public:
-
- ActuateGripperAction(const std::string &arm) : robot_actions::Action<std_msgs::Float64, std_msgs::Float64>("actuate_gripper_" + arm)
+public:
+
+ ActuateGripperAction(const std::string &arm) : as_(nh_, "actuate_gripper_" + arm, boost::bind(&ActuateGripperAction::execute, this, _1))
+ {
+ pub_ = nh_.advertise<std_msgs::Float64>("gripper_command", 10);
+ }
+
+ ~ActuateGripperAction(void)
+ {
+ }
+
+ void execute(const move_arm::ActuateGripperGoalConstPtr &goal)
+ {
+ std_msgs::Float64 gripper_msg;
+ gripper_msg.data = goal->data;
+ pub_.publish(gripper_msg);
+
+ ros::Rate r(10.0);
+ ros::Time start = ros::Time::now();
+ bool result = true;
+ while(ros::Time::now()-start < ros::Duration(4.0))
{
- pub_ = nh_.advertise<std_msgs::Float64>("gripper_command", 10);
+ if (as_.isPreemptRequested())
+ {
+ gripper_msg.data = 0.0;
+ pub_.publish(gripper_msg);
+ ROS_INFO("ActuateGripperAction: preempted");
+ as_.setPreempted();
+ result = false;
+ break;
+ }
+ r.sleep();
}
-
- ~ActuateGripperAction(void)
- {
- }
-
- robot_actions::ResultStatus execute(const std_msgs::Float64& goal, std_msgs::Float64& feedback)
- {
- ROS_INFO("ActuateGripperAction: execute");
-
- // set default feedback
- feedback.data = goal.data;
-
- std_msgs::Float64 gripper_msg;
- gripper_msg.data = goal.data;
- pub_.publish(gripper_msg);
-
- ros::Rate r(10.0);
- ros::Time start = ros::Time::now();
-
- while(ros::Time::now()-start < ros::Duration(4.0))
- {
- if (isPreemptRequested()) {
- gripper_msg.data = 0.0;
- pub_.publish(gripper_msg);
- ROS_INFO("ActuateGripperAction: preempted");
- return robot_actions::PREEMPTED;
- }
- r.sleep();
- }
- ROS_INFO("ActuateGripperAction: Done");
- return robot_actions::SUCCESS;
- }
+ if (result)
+ as_.setSucceeded();
+ }
protected:
-
- ros::Publisher pub_;
- ros::NodeHandle nh_;
-
+
+ ros::NodeHandle nh_;
+ actionlib::SingleGoalActionServer<move_arm::ActuateGripperAction> as_;
+ ros::Publisher pub_;
+
};
int main(int argc, char** argv)
{
- ros::init(argc, argv, "actuate_gripper", ros::init_options::AnonymousName);
+ ros::init(argc, argv, "actuate_gripper");
- ros::NodeHandle node;
- std::string arm_name;
- node.param<std::string>("~arm", arm_name, std::string());
-
- if (arm_name.empty())
- ROS_ERROR("No '~arm' parameter specified");
- else
- {
- ActuateGripperAction actuate_gripper(arm_name);
- robot_actions::ActionRunner runner(20.0);
- runner.connect<std_msgs::Float64, pr2_robot_actions::ActuateGripperState, std_msgs::Float64>(actuate_gripper);
- runner.run();
- ros::spin();
- }
-
- return 0;
+ ros::NodeHandle node;
+ std::string arm_name;
+ node.param<std::string>("~arm", arm_name, std::string());
+
+ if (arm_name.empty())
+ ROS_ERROR("No '~arm' parameter specified");
+ else
+ {
+ ActuateGripperAction actuate_gripper(arm_name);
+ ros::spin();
+ }
+
+ return 0;
}
Modified: pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp
===================================================================
--- pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp 2009-08-13 01:35:58 UTC (rev 21753)
+++ pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp 2009-08-13 01:57:33 UTC (rev 21754)
@@ -1,13 +1,13 @@
/*********************************************************************
* 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
@@ -17,7 +17,7 @@
* * Neither the name of 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
@@ -37,14 +37,13 @@
/* \author: Ioan Sucan */
#include <ros/ros.h>
-#include <robot_actions/action_client.h>
+#include <actionlib/client/simple_action_client.h>
#include <planning_environment/monitors/kinematic_model_state_monitor.h>
#include <motion_planning_msgs/KinematicPath.h>
#include <manipulation_srvs/IKService.h>
-#include <move_arm/MoveArmGoal.h>
-#include <move_arm/MoveArmState.h>
-#include <pr2_robot_actions/ActuateGripperState.h>
+#include <move_arm/MoveArmAction.h>
+#include <move_arm/ActuateGripperAction.h>
#include <std_msgs/Float64.h>
#include <boost/thread/thread.hpp>
@@ -85,7 +84,7 @@
void printJoints(const planning_environment::KinematicModelStateMonitor &km, const std::vector<std::string> &names)
{
const planning_models::KinematicModel::ModelInfo &mi = km.getKinematicModel()->getModelInfo();
-
+
for (unsigned int i = 0 ; i < names.size(); ++i)
{
int idx = km.getKinematicModel()->getJointIndex(names[i]);
@@ -101,7 +100,7 @@
}
void goalToState(const move_arm::MoveArmGoal &goal, planning_models::StateParams &sp)
-{
+{
for (unsigned int i = 0 ; i < goal.goal_constraints.joint_constraint.size() ; ++i)
{
sp.setParamsJoint(&goal.goal_constraints.joint_constraint[i].value[0],
@@ -149,7 +148,7 @@
goal.contacts[0].links.push_back("r_gripper_l_finger_link");
goal.contacts[0].links.push_back("r_gripper_r_finger_link");
goal.contacts[0].links.push_back("r_gripper_l_finger_tip_link");
- goal.contacts[0].links.push_back("r_gripper_r_finger_tip_link");
+ goal.contacts[0].links.push_back("r_gripper_r_finger_tip_link");
goal.contacts[0].links.push_back("r_gripper_palm_link");
goal.contacts[0].depth = 0.04;
goal.contacts[0].bound.type = mapping_msgs::Object::SPHERE;
@@ -158,9 +157,9 @@
goal.contacts[0].pose.header.stamp = ros::Time::now();
goal.contacts[0].pose.header.frame_id = "/base_link";
goal.contacts[0].pose.pose.position.x = 1;
- goal.contacts[0].pose.pose.position.y = 0;
- goal.contacts[0].pose.pose.position.z = 0.5;
-
+ goal.contacts[0].pose.pose.position.y = 0;
+ goal.contacts[0].pose.pose.position.z = 0.5;
+
goal.contacts[0].pose.pose.orientation.x = 0;
goal.contacts[0].pose.pose.orientation.y = 0;
goal.contacts[0].pose.pose.orientation.z = 0;
@@ -170,33 +169,33 @@
void setupGoalEEf(const std::string &link, const std::vector<double> &pz, move_arm::MoveArmGoal &goal)
{
goal.goal_constraints.pose_constraint.resize(1);
- goal.goal_constraints.pose_constraint[0].type = motion_planning_msgs::PoseConstraint::POSITION_X + motion_planning_msgs::PoseConstraint::POSITION_Y + motion_planning_msgs::PoseConstraint::POSITION_Z +
+ goal.goal_constraints.pose_constraint[0].type = motion_planning_msgs::PoseConstraint::POSITION_X + motion_planning_msgs::PoseConstraint::POSITION_Y + motion_planning_msgs::PoseConstraint::POSITION_Z +
+ motion_planning_msgs::PoseConstraint::ORIENTATION_R + motion_planning_msgs::PoseConstraint::ORIENTATION_P + motion_planning_msgs::PoseConstraint::ORIENTATION_Y;
goal.goal_constraints.pose_constraint[0].link_name = link;
goal.goal_constraints.pose_constraint[0].pose.header.stamp = ros::Time::now();
goal.goal_constraints.pose_constraint[0].pose.header.frame_id = "/base_link";
goal.goal_constraints.pose_constraint[0].pose.pose.position.x = pz[0];
- goal.goal_constraints.pose_constraint[0].pose.pose.position.y = pz[1];
- goal.goal_constraints.pose_constraint[0].pose.pose.position.z = pz[2];
-
+ goal.goal_constraints.pose_constraint[0].pose.pose.position.y = pz[1];
+ goal.goal_constraints.pose_constraint[0].pose.pose.position.z = pz[2];
+
goal.goal_constraints.pose_constraint[0].pose.pose.orientation.x = pz[3];
goal.goal_constraints.pose_constraint[0].pose.pose.orientation.y = pz[4];
goal.goal_constraints.pose_constraint[0].pose.pose.orientation.z = pz[5];
goal.goal_constraints.pose_constraint[0].pose.pose.orientation.w = pz[6];
-
+
goal.goal_constraints.pose_constraint[0].position_tolerance_above.x = 0.005;
goal.goal_constraints.pose_constraint[0].position_tolerance_above.y = 0.005;
goal.goal_constraints.pose_constraint[0].position_tolerance_above.z = 0.01;
goal.goal_constraints.pose_constraint[0].position_tolerance_below.x = 0.005;
goal.goal_constraints.pose_constraint[0].position_tolerance_below.y = 0.005;
goal.goal_constraints.pose_constraint[0].position_tolerance_below...
[truncated message content] |
|
From: <vij...@us...> - 2009-08-13 04:45:41
|
Revision: 21770
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21770&view=rev
Author: vijaypradeep
Date: 2009-08-13 04:45:31 +0000 (Thu, 13 Aug 2009)
Log Message:
-----------
Adding waitForActionServerToStart call
Modified Paths:
--------------
pkg/trunk/sandbox/move_base_client/src/move_base_client.cpp
pkg/trunk/stacks/common/actionlib/include/actionlib/client/action_client.h
pkg/trunk/stacks/common/actionlib/include/actionlib/client/simple_action_client.h
Modified: pkg/trunk/sandbox/move_base_client/src/move_base_client.cpp
===================================================================
--- pkg/trunk/sandbox/move_base_client/src/move_base_client.cpp 2009-08-13 04:45:08 UTC (rev 21769)
+++ pkg/trunk/sandbox/move_base_client/src/move_base_client.cpp 2009-08-13 04:45:31 UTC (rev 21770)
@@ -62,9 +62,15 @@
ROS_INFO("Got Feedback!");
}
-void spinThread()
+
+void spinThread(ros::NodeHandle* n)
{
- ros::spin();
+ // I can't figure out how to cleanly exit ros::spin(), so I made this hack instead
+ while(n->ok())
+ {
+ ros::spinOnce();
+ usleep(10);
+ }
}
int main(int argc, char** argv)
@@ -73,19 +79,26 @@
ros::NodeHandle n;
- boost::thread spinthread = boost::thread(boost::bind(&spinThread)) ;
+ boost::thread spinthread = boost::thread(boost::bind(&spinThread, &n)) ;
MoveBaseClient ac("move_base");
- //ros::Duration sleep_duration = ros::Duration().fromSec(1.0);
- //sleep_duration.sleep();
- sleep(2.0);
+ ROS_INFO("Waiting for action server to start");
+ if (ac.waitForActionServerToStart( ros::Duration(10,0)))
+ ROS_INFO("Connected to action server");
+ else
+ {
+ ROS_ERROR("Timed out waiting for action server");
+ n.shutdown();
+ spinthread.join();
+ return 0;
+ }
MoveBaseGoal goal;
ActionClient<MoveBaseAction>::GoalHandle gh = ac.sendGoal(goal, &transitionCallback, &feedbackCallback);
- sleep(1.0);
+ sleep(3.0);
gh.cancel();
@@ -105,8 +118,8 @@
while(n.ok())
sleep(.1);
- sleep(3);
+ n.shutdown();
+ spinthread.join();
-
return 0;
}
Modified: pkg/trunk/stacks/common/actionlib/include/actionlib/client/action_client.h
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/client/action_client.h 2009-08-13 04:45:08 UTC (rev 21769)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/client/action_client.h 2009-08-13 04:45:31 UTC (rev 21770)
@@ -35,6 +35,8 @@
#ifndef ACTIONLIB_ACTION_CLIENT_H_
#define ACTIONLIB_ACTION_CLIENT_H_
+#include <boost/thread/condition.hpp>
+
#include "ros/ros.h"
#include "actionlib/client/client_helpers.h"
@@ -129,6 +131,46 @@
goal_pub_.publish(cancel_msg);
}
+ /**
+ * \brief Waits for the ActionServer to connect to this client
+ * Often, it can take a second for the action server & client to negotiate
+ * a connection, thus, risking the first few goals to be dropped. This call lets
+ * the user wait until the network connection to the server is negotiated
+ */
+ bool waitForActionServerToStart(const ros::Duration& timeout = ros::Duration(0,0) )
+ {
+ if (timeout < ros::Duration(0,0))
+ ROS_WARN("Timeouts can't be negative. Timeout is [%.2fs]", timeout.toSec());
+
+ ros::Time timeout_time = ros::Time::now() + timeout;
+
+ boost::mutex::scoped_lock lock(server_connection_mutex_);
+
+ if (server_connected_)
+ return true;
+
+ // Hardcode how often we check for node.ok()
+ ros::Duration loop_period = ros::Duration().fromSec(.1);
+
+ while (n_.ok() && !server_connected_)
+ {
+ // Determine how long we should wait
+ ros::Duration time_left = timeout_time - ros::Time::now();
+
+ // Check if we're past the timeout time
+ if (timeout != ros::Duration(0,0) && time_left <= ros::Duration(0,0) )
+ break;
+
+ // Truncate the time left
+ if (time_left > loop_period)
+ time_left = loop_period;
+
+ server_connection_condition_.timed_wait(lock, boost::posix_time::milliseconds(time_left.toSec() * 1000.0f));
+ }
+
+ return server_connected_;
+ }
+
private:
ros::NodeHandle n_;
@@ -140,6 +182,10 @@
GoalManager<ActionSpec> manager_;
+ boost::mutex server_connection_mutex_;
+ boost::condition server_connection_condition_;
+ bool server_connected_;
+
void sendGoalFunc(const ActionGoalConstPtr& action_goal)
{
goal_pub_.publish(action_goal);
@@ -153,7 +199,8 @@
void initClient()
{
// Start publishers and subscribers
- goal_pub_ = n_.advertise<ActionGoal>("goal", 1, true);
+ server_connected_ = false;
+ goal_pub_ = n_.advertise<ActionGoal>("goal", 1, boost::bind(&ActionClient::serverConnectionCb, this, _1));
cancel_pub_ = n_.advertise<GoalID>("cancel", 1, true);
manager_.registerSendGoalFunc(boost::bind(&ActionClientT::sendGoalFunc, this, _1));
manager_.registerCancelFunc(boost::bind(&ActionClientT::sendCancelFunc, this, _1));
@@ -177,6 +224,13 @@
{
manager_.updateResults(action_result);
}
+
+ void serverConnectionCb(const ros::SingleSubscriberPublisher& pub)
+ {
+ boost::mutex::scoped_lock lock(server_connection_mutex_);
+ server_connected_ = true;
+ server_connection_condition_.notify_all();
+ }
};
Modified: pkg/trunk/stacks/common/actionlib/include/actionlib/client/simple_action_client.h
===================================================================
--- pkg/trunk/stacks/common/actionlib/include/actionlib/client/simple_action_client.h 2009-08-13 04:45:08 UTC (rev 21769)
+++ pkg/trunk/stacks/common/actionlib/include/actionlib/client/simple_action_client.h 2009-08-13 04:45:31 UTC (rev 21770)
@@ -91,6 +91,13 @@
}
/**
+ * \brief Blocks until the action server connects to this client
+ * \param timeout Max time to block before returning. A zero timeout is interpreted as an infinite timeout.
+ * \return True if the server connected in the allocated time. False on timeout
+ */
+ bool waitForActionServerToStart(const ros::Duration& timeout = ros::Duration(0,0) ) { return ac_.waitForActionServerToStart(timeout); }
+
+ /**
* \brief Sends a goal to the ActionServer, and also registers callbacks
*
* If a previous goal is already active when this is called. We simply forget
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2009-08-13 04:57:30
|
Revision: 21772
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21772&view=rev
Author: mariusmuja
Date: 2009-08-13 04:57:13 +0000 (Thu, 13 Aug 2009)
Log Message:
-----------
Changes to chamfer matching
Modified Paths:
--------------
pkg/trunk/sandbox/descriptors_2d/src/descriptors_2d.cpp
pkg/trunk/vision/chamfer_matching/CMakeLists.txt
pkg/trunk/vision/chamfer_matching/include/chamfer_matching/chamfer_matching.h
pkg/trunk/vision/chamfer_matching/manifest.xml
pkg/trunk/vision/chamfer_matching/src/chamfer_matching.cpp
pkg/trunk/vision/recognition_lambertian/CMakeLists.txt
Modified: pkg/trunk/sandbox/descriptors_2d/src/descriptors_2d.cpp
===================================================================
--- pkg/trunk/sandbox/descriptors_2d/src/descriptors_2d.cpp 2009-08-13 04:55:20 UTC (rev 21771)
+++ pkg/trunk/sandbox/descriptors_2d/src/descriptors_2d.cpp 2009-08-13 04:57:13 UTC (rev 21772)
@@ -716,15 +716,15 @@
IplImage *edge_img = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
cvCvtColor(img, edge_img, CV_BGR2GRAY);
cvCanny(edge_img, edge_img, 80, 160);
- *matches_ = chamfer_->matchEdgeImage(edge_img);
+ *matches_ = chamfer_->matchEdgeImage(edge_img, SlidingWindowImageRange(edge_img->width, edge_img->height));
if(debug_) {
//IplImage* vis = cvCloneImage(edge_img);
IplImage* vis = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 3);
- cvCvtColor(edge_img, vis, CV_GRAY2BGR);
+ cvCvtColor(edge_img, vis, CV_GRAY2RGB);
matches_->show(vis, 100000);
CVSHOW("vis", vis);
- CVSHOW("edge", edge_img);
+// CVSHOW("edge", edge_img);
cvWaitKey(0);
cvReleaseImage(&vis);
}
Modified: pkg/trunk/vision/chamfer_matching/CMakeLists.txt
===================================================================
--- pkg/trunk/vision/chamfer_matching/CMakeLists.txt 2009-08-13 04:55:20 UTC (rev 21771)
+++ pkg/trunk/vision/chamfer_matching/CMakeLists.txt 2009-08-13 04:57:13 UTC (rev 21772)
@@ -4,4 +4,14 @@
set(ROS_BUILD_TYPE RelWithDebInfo)
rospack(chamfer_matching)
-rospack_add_library(chamfer_matching src/chamfer_matching.cpp)
\ No newline at end of file
+rospack_add_library(chamfer_matching src/chamfer_matching.cpp)
+
+rospack_add_executable(test_chamfer src/test_chamfer.cpp)
+target_link_libraries(test_chamfer chamfer_matching)
+
+rospack_add_executable(test_chamfer2 src/test_chamfer2.cpp)
+target_link_libraries(test_chamfer2 chamfer_matching)
+
+
+rospack_add_executable(test_iterator src/test_iterator.cpp)
+target_link_libraries(test_iterator chamfer_matching)
Modified: pkg/trunk/vision/chamfer_matching/include/chamfer_matching/chamfer_matching.h
===================================================================
--- pkg/trunk/vision/chamfer_matching/include/chamfer_matching/chamfer_matching.h 2009-08-13 04:55:20 UTC (rev 21771)
+++ pkg/trunk/vision/chamfer_matching/include/chamfer_matching/chamfer_matching.h 2009-08-13 04:57:13 UTC (rev 21772)
@@ -69,44 +69,128 @@
void findContourOrientations(const template_coords_t& coords, template_orientations_t& orientations);
+///////////////////////// Image iterators ////////////////////////////
+typedef pair<CvPoint, float> location_scale_t;
+
+
+class ImageIterator
+{
+public:
+ virtual bool hasNext() const = 0;
+ virtual location_scale_t next() = 0;
+};
+
+class ImageRange
+{
+public:
+ virtual ImageIterator* iterator() const = 0;
+};
+
+
+// Sliding window
+
+class SlidingWindowImageRange : public ImageRange
+{
+ int width_;
+ int height_;
+ int x_step_;
+ int y_step_;
+ int scales_;
+ float min_scale_;
+ float max_scale_;
+
+public:
+ SlidingWindowImageRange(int width, int height, int x_step = 3, int y_step = 3, int scales = 5, float min_scale = 0.6, float max_scale = 1.6) :
+ width_(width), height_(height), x_step_(x_step),y_step_(y_step), scales_(scales), min_scale_(min_scale), max_scale_(max_scale)
+ {
+ }
+
+ ImageIterator* iterator() const;
+};
+
+class LocationImageRange : public ImageRange
+{
+ const vector<CvPoint>& locations_;
+
+ int scales_;
+ float min_scale_;
+ float max_scale_;
+
+public:
+ LocationImageRange(const vector<CvPoint>& locations, int scales = 5, float min_scale = 0.6, float max_scale = 1.6) :
+ locations_(locations), scales_(scales), min_scale_(min_scale), max_scale_(max_scale)
+ {
+ }
+
+ ImageIterator* iterator() const;
+};
+
+
+class LocationScaleImageRange : public ImageRange
+{
+ const vector<CvPoint>& locations_;
+ const vector<float>& scales_;
+
+public:
+ LocationScaleImageRange(const vector<CvPoint>& locations, const vector<float>& scales) :
+ locations_(locations), scales_(scales)
+ {
+ assert(locations.size()==scales.size());
+ }
+
+ ImageIterator* iterator() const;
+};
+
+
+
+
/**
* Class that represents a template for chamfer matching.
*/
class ChamferTemplate
{
+ vector<ChamferTemplate*> scaled_templates;
+ vector<int> addr;
+ int addr_width;
public:
template_coords_t coords;
template_orientations_t orientations;
CvSize size;
CvPoint center;
- float template_scale; // pixels per meter
+ float scale;
- ChamferTemplate()
+ ChamferTemplate() : addr_width(-1)
{
}
- ChamferTemplate(IplImage* edge_image, float scale = -1);
+ ChamferTemplate(IplImage* edge_image, float scale_ = 1);
+ ~ChamferTemplate()
+ {
+ for (size_t i=0;i<scaled_templates.size();++i) {
+ delete scaled_templates[i];
+ }
+ }
+ vector<int>& getTemplateAddresses(int width);
/**
* Resizes a template
*
* @param scale Scale to be resized to
*/
- void rescale(float scale);
+ ChamferTemplate* rescale(float scale);
void show() const;
-private:
- void computeCenter();
};
-const int MAX_MATCHES = 20;
+const int MAX_MATCHES = 2;
+
/**
* Used to represent a matching result.
*/
@@ -119,6 +203,8 @@
float cost;
CvPoint offset;
const ChamferTemplate* tpl;
+ vector<float> costs;
+ vector<int> img_offs;
};
// int max_matches;
@@ -141,7 +227,7 @@
matches.resize(MAX_MATCHES);
}
- void addMatch(float cost, CvPoint offset, const ChamferTemplate& tpl);
+ void addMatch(float cost, CvPoint offset, ChamferTemplate* tpl, const vector<int>& addr, const vector<float>& costs);
void show(IplImage* img, int matches_no);
};
@@ -156,20 +242,13 @@
*/
class ChamferMatching
{
- float min_scale;
- float max_scale;
- int count_scale;
- float truncate;
+ float truncate_;
+ bool use_orientation_;
-
vector<ChamferTemplate*> templates;
- vector<CvPoint> candidate_locations;
-
public:
- ChamferMatching(bool use_orientation_ = false) : min_scale(0.5), max_scale(1.5), count_scale(5),
- truncate(20)
+ ChamferMatching(bool use_orientation = true, float truncate = 20) : truncate_(truncate), use_orientation_(use_orientation)
{
-
}
~ChamferMatching()
@@ -183,81 +262,19 @@
* Add a template to the detector from an edge image.
* @param templ An edge image
*/
- void addTemplateFromImage(IplImage* templ);
- void addTemplateFromImage(IplImage* templ, float real_height);
+ void addTemplateFromImage(IplImage* templ, float scale = 1.0);
-
/**
- * In case we know where the object might be, we can add those locations to
- * speedup the search. Otherwise a classic sliding-window search will be
- * performed over the entire image.
- *
- * @param locations
- */
- void addCandidateLocations(const vector<CvPoint>& locations)
- {
- candidate_locations = locations;
- }
-
- /**
- * Run matching usin an edge image.
+ * Run matching using an edge image.
* @param edge_img Edge image
* @return a match object
*/
- ChamferMatch matchEdgeImage(IplImage* edge_img);
+ ChamferMatch matchEdgeImage(IplImage* edge_img, const ImageRange& range, float orientation_weight = 0.5);
- ChamferMatch matchEdgeImage(IplImage* edge_img, const vector<CvPoint>& locations, const vector<float>& scales);
-
- /**
- * Run matching using a regular image.
- *
- * Will run Canny edge detection and then the edge matching.
- * @param img
- * @param high_threshold The high edge threshold to use in Canny edge detector.
- * @param low_threshold The low edge threshold to use in Canny edge detector. If default (-1) is used it's computed as high_threshold/2.
- * @return a match object
- */
- ChamferMatch matchImage(IplImage* img, int high_threshold = 160, int low_threshold = -1);
-
private:
-
-
-
- /**
- * Computes annotated distance transform.
- *
- * @param edges_img Edge image.
- * @param dist_img Distance image, each pixel represents the distance to the nearest edge.
- * @param annotate_img Two channel int image, each 'pixel' represents the coordinate of the nearest edge.
- * @param orientation_img Orientation image, should contain the orientations of each edge pixel. Only pixels with
- * valid orientations are processed in the distance transform.
- * @param truncate Value to truncate the distance transform to, no value bigger than this is allowed in the output.
- * This helps when the contours of objects are interrupted, so we don't penalize the gaps too much.
- * @param a Horizontal distance.
- * @param b Diagonal distance.
- */
- void computeDistanceTransform(IplImage* edges_img, IplImage* dist_img, IplImage* annotate_img, IplImage* orientation_img, float truncate = -1, float a = 1.0, float b = 1.5 );
-
-
/**
- * Computes teh orientations of edges in an edge image,
- * @param edge_img Edge image
- * @param orientation_img Image of same size as edge image that will be filed in with the orientations of each edge pixel in the edge image.
- */
- void computeEdgeOrientations(IplImage* edge_img, IplImage* orientation_img);
-
-
- /**
- * For each non-edge pixels sets it's orientation the same with the closest edge pixel.
- * @param annotated_img
- * @param orientation_img
- */
- void fillNonContourOrientations(IplImage* annotated_img, IplImage* orientation_img);
-
-
- /**
* Computes the chamfer matching cost for one position in the target image.
* @param dist_img Distance transform image.
* @param orientation_img Orientation image.
@@ -267,40 +284,19 @@
* @param alpha Weighting between distance cost and orientation cost.
* @return Chamfer matching cost
*/
- float localChamferDistance(IplImage* dist_img, IplImage* orientation_img, const vector<int>& templ_addr, const vector<float>& templ_orientations, CvPoint offset, float alpha = 0.5);
+ void localChamferDistance(CvPoint offset, IplImage* dist_img, IplImage* orientation_img, ChamferTemplate* tpl, ChamferMatch& cm, float orientation_weight);
-
/**
- * Matches a template throughout an image.
- * @param dist_img Distance transform image.
- * @param orientation_img Orientation image.
- * @param tpl Template to match
- * @param cm Matching result
- */
- void matchTemplate(IplImage* dist_img, IplImage* orientation_img, const ChamferTemplate& tpl, ChamferMatch& cm);
-
-
- /**
* Matches all templates.
* @param dist_img Distance transform image.
* @param orientation_img Orientation image.
* @param cm Matching result
*/
- void matchTemplates(IplImage* dist_img, IplImage* orientation_img, ChamferMatch& cm);
+ void matchTemplates(IplImage* dist_img, IplImage* orientation_img, ChamferMatch& cm, const ImageRange& range, float orientation_weight);
- void matchTemplates(IplImage* dist_img, IplImage* orientation_img, ChamferMatch& cm, const vector<CvPoint>& locations, const vector<float>& scales);
-
-// void getMatches();
-
-
};
-
-
-
-
-
#endif /* CHAMFER_MATCHING_H_ */
Modified: pkg/trunk/vision/chamfer_matching/manifest.xml
===================================================================
--- pkg/trunk/vision/chamfer_matching/manifest.xml 2009-08-13 04:55:20 UTC (rev 21771)
+++ pkg/trunk/vision/chamfer_matching/manifest.xml 2009-08-13 04:57:13 UTC (rev 21772)
@@ -3,7 +3,7 @@
A chamfer matching library, using both edge distance and orientation.
</description>
- <author>Marius MUja</author>
+ <author>Marius Muja</author>
<license>BSD</license>
<url>http://pr.willowgarage.com</url>
<review status="experimental" notes="beta"/>
Modified: pkg/trunk/vision/chamfer_matching/src/chamfer_matching.cpp
===================================================================
--- pkg/trunk/vision/chamfer_matching/src/chamfer_matching.cpp 2009-08-13 04:55:20 UTC (rev 21771)
+++ pkg/trunk/vision/chamfer_matching/src/chamfer_matching.cpp 2009-08-13 04:57:13 UTC (rev 21772)
@@ -1,36 +1,36 @@
/*********************************************************************
- * 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.
- *********************************************************************/
+* 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: Marius Muja
@@ -51,12 +51,201 @@
+
+
+class SlidingWindowImageIterator : public ImageIterator
+{
+ int x_;
+ int y_;
+ float scale_;
+ float scale_step_;
+ int scale_cnt_;
+
+ bool has_next_;
+
+
+ int width_;
+ int height_;
+ int x_step_;
+ int y_step_;
+ int scales_;
+ float min_scale_;
+ float max_scale_;
+
+
+public:
+
+ SlidingWindowImageIterator(int width, int height, int x_step = 3, int y_step = 3, int scales = 5, float min_scale = 0.6, float max_scale = 1.6) :
+ width_(width), height_(height), x_step_(x_step),y_step_(y_step), scales_(scales), min_scale_(min_scale), max_scale_(max_scale)
+ {
+ x_ = 0;
+ y_ = 0;
+ scale_cnt_ = 0;
+ scale_ = min_scale_;
+ has_next_ = true;
+ scale_step_ = (max_scale_-min_scale_)/scales_;
+ }
+
+ bool hasNext() const {
+ return has_next_;
+ }
+
+ location_scale_t next()
+ {
+ location_scale_t next_val = make_pair(cvPoint(x_,y_),scale_);
+
+ x_ += x_step_;
+
+ if (x_ >= width_) {
+ x_ = 0;
+ y_ += y_step_;
+
+ if (y_ >= height_) {
+ y_ = 0;
+ scale_ += scale_step_;
+ scale_cnt_++;
+
+ if (scale_cnt_ == scales_) {
+ has_next_ = false;
+ scale_cnt_ = 0;
+ scale_ = min_scale_;
+ }
+ }
+ }
+
+ return next_val;
+ }
+};
+
+
+ImageIterator* SlidingWindowImageRange::iterator() const
+{
+ return new SlidingWindowImageIterator(width_, height_, x_step_, y_step_, scales_, min_scale_, max_scale_);
+}
+
+
+
+
+class LocationImageIterator : public ImageIterator
+{
+ const vector<CvPoint>& locations_;
+
+ size_t iter_;
+
+ int scales_;
+ float min_scale_;
+ float max_scale_;
+
+ float scale_;
+ float scale_step_;
+ int scale_cnt_;
+
+ bool has_next_;
+
+public:
+ LocationImageIterator(const vector<CvPoint>& locations, int scales = 5, float min_scale = 0.6, float max_scale = 1.6) :
+ locations_(locations), scales_(scales), min_scale_(min_scale), max_scale_(max_scale)
+ {
+ iter_ = 0;
+ scale_cnt_ = 0;
+ scale_ = min_scale_;
+ has_next_ = (locations_.size()==0 ? false : true);
+ scale_step_ = (max_scale_-min_scale_)/scales_;
+ }
+
+ bool hasNext() const {
+ return has_next_;
+ }
+
+ location_scale_t next()
+ {
+ location_scale_t next_val = make_pair(locations_[iter_],scale_);
+
+ iter_ ++;
+ if (iter_==locations_.size()) {
+ iter_ = 0;
+ scale_ += scale_step_;
+ scale_cnt_++;
+
+ if (scale_cnt_ == scales_) {
+ has_next_ = false;
+ scale_cnt_ = 0;
+ scale_ = min_scale_;
+ }
+ }
+
+ return next_val;
+ }
+};
+
+
+ImageIterator* LocationImageRange::iterator() const
+{
+ return new LocationImageIterator(locations_, scales_, min_scale_, max_scale_);
+}
+
+
+
+
+
+class LocationScaleImageIterator : public ImageIterator
+{
+ const vector<CvPoint>& locations_;
+ const vector<float>& scales_;
+
+ size_t iter_;
+
+ bool has_next_;
+
+public:
+ LocationScaleImageIterator(const vector<CvPoint>& locations, const vector<float>& scales) :
+ locations_(locations), scales_(scales)
+ {
+ assert(locations.size()==scales.size());
+ reset();
+ }
+
+ void reset()
+ {
+ iter_ = 0;
+ has_next_ = (locations_.size()==0 ? false : true);
+ }
+
+ bool hasNext() const {
+ return has_next_;
+ }
+
+ location_scale_t next()
+ {
+ location_scale_t next_val = make_pair(locations_[iter_],scales_[iter_]);
+
+ iter_ ++;
+ if (iter_==locations_.size()) {
+ iter_ = 0;
+
+ has_next_ = false;
+ }
+
+ return next_val;
+ }
+};
+
+ImageIterator* LocationScaleImageRange::iterator() const
+{
+ return new LocationScaleImageIterator(locations_, scales_);
+}
+
+
+
+
+
+
/**
- * Finds a point in the image from which to start contour following.
- * @param templ_img
- * @param p
- * @return
- */
+* Finds a point in the image from which to start contour following.
+* @param templ_img
+* @param p
+* @return
+*/
bool findFirstContourPoint(IplImage* templ_img, coordinate_t& p)
{
unsigned char* ptr = (unsigned char*) templ_img->imageData;
@@ -74,30 +263,29 @@
/**
- * Method that extracts a single continuous contour from an image given a starting point.
- * When it extracts the contour it tries to maintain the same direction (at a T-join for example).
- *
- * @param templ_
- * @param coords
- * @param crt
- */
+* Method that extracts a single continuous contour from an image given a starting point.
+* When it extracts the contour it tries to maintain the same direction (at a T-join for example).
+*
+* @param templ_
+* @param coords
+* @param crt
+*/
void followContour(IplImage* templ_img, template_coords_t& coords, int direction = -1)
{
const int dir[][2] = { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} };
coordinate_t next;
coordinate_t next_temp;
unsigned char* ptr;
- unsigned char* ptr_temp;
assert (direction==-1 || !coords.empty());
coordinate_t crt = coords.back();
-// printf("Enter followContour, point: (%d,%d)\n", crt.first, crt.second);
+ // printf("Enter followContour, point: (%d,%d)\n", crt.first, crt.second);
// mark the current pixel as visited
CV_PIXEL(unsigned char, templ_img, crt.first, crt.second)[0] = 0;
if (direction==-1) {
- for (int j = 0 ;j<7; ++j) {
+ for (int j = 0; j<7; ++j) {
next.first = crt.first + dir[j][1];
next.second = crt.second + dir[j][0];
ptr = CV_PIXEL(unsigned char, templ_img, next.first, next.second);
@@ -112,77 +300,57 @@
}
}
else {
- coordinate_t prev = coords.at(coords.size()-2);
int k = direction;
+ int k_cost = 3;
next.first = crt.first + dir[k][1];
next.second = crt.second + dir[k][0];
ptr = CV_PIXEL(unsigned char, templ_img, next.first, next.second);
-
if (*ptr!=0) {
- next_temp.first = crt.first + dir[(k+7)%8][1];
- next_temp.second = crt.second + dir[(k+7)%8][0];
- ptr_temp = CV_PIXEL(unsigned char, templ_img, next_temp.first, next_temp.second);
- if (*ptr_temp!=0) {
- *ptr_temp=0;
- coords.push_back(next_temp);
- }
- next_temp.first = crt.first + dir[(k+1)%8][1];
- next_temp.second = crt.second + dir[(k+1)%8][0];
- ptr_temp = CV_PIXEL(unsigned char, templ_img, next_temp.first, next_temp.second);
- if (*ptr_temp!=0) {
- *ptr_temp=0;
- coords.push_back(next_temp);
- }
- coords.push_back(next);
- followContour(templ_img, coords, k);
- } else {
- int p = k;
- int n = k;
+ k_cost = abs(dir[k][1])+abs(dir[k][0]);
+ }
+ int p = k;
+ int n = k;
- for (int j = 0 ;j<3; ++j) {
- p = (p + 7) % 8;
- n = (n + 1) % 8;
- next.first = crt.first + dir[p][1];
- next.second = crt.second + dir[p][0];
- ptr = CV_PIXEL(unsigned char, templ_img, next.first, next.second);
- if (*ptr!=0) {
- next_temp.first = crt.first + dir[(p+7)%8][1];
- next_temp.second = crt.second + dir[(p+7)%8][0];
- ptr_temp = CV_PIXEL(unsigned char, templ_img, next_temp.first, next_temp.second);
- if (*ptr_temp!=0) {
- *ptr_temp=0;
- coords.push_back(next_temp);
- }
- coords.push_back(next);
- followContour(templ_img, coords, p);
- break;
+ for (int j = 0 ;j<3; ++j) {
+ p = (p + 7) % 8;
+ n = (n + 1) % 8;
+ next.first = crt.first + dir[p][1];
+ next.second = crt.second + dir[p][0];
+ ptr = CV_PIXEL(unsigned char, templ_img, next.first, next.second);
+ if (*ptr!=0) {
+ int p_cost = abs(dir[p][1])+abs(dir[p][0]);
+ if (p_cost<k_cost) {
+ k_cost = p_cost;
+ k = p;
}
- next.first = crt.first + dir[n][1];
- next.second = crt.second + dir[n][0];
- ptr = CV_PIXEL(unsigned char, templ_img, next.first, next.second);
- if (*ptr!=0) {
- next_temp.first = crt.first + dir[(n+1)%8][1];
- next_temp.second = crt.second + dir[(n+1)%8][0];
- ptr_temp = CV_PIXEL(unsigned char, templ_img, next_temp.first, next_temp.second);
- if (*ptr_temp!=0) {
- *ptr_temp=0;
- coords.push_back(next_temp);
- }
- coords.push_back(next);
- followContour(templ_img, coords, n);
- break;
+ }
+ next.first = crt.first + dir[n][1];
+ next.second = crt.second + dir[n][0];
+ ptr = CV_PIXEL(unsigned char, templ_img, next.first, next.second);
+ if (*ptr!=0) {
+ int n_cost = abs(dir[n][1])+abs(dir[n][0]);
+ if (n_cost<k_cost) {
+ k_cost = n_cost;
+ k = n;
}
}
}
+
+ if (k_cost!=3) {
+ next.first = crt.first + dir[k][1];
+ next.second = crt.second + dir[k][0];
+ coords.push_back(next);
+ followContour(templ_img, coords, k);
+ }
}
}
/**
- * Finds a contour in an edge image. The original image is altered by removing the found contour.
- * @param templ_img Edge image
- * @param coords Coordinates forming the contour.
- * @return True while a contour is still found in the image.
- */
+* Finds a contour in an edge image. The original image is altered by removing the found contour.
+* @param templ_img Edge image
+* @param coords Coordinates forming the contour.
+* @return True while a contour is still found in the image.
+*/
bool findContour(IplImage* templ_img, template_coords_t& coords)
{
coordinate_t start_point;
@@ -198,14 +366,14 @@
}
/**
- * Computes the angle of a line segment.
- *
- * @param a One end of te line segment
- * @param b The other end.
- * @param dx
- * @param dy
- * @return Angle in radians.
- */
+* Computes the angle of a line segment.
+*
+* @param a One end of the line segment
+* @param b The other end.
+* @param dx
+* @param dy
+* @return Angle in radians.
+*/
float getAngle(coordinate_t a, coordinate_t b, int& dx, int& dy)
{
@@ -262,7 +430,7 @@
// get the middle two angles
nth_element(angles.begin(), angles.begin()+M-1, angles.end());
nth_element(angles.begin()+M-1, angles.begin()+M, angles.end());
-// sort(angles.begin(), angles.end());
+ // sort(angles.begin(), angles.end());
// average them to compute tangent
orientations[i] = (angles[M-1]+angles[M])/2;
@@ -270,7 +438,10 @@
}
-ChamferTemplate::ChamferTemplate(IplImage* edge_image, float scale) : template_scale(scale)
+
+//////////////////////// ChamferTemplate /////////////////////////////////////
+
+ChamferTemplate::ChamferTemplate(IplImage* edge_image, float scale_) : addr_width(-1), scale(scale_)
{
size = cvGetSize(edge_image);
@@ -286,12 +457,6 @@
local_orientations.clear();
}
- computeCenter();
-}
-
-
-void ChamferTemplate::computeCenter()
-{
center = cvPoint(0,0);
for (size_t i=0;i<coords.size();++i) {
center.x += coords[i].first;
@@ -305,30 +470,65 @@
coords[i].first -= center.x;
coords[i].second -= center.y;
}
+// printf("Template coords\n");
+// for (size_t i=0;i<coords.size();++i) {
+// printf("(%d,%d), ", coords[i].first, coords[i].second);
+// }
+// printf("\n");
}
+
+vector<int>& ChamferTemplate::getTemplateAddresses(int width)
+{
+ if (addr_width!=width) {
+ addr.resize(coords.size());
+ addr_width = width;
+
+ for (size_t i=0; i<coords.size();++i) {
+ addr[i] = coords[i].second*width+coords[i].first;
+ }
+ }
+ return addr;
+}
+
+
/**
- * Resizes a template
- *
- * @param scale Scale to be resized to
- */
-void ChamferTemplate::rescale(float scale)
+* Resizes a template
+*
+* @param scale Scale to be resized to
+*/
+ChamferTemplate* ChamferTemplate::rescale(float new_scale)
{
- if (scale==1) return;
+ if (fabs(scale-new_scale)<1e-6) return this;
- template_scale *= scale;
+ for (size_t i=0;i<scaled_templates.size();++i) {
+ if (fabs(scaled_templates[i]->scale-new_scale)<1e-6) {
+ return scaled_templates[i];
+ }
+ }
- center.x = int(center.x*scale+0.5);
- center.y = int(center.y*scale+0.5);
+ float scale_factor = new_scale/scale;
- size.width = int(size.width*scale+0.5);
- size.height = int(size.height*scale+0.5);
+ ChamferTemplate* tpl = new ChamferTemplate();
+ tpl->scale = new_scale;
+ tpl->center.x = int(center.x*scale_factor+0.5);
+ tpl->center.y = int(center.y*scale_factor+0.5);
+
+ tpl->size.width = int(size.width*scale_factor+0.5);
+ tpl->size.height = int(size.height*scale_factor+0.5);
+
+ tpl->coords.resize(coords.size());
+ tpl->orientations.resize(orientations.size());
for (size_t i=0;i<coords.size();++i) {
- coords[i].first = int(coords[i].first*scale+0.5);
- coords[i].second = int(coords[i].second*scale+0.5);
+ tpl->coords[i].first = int(coords[i].first*scale_factor+0.5);
+ tpl->coords[i].second = int(coords[i].second*scale_factor+0.5);
+ tpl->orientations[i] = orientations[i];
}
+ scaled_templates.push_back(tpl);
+ return tpl;
+
}
@@ -364,151 +564,33 @@
cvNamedWindow("templ",1);
cvShowImage("templ",templ_color);
-// cvWaitKey(0);
+ // cvWaitKey(0);
cvReleaseImage(&templ_color);
}
-// ----------------- ChamferMatching ---------------------
+//////////////////////// ChamferMatching /////////////////////////////////////
-/**
- * Add a template to the detector from an edge image.
- * @param templ An edge image
- */
-void ChamferMatching::addTemplateFromImage(IplImage* templ)
-{
-
- //printf("Template height: %d\n", templ->height);
-// printf("Real height: %f\n", real_height);
-
- ChamferTemplate* cmt = new ChamferTemplate(templ);
-
- for(int i = 0; i < count_scale; ++i) {
- float scale = min_scale + (max_scale - min_scale)*i/count_scale;
-
- ChamferTemplate* cmt_resized = new ChamferTemplate(*cmt);
- cmt_resized->rescale(scale);
-
- templates.push_back(cmt_resized);
- }
-
-// cmt->show();
-}
-
-
void ChamferMatching::addTemplateFromImage(IplImage* templ, float scale)
{
ChamferTemplate* cmt = new ChamferTemplate(templ, scale);
templates.push_back(cmt);
- printf("Added a new template\n");
-
-// for(int i = 0; i < count_scale; ++i) {
-// float scale = min_scale + (max_scale - min_scale)*i/count_scale;
-//
-// ChamferTemplate* cmt_resized = new ChamferTemplate(*cmt);
-// cmt_resized->rescale(scale);
-//
-// templates.push_back(cmt_resized);
-// }
-
-// cmt->show();
+// printf("Added a new template\n");
+ // cmt->show();
}
/**
- * Run matching usin an edge image.
- * @param edge_img Edge image
- * @return a match object
- */
-ChamferMatch ChamferMatching::matchEdgeImage(IplImage* edge_img)
+* Alternative version of computeDistanceTransform, will probably be used to compute distance
+* transform annotated with edge orientation.
+*/
+void computeDistanceTransform(IplImage* edges_img, IplImage* dist_img, IplImage* annotate_img, float truncate_dt, float a = 1.0, float b = 1.5)
...
[truncated message content] |
|
From: <mar...@us...> - 2009-08-13 04:58:17
|
Revision: 21775
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21775&view=rev
Author: mariusmuja
Date: 2009-08-13 04:58:11 +0000 (Thu, 13 Aug 2009)
Log Message:
-----------
Some more refactoring of chamfer matching.
Modified Paths:
--------------
pkg/trunk/sandbox/descriptors_2d/src/descriptors_2d.cpp
pkg/trunk/vision/chamfer_matching/CMakeLists.txt
pkg/trunk/vision/chamfer_matching/include/chamfer_matching/chamfer_matching.h
pkg/trunk/vision/chamfer_matching/src/chamfer_matching.cpp
pkg/trunk/vision/recognition_lambertian/CMakeLists.txt
pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp
Modified: pkg/trunk/sandbox/descriptors_2d/src/descriptors_2d.cpp
===================================================================
--- pkg/trunk/sandbox/descriptors_2d/src/descriptors_2d.cpp 2009-08-13 04:57:41 UTC (rev 21774)
+++ pkg/trunk/sandbox/descriptors_2d/src/descriptors_2d.cpp 2009-08-13 04:58:11 UTC (rev 21775)
@@ -722,7 +722,13 @@
//IplImage* vis = cvCloneImage(edge_img);
IplImage* vis = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 3);
cvCvtColor(edge_img, vis, CV_GRAY2RGB);
- matches_->show(vis, 100000);
+
+ ChamferMatch::ChamferMatches match_instances = matches_->getMatches();
+ for (size_t i = 0; i<match_instances.size();++i) {
+ printf("Match with cost: %g at lcation: (%d,%d)\n", match_instances[i].cost, match_instances[i].offset.x,match_instances[i].offset.y);
+ matches_->showMatch(vis, i);
+ }
+
CVSHOW("vis", vis);
// CVSHOW("edge", edge_img);
cvWaitKey(0);
Modified: pkg/trunk/vision/chamfer_matching/CMakeLists.txt
===================================================================
--- pkg/trunk/vision/chamfer_matching/CMakeLists.txt 2009-08-13 04:57:41 UTC (rev 21774)
+++ pkg/trunk/vision/chamfer_matching/CMakeLists.txt 2009-08-13 04:58:11 UTC (rev 21775)
@@ -5,13 +5,3 @@
rospack(chamfer_matching)
rospack_add_library(chamfer_matching src/chamfer_matching.cpp)
-
-#rospack_add_executable(test_chamfer src/test_chamfer.cpp)
-#target_link_libraries(test_chamfer chamfer_matching)
-
-#rospack_add_executable(test_chamfer2 src/test_chamfer2.cpp)
-#target_link_libraries(test_chamfer2 chamfer_matching)
-
-
-#rospack_add_executable(test_iterator src/test_iterator.cpp)
-#target_link_libraries(test_iterator chamfer_matching)
Modified: pkg/trunk/vision/chamfer_matching/include/chamfer_matching/chamfer_matching.h
===================================================================
--- pkg/trunk/vision/chamfer_matching/include/chamfer_matching/chamfer_matching.h 2009-08-13 04:57:41 UTC (rev 21774)
+++ pkg/trunk/vision/chamfer_matching/include/chamfer_matching/chamfer_matching.h 2009-08-13 04:58:11 UTC (rev 21775)
@@ -189,7 +189,7 @@
-const int MAX_MATCHES = 2;
+//const int MAX_MATCHES = 20;
/**
* Used to represent a matching result.
@@ -197,38 +197,42 @@
class ChamferMatch
{
+ int max_matches_;
+ float min_match_distance_;
+public:
+
+
class ChamferMatchInstance {
public:
float cost;
CvPoint offset;
const ChamferTemplate* tpl;
- vector<float> costs;
- vector<int> img_offs;
+// vector<float> costs;
+// vector<int> img_offs;
};
-// int max_matches;
+ typedef vector<ChamferMatchInstance> ChamferMatches;
+
int count;
- vector<ChamferMatchInstance> matches;
+ ChamferMatches matches;
- struct MatchCenter {
- float x;
- float y;
- int count;
- float cost;
- const ChamferTemplate* tpl;
- };
- vector<MatchCenter> centers;
-
-public:
- ChamferMatch() : count(0)
+ ChamferMatch(int max_matches = 20, float min_match_distance = 10.0) : max_matches_(max_matches),
+ min_match_distance_(min_match_distance), count(0)
{
- matches.resize(MAX_MATCHES);
+ matches.resize(max_matches_);
}
+
+ void showMatch(IplImage* img, int index = 0);
+
+ const ChamferMatches& getMatches() const { return matches; }
+
+private:
void addMatch(float cost, CvPoint offset, ChamferTemplate* tpl, const vector<int>& addr, const vector<float>& costs);
- void show(IplImage* img, int matches_no);
+
+ friend class ChamferMatching;
};
@@ -269,7 +273,7 @@
* @param edge_img Edge image
* @return a match object
*/
- ChamferMatch matchEdgeImage(IplImage* edge_img, const ImageRange& range, float orientation_weight = 0.5);
+ ChamferMatch matchEdgeImage(IplImage* edge_img, const ImageRange& range, float orientation_weight = 0.5, int max_matches = 20, float min_match_distance = 10.0);
private:
Modified: pkg/trunk/vision/chamfer_matching/src/chamfer_matching.cpp
===================================================================
--- pkg/trunk/vision/chamfer_matching/src/chamfer_matching.cpp 2009-08-13 04:57:41 UTC (rev 21774)
+++ pkg/trunk/vision/chamfer_matching/src/chamfer_matching.cpp 2009-08-13 04:58:11 UTC (rev 21775)
@@ -443,8 +443,6 @@
ChamferTemplate::ChamferTemplate(IplImage* edge_image, float scale_) : addr_width(-1), scale(scale_)
{
- size = cvGetSize(edge_image);
-
template_coords_t local_coords;
template_orientations_t local_orientations;
@@ -457,12 +455,27 @@
local_orientations.clear();
}
+ size = cvGetSize(edge_image);
+ CvPoint min, max;
+ min.x = size.width;
+ min.y = size.height;
+ max.x = 0;
+ max.y = 0;
+
center = cvPoint(0,0);
for (size_t i=0;i<coords.size();++i) {
center.x += coords[i].first;
center.y += coords[i].second;
+
+ if (min.x>coords[i].first) min.x = coords[i].first;
+ if (min.y>coords[i].second) min.y = coords[i].second;
+ if (max.x<coords[i].first) max.x = coords[i].first;
+ if (max.y<coords[i].second) max.y = coords[i].second;
}
+ size.width = max.x - min.x;
+ size.height = max.y - min.y;
+
center.x /= coords.size();
center.y /= coords.size();
@@ -486,7 +499,9 @@
for (size_t i=0; i<coords.size();++i) {
addr[i] = coords[i].second*width+coords[i].first;
+// printf("Addr: %d, (%d,%d), %d\n", addr[i], coords[i].first, coords[i].second, width);
}
+// printf("%d,%d\n", center.x, center.y);
}
return addr;
}
@@ -751,6 +766,8 @@
float cost = (sum_distance/truncate_)/addr.size();
+// prinddrtf("%d,%d\n", tpl->center.x, tpl->center.y);
+
if (orientation_img!=NULL) {
float* optr = CV_PIXEL(float, orientation_img, x, y);
float sum_orientation = 0;
@@ -762,6 +779,7 @@
// costs[i] = orientation_diff(tpl.orientations[i], *(optr+addr[i]));
}
}
+// printf("\n");
if (cnt_orientation>0) {
cost = beta*cost+alpha*(sum_orientation/(2*M_PI))/cnt_orientation;
@@ -773,6 +791,7 @@
// printf("\nCost: %g\n", cost);
// }
+
cm.addMatch(cost, offset, tpl, addr, costs);
}
@@ -788,11 +807,16 @@
CvPoint loc = crt.first;
float scale = crt.second;
+ ChamferTemplate* tpl = templates[i]->rescale(scale);
- if (loc.x-templates[i]->center.x<0 || loc.x+templates[i]->size.width-templates[i]->center.x>=dist_img->width) continue;
- if (loc.y-templates[i]->center.y<0 || loc.y+templates[i]->size.height-templates[i]->center.y>=dist_img->height) continue;
+// printf("Location: (%d,%d), template: (%d,%d), img: (%d,%d)\n",loc.x,loc.y,
+// templates[i]->size.width,templates[i]->size.height,
+// dist_img->width, dist_img->height);
- localChamferDistance(loc, dist_img, orientation_img, templates[i]->rescale(scale), cm, orientation_weight);
+ if (loc.x-tpl->center.x<0 || loc.x+tpl->size.width-tpl->center.x>=dist_img->width) continue;
+ if (loc.y-tpl->center.y<0 || loc.y+tpl->size.height-tpl->center.y>=dist_img->height) continue;
+// printf("%d,%d - %d,%d\n", loc.x, loc.y, templates[i]->center.x, templates[i]->center.y);
+ localChamferDistance(loc, dist_img, orientation_img, tpl, cm, orientation_weight);
}
delete it;
@@ -806,15 +830,16 @@
* @param edge_img Edge image
* @return a match object
*/
-ChamferMatch ChamferMatching::matchEdgeImage(IplImage* edge_img, const ImageRange& range, float orientation_weight)
+ChamferMatch ChamferMatching::matchEdgeImage(IplImage* edge_img, const ImageRange& range, float orientation_weight, int max_matches, float min_match_distance)
{
CV_Assert(edge_img->nChannels==1);
IplImage* dist_img;
IplImage* annotated_img;
IplImage* orientation_img;
- ChamferMatch cm;
+ ChamferMatch cm (max_matches, min_match_distance);
+
dist_img = cvCreateImage(cvSize(edge_img->width, edge_img->height), IPL_DEPTH_32F, 1);
annotated_img = cvCreateImage(cvSize(edge_img->width, edge_img->height), IPL_DEPTH_32S, 2);
@@ -843,14 +868,12 @@
}
-int CLUSTER_SIZE = 10;
-
void ChamferMatch::addMatch(float cost, CvPoint offset, ChamferTemplate* tpl, const vector<int>& addr, const vector<float>& costs)
{
bool new_match = true;
for (int i=0; i<count; ++i) {
- if (abs(matches[i].offset.x-offset.x)+abs(matches[i].offset.y-offset.y)<CLUSTER_SIZE) {
+ if (abs(matches[i].offset.x-offset.x)+abs(matches[i].offset.y-offset.y)<min_match_distance_) {
// too close, not a new match
new_match = false;
// if better cost, replace existing match
@@ -858,8 +881,8 @@
matches[i].cost = cost;
matches[i].offset = offset;
matches[i].tpl = tpl;
- matches[i].costs = costs;
- matches[i].img_offs = addr;
+// matches[i].costs = costs;
+// matches[i].img_offs = addr;
}
// re-bubble to keep ordered
int k = i;
@@ -876,12 +899,12 @@
if (new_match) {
// if we don't have enough matches yet, add it to the array
- if (count<MAX_MATCHES) {
+ if (count<max_matches_) {
matches[count].cost = cost;
matches[count].offset = offset;
matches[count].tpl = tpl;
- matches[count].costs = costs;
- matches[count].img_offs = addr;
+// matches[count].costs = costs;
+// matches[count].img_offs = addr;
count++;
}
// otherwise find the right position to insert it
@@ -905,47 +928,30 @@
matches[j].cost = cost;
matches[j].offset = offset;
matches[j].tpl = tpl;
- matches[j].costs = costs;
- matches[j].img_offs = addr;
+// matches[j].costs = costs;
+// matches[j].img_offs = addr;
}
}
-
-
- //
- // for (int i=0;i<count;++i) {
- // printf("Cost: %f\n", matches[i].cost);
- // }
- // printf("------------------------------------------------\n");
-
}
-void ChamferMatch::show(IplImage* img, int matches_no)
+void ChamferMatch::showMatch(IplImage* img, int index)
{
- printf("I have found %d matches.\n",count);
+ if (index>=count) {
+ printf("Index too big.\n");
+ }
- int show_cnt = min(count, matches_no);
+ assert(img->nChannels==3);
- for (int i=0;i<show_cnt;++i) {
- ChamferMatchInstance match = matches[i];
- printf("Match at: (%d,%d), scale: %f, cost: %f\n", match.offset.x, match.offset.y, match.tpl->scale, match.cost);
+ ChamferMatchInstance match = matches[index];
- const template_coords_t& templ_coords = match.tpl->coords;
- for (size_t i=0;i<templ_coords.size();++i) {
- printf("%g, ", match.costs[i]);
- int x = match.offset.x + templ_coords[i].first;
- int y = match.offset.y + templ_coords[i].second;
+ const template_coords_t& templ_coords = match.tpl->coords;
+ for (size_t i=0;i<templ_coords.size();++i) {
+ // printf("%g, ", match.costs[i]);
+ int x = match.offset.x + templ_coords[i].first;
+ int y = match.offset.y + templ_coords[i].second;
-// printf("(%d,%d) + (%d,%d) = (%d,%d)\n", match.offset.x,match.offset.y, templ_coords[i].first, templ_coords[i].second, x,y);
-
- unsigned char *p = CV_PIXEL(unsigned char, img,x,y);
- p[0] = p[1] = p[2] = 0;
-
- if (match.costs[i]>2) {
- p[2] = 255;
- } else {
- p[1] = 255;
- }
- }
- printf("\n");
+ unsigned char *p = CV_PIXEL(unsigned char, img,x,y);
+ p[0] = p[2] = 0;
+ p[1] = 255;
}
}
Modified: pkg/trunk/vision/recognition_lambertian/CMakeLists.txt
===================================================================
--- pkg/trunk/vision/recognition_lambertian/CMakeLists.txt 2009-08-13 04:57:41 UTC (rev 21774)
+++ pkg/trunk/vision/recognition_lambertian/CMakeLists.txt 2009-08-13 04:58:11 UTC (rev 21775)
@@ -36,4 +36,3 @@
rospack_add_executable(rec_lam_normal_features src/rec_lam_normal_features.cpp src/visualization.cpp)
rospack_add_executable(model_fitter src/model_fitter.cpp src/ply.c)
rospack_link_boost(model_fitter filesystem)
-rospack_add_executable(test_stereo src/test_stereo.cpp)
Modified: pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp
===================================================================
--- pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp 2009-08-13 04:57:41 UTC (rev 21774)
+++ pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp 2009-08-13 04:58:11 UTC (rev 21775)
@@ -558,13 +558,16 @@
// }
// printf("\n");
- ChamferMatch match = cm->matchEdgeImage(gray, positions, scales);
+ ChamferMatch match = cm->matchEdgeImage(gray, LocationScaleImageRange(positions, scales));
IplImage* left_clone = cvCloneImage(left);
- match.show(left, templates_no);
+ ChamferMatch::ChamferMatches match_instances = match.getMatches();
+ for (size_t i = 0; i<match_instances.size();++i) {
+ printf("Match with cost: %g at lcation: (%d,%d)\n", match_instances[i].cost, match_instances[i].offset.x,match_instances[i].offset.y);
+ match.showMatch(left, i);
+ }
-
if(display_){
// show filtered disparity
cvShowImage("disparity", disp);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|