|
From: <jl...@us...> - 2009-08-09 05:13:22
|
Revision: 21224
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21224&view=rev
Author: jleibs
Date: 2009-08-09 05:13:11 +0000 (Sun, 09 Aug 2009)
Log Message:
-----------
Adding in a placeholder robot_msgs package to make the migration tests continue to work.
Modified Paths:
--------------
pkg/trunk/deprecated/deprecated_msgs/migration_rules/migration_rules.py
pkg/trunk/stacks/common_msgs/test_common_msgs/test/test_common_msgs_migration.py
Added Paths:
-----------
pkg/trunk/deprecated/robot_msgs/
pkg/trunk/deprecated/robot_msgs/CMakeLists.txt
pkg/trunk/deprecated/robot_msgs/Makefile
pkg/trunk/deprecated/robot_msgs/mainpage.dox
pkg/trunk/deprecated/robot_msgs/manifest.xml
Modified: pkg/trunk/deprecated/deprecated_msgs/migration_rules/migration_rules.py
===================================================================
--- pkg/trunk/deprecated/deprecated_msgs/migration_rules/migration_rules.py 2009-08-09 04:55:26 UTC (rev 21223)
+++ pkg/trunk/deprecated/deprecated_msgs/migration_rules/migration_rules.py 2009-08-09 05:13:11 UTC (rev 21224)
@@ -86,7 +86,7 @@
("Header","Header"),
("Pose", "geometry_msgs/Pose")]
- valid = False
+ valid = True
def update(self, old_msg, new_msg):
self.migrate(old_msg.header, new_msg.header)
Added: pkg/trunk/deprecated/robot_msgs/CMakeLists.txt
===================================================================
--- pkg/trunk/deprecated/robot_msgs/CMakeLists.txt (rev 0)
+++ pkg/trunk/deprecated/robot_msgs/CMakeLists.txt 2009-08-09 05:13:11 UTC (rev 21224)
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 2.4.6)
+include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
+
+# Set the build type. Options are:
+# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
+# Debug : w/ debug symbols, w/o optimization
+# Release : w/o debug symbols, w/ optimization
+# RelWithDebInfo : w/ debug symbols, w/ optimization
+# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
+#set(ROS_BUILD_TYPE RelWithDebInfo)
+
+rospack(robot_msgs)
+
+#set the default path for built executables to the "bin" directory
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
+#set the default path for built libraries to the "lib" directory
+set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
+
+#uncomment if you have defined messages
+#genmsg()
+#uncomment if you have defined services
+#gensrv()
+
+#common commands for building c++ executables and libraries
+#rospack_add_library(${PROJECT_NAME} src/example.cpp)
+#target_link_libraries(${PROJECT_NAME} another_library)
+#rospack_add_boost_directories()
+#rospack_link_boost(${PROJECT_NAME} thread)
+#rospack_add_executable(example examples/example.cpp)
+#target_link_libraries(example ${PROJECT_NAME})
Added: pkg/trunk/deprecated/robot_msgs/Makefile
===================================================================
--- pkg/trunk/deprecated/robot_msgs/Makefile (rev 0)
+++ pkg/trunk/deprecated/robot_msgs/Makefile 2009-08-09 05:13:11 UTC (rev 21224)
@@ -0,0 +1 @@
+include $(shell rospack find mk)/cmake.mk
\ No newline at end of file
Added: pkg/trunk/deprecated/robot_msgs/mainpage.dox
===================================================================
--- pkg/trunk/deprecated/robot_msgs/mainpage.dox (rev 0)
+++ pkg/trunk/deprecated/robot_msgs/mainpage.dox 2009-08-09 05:13:11 UTC (rev 21224)
@@ -0,0 +1,119 @@
+/**
+\mainpage
+\htmlinclude manifest.html
+
+\b robot_msgs is ...
+
+<!--
+In addition to providing an overview of your package,
+this is the section where the specification and design/architecture
+should be detailed. While the original specification may be done on the
+wiki, it should be transferred here once your package starts to take shape.
+You can then link to this documentation page from the Wiki.
+-->
+
+
+\section codeapi Code API
+
+<!--
+Provide links to specific auto-generated API documentation within your
+package that is of particular interest to a reader. Doxygen will
+document pretty much every part of your code, so do your best here to
+point the reader to the actual API.
+
+If your codebase is fairly large or has different sets of APIs, you
+should use the doxygen 'group' tag to keep these APIs together. For
+example, the roscpp documentation has 'libros' group.
+-->
+
+\section rosapi ROS API
+
+<!--
+Names are very important in ROS because they can be remapped on the
+command-line, so it is VERY IMPORTANT THAT YOU LIST NAMES AS THEY
+APPEAR IN THE CODE. You should list names of every topic, service and
+parameter used in your code. There is a template below that you can
+use to document each node separately.
+
+List of nodes:
+- \b node_name1
+- \b node_name2
+-->
+
+<!-- START: copy from here to 'END' for each node
+
+<hr>
+
+\subsection node_name node_name
+
+node_name does (provide a basic description of your node)
+
+\subsubsection Usage
+\verbatim
+$ node_type1 [standard ROS args]
+\endverbatim
+
+\par Example
+
+\verbatim
+$ node_type1
+\endverbatim
+
+
+\subsubsection topics ROS topics
+
+Subscribes to:
+- \b "in": [std_msgs/FooType] description of in
+
+Publishes to:
+- \b "out": [std_msgs/FooType] description of out
+
+
+\subsubsection parameters ROS parameters
+
+Reads the following parameters from the parameter server
+
+- \b "~param_name" : \b [type] description of param_name
+- \b "~my_param" : \b [string] description of my_param
+
+Sets the following parameters on the parameter server
+
+- \b "~param_name" : \b [type] description of param_name
+
+
+\subsubsection services ROS services
+- \b "foo_service": [std_srvs/FooType] description of foo_service
+
+
+END: copy for each node -->
+
+
+<!-- START: Uncomment if you have any command-line tools
+
+\section commandline Command-line tools
+
+This section is a catch-all for any additional tools that your package
+provides or uses that may be of use to the reader. For example:
+
+- tools/scripts (e.g. rospack, roscd)
+- roslaunch .launch files
+- xmlparam files
+
+\subsection script_name script_name
+
+Description of what this script/file does.
+
+\subsubsection Usage
+\verbatim
+$ ./script_name [args]
+\endverbatim
+
+\par Example
+
+\verbatim
+$ ./script_name foo bar
+\endverbatim
+
+END: Command-Line Tools Section -->
+
+*/
\ No newline at end of file
Added: pkg/trunk/deprecated/robot_msgs/manifest.xml
===================================================================
--- pkg/trunk/deprecated/robot_msgs/manifest.xml (rev 0)
+++ pkg/trunk/deprecated/robot_msgs/manifest.xml 2009-08-09 05:13:11 UTC (rev 21224)
@@ -0,0 +1,13 @@
+<package>
+ <description brief="robot_msgs">
+
+ This is a placeholder package that needs to exist until ken fixes a bug in python generate dynamic.
+
+ </description>
+ <author>Jeremy Leibs</author>
+ <license>BSD</license>
+ <review status="deprecated" notes=""/>
+ <url>http://pr.willowgarage.com/wiki/robot_msgs</url>
+</package>
+
+
Modified: pkg/trunk/stacks/common_msgs/test_common_msgs/test/test_common_msgs_migration.py
===================================================================
--- pkg/trunk/stacks/common_msgs/test_common_msgs/test/test_common_msgs_migration.py 2009-08-09 04:55:26 UTC (rev 21223)
+++ pkg/trunk/stacks/common_msgs/test_common_msgs/test/test_common_msgs_migration.py 2009-08-09 05:13:11 UTC (rev 21224)
@@ -50,6 +50,36 @@
import rospy
+import math
+
+def quaternion_from_euler(x, y, z):
+ x /= 2.0
+ y /= 2.0
+ z /= 2.0
+ ci = math.cos(x)
+ si = math.sin(x)
+ cj = math.cos(y)
+ sj = math.sin(y)
+ ck = math.cos(z)
+ sk = math.sin(z)
+ cc = ci*ck
+ cs = ci*sk
+ sc = si*ck
+ ss = si*sk
+
+ quaternion = [0.0,0.0,0.0,0.0]
+
+ quaternion[0] = cj*sc - sj*cs
+ quaternion[1] = cj*ss + sj*cc
+ quaternion[2] = cj*cs - sj*sc
+ quaternion[3] = cj*cc + sj*ss
+
+ return quaternion
+
+
+
+identity6x6 = [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0]
+
class TestCommonMsgsMigration(unittest.TestCase):
@@ -86,7 +116,6 @@
# (*) RobotBase2DOdom.saved
-
########### RobotBase2DOdom ###############
def get_old_robot_base_2d_odom(self):
@@ -95,7 +124,7 @@
robot_base_2d_odom = robot_base_2d_odom_classes['deprecated_msgs/RobotBase2DOdom']
pose_2d_float32 = robot_base_2d_odom_classes['deprecated_msgs/Pose2DFloat32']
- return robot_base_2d_odom(None, pose_2d_float32(0,0,0), pose_2d_float32(0,0,0), 0, 0)
+ return robot_base_2d_odom(None, pose_2d_float32(3.33, 2.22, 1.11), pose_2d_float32(.1,.2,.3), 0, 1)
def get_new_robot_base_2d_odom(self):
from nav_msgs.msg import Odometry
@@ -107,8 +136,8 @@
from geometry_msgs.msg import Twist
from geometry_msgs.msg import Vector3
- p = PoseWithCovariance(Pose(Point(1.23, 4.56, 7.89), Quaternion(0,0,0,1)), [0.0]*36)
- t = TwistWithCovariance(Twist(Vector3(1.23, 4.56, 7.89), Vector3(9.87, 6.54, 3.21)), [0.0]*36)
+ p = PoseWithCovariance(Pose(Point(3.33, 2.22, 0), apply(Quaternion,quaternion_from_euler(0,0,1.11))), identity6x6)
+ t = TwistWithCovariance(Twist(Vector3(.1, .2, 0), Vector3(0, 0, .3)), identity6x6)
return Odometry(None, p, t)
@@ -609,7 +638,7 @@
point = pose_with_covariance_classes['robot_msgs/Point']
quaternion = pose_with_covariance_classes['robot_msgs/Quaternion']
- return pose_with_covariance(None, pose(point(1.23, 4.56, 7.89), quaternion(0,0,0,1)), [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0])
+ return pose_with_covariance(None, pose(point(1.23, 4.56, 7.89), quaternion(0,0,0,1)), identity6x6)
def get_new_pose_with_covariance(self):
from geometry_msgs.msg import PoseWithCovarianceStamped
@@ -617,7 +646,7 @@
from geometry_msgs.msg import Point
from geometry_msgs.msg import Quaternion
- return PoseWithCovarianceStamped(None, Pose(Point(1.23, 4.56, 7.89), Quaternion(0,0,0,1)), [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0] + 6*[0] + [1.0])
+ return PoseWithCovarianceStamped(None, Pose(Point(1.23, 4.56, 7.89), Quaternion(0,0,0,1)), identity6x6)
def test_pose_with_covariance(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|