|
From: <hsu...@us...> - 2008-12-03 20:59:20
|
Revision: 7513
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7513&view=rev
Author: hsujohnhsu
Date: 2008-12-03 20:59:11 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
update testscan to run x-server-less.
Modified Paths:
--------------
pkg/trunk/drivers/simulator/gazebo_plugin/CMakeLists.txt
pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.py
pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.xml
pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testscan.world
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/CMakeLists.txt
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/CMakeLists.txt 2008-12-03 20:49:47 UTC (rev 7512)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/CMakeLists.txt 2008-12-03 20:59:11 UTC (rev 7513)
@@ -29,6 +29,7 @@
rospack_add_rostest(test/testbase.xml)
rospack_add_rostest(test/testarm.xml)
rospack_add_rostest(test/testpendulum.xml)
+rospack_add_rostest(test/testscan.xml)
rospack_add_rostest(test/hztest_pr2.xml)
rospack_add_rostest(test/hztest_rostime.xml)
@@ -36,7 +37,6 @@
# below need xvfb-run
rospack_add_rostest_future(test/testcameras.xml)
-rospack_add_rostest_future(test/testscan.xml)
rospack_add_rostest_future(test/hztest_pr2_image.xml)
rospack_add_executable(urdf2factory src/urdf2factory.cc)
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.py
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.py 2008-12-03 20:49:47 UTC (rev 7512)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.py 2008-12-03 20:59:11 UTC (rev 7513)
@@ -52,6 +52,7 @@
import rospy, rostest
from std_msgs.msg import *
+TEST_DURATION = 15
TARGET_RANGES = [
10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
@@ -153,8 +154,108 @@
10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, ]
+TARGET_RANGES_NO_CUP = [
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 2.05419135094, 2.04332733154, 2.04413056374, 2.04106020927, 2.02427339554,
+2.01659965515, 2.01625370979, 2.01061224937, 2.00532865524, 1.99209272861, 1.99574935436, 1.98897123337,
+1.97915828228, 1.9795435667, 1.97007763386, 1.96682810783, 1.96612608433, 1.95787787437, 1.9609888792,
+1.94284105301, 1.93230223656, 1.93677842617, 1.92850470543, 1.91769742966, 1.92443132401, 1.91430091858,
+1.90690469742, 1.90057992935, 1.90311610699, 1.91716551781, 1.94317221642, 10.0500001907, 10.0500001907,
+10.0500001907, 2.18566083908, 2.1205561161, 2.0912964344, 2.05985546112, 2.03070163727, 2.01867985725,
+2.00465297699, 1.98895978928, 1.9727588892, 1.95818328857, 1.94489836693, 1.93720829487, 1.92094373703,
+1.91370785236, 1.90808987617, 1.89315652847, 1.89589226246, 1.88524985313, 1.8806694746, 1.88469660282,
+1.86668860912, 1.86057829857, 1.86471998692, 1.84687578678, 1.84979379177, 1.84207034111, 1.84139060974,
+1.82920014858, 1.81594061852, 1.82443654537, 1.81913352013, 1.80692696571, 1.81597137451, 1.80392551422,
+1.80567479134, 1.79993021488, 1.80912601948, 1.80128765106, 1.79416060448, 1.8055075407, 1.79767310619,
+1.79589855671, 1.78457963467, 1.79552400112, 1.78584384918, 1.79407501221, 1.79637539387, 1.79181993008,
+1.79026257992, 1.79356837273, 1.80280041695, 1.7846353054, 1.78959023952, 1.79887080193, 1.79578185081,
+1.79998445511, 1.79707193375, 1.80638086796, 1.81159496307, 1.79972302914, 1.80607235432, 1.81710350513,
+1.81843948364, 1.8158069849, 1.82093262672, 1.82272386551, 1.82150566578, 1.83513128757, 1.83886921406,
+1.84345567226, 1.84698975086, 1.84710526466, 1.85266423225, 1.8590170145, 1.87874138355, 1.86735892296,
+1.8803653717, 1.88392448425, 1.89059066772, 1.89213347435, 1.91571295261, 1.91730117798, 1.93324375153,
+1.93892741203, 1.95519256592, 1.96027696133, 1.98008453846, 1.99549889565, 2.00887322426, 2.03057551384,
+2.05033922195, 2.06954717636, 2.10033655167, 2.15351700783, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 1.83191657066, 1.79723668098, 1.77193593979, 1.75236237049, 1.74099135399,
+1.72261190414, 1.7109028101, 1.70952260494, 1.68819868565, 1.67574381828, 1.67747986317, 1.66671442986,
+1.66106081009, 1.64317345619, 1.65456485748, 1.63919496536, 1.64061713219, 1.63652265072, 1.63067162037,
+1.62831401825, 1.6163828373, 1.62495267391, 1.60407006741, 1.61109995842, 1.61158168316, 1.61156535149,
+1.61910796165, 1.6063349247, 1.61652207375, 1.61568319798, 1.60885930061, 1.60436201096, 1.60267102718,
+1.60211455822, 1.59862864017, 1.60816693306, 1.61143779755, 1.6123547554, 1.59581446648, 1.60560369492,
+1.60689079762, 1.61144685745, 1.60752177238, 1.61240148544, 1.61879134178, 1.61412382126, 1.61822235584,
+1.6274305582, 1.62572181225, 1.62982475758, 1.6328202486, 1.63426935673, 1.63869154453, 1.64568936825,
+1.65298306942, 1.65668535233, 1.66969096661, 1.66931605339, 1.66222858429, 1.67816913128, 1.6824234724,
+1.7057005167, 1.70803809166, 1.7296667099, 1.74480903149, 1.74842536449, 1.7711789608, 1.80041766167,
+1.83896839619, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907,
+10.0500001907, 10.0500001907, 10.0500001907, 10.0500001907, ]
+
class PointCloudTest(unittest.TestCase):
def __init__(self, *args):
super(PointCloudTest, self).__init__(*args)
@@ -176,8 +277,8 @@
i = 0
print "Input laser scan received"
self.printPointCloud(cloud)
- while (i < len(cloud.ranges) and i < len(TARGET_RANGES)):
- d = cloud.ranges[i] - TARGET_RANGES[i]
+ while (i < len(cloud.ranges) and i < len(TARGET_RANGES_NO_CUP)):
+ d = cloud.ranges[i] - TARGET_RANGES_NO_CUP[i]
if ((d < -0.03) or (d > 0.03)):
return
i = i + 1
@@ -185,9 +286,9 @@
def test_pointcloud(self):
print "LNK\n"
- rospy.Subscriber("base_scan", LaserScan, self.pointInput)
+ rospy.TopicSub("base_scan", LaserScan, self.pointInput)
rospy.init_node(NAME, anonymous=True)
- timeout_t = time.time() + 5.0
+ timeout_t = time.time() + TEST_DURATION
while not rospy.is_shutdown() and not self.success and time.time() < timeout_t:
time.sleep(0.1)
self.assert_(self.success)
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.xml 2008-12-03 20:49:47 UTC (rev 7512)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.xml 2008-12-03 20:59:11 UTC (rev 7513)
@@ -1,7 +1,7 @@
<launch>
<master auto="start" />
- <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/test/testscan.world" respawn="false" output="screen">
+ <node pkg="gazebo" type="gazebo" args="-r $(find gazebo_robot_description)/gazebo_worlds/test/testscan.world" respawn="false" output="screen">
<env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/lib:$(find boost)/boost/lib:$LD_LIBRARY_PATH" />
<env name="GAZEBO_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
Modified: pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testscan.world
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testscan.world 2008-12-03 20:49:47 UTC (rev 7512)
+++ pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testscan.world 2008-12-03 20:59:11 UTC (rev 7513)
@@ -82,18 +82,18 @@
<!-- The small cuboidal "test sphere" -->
<model:physical name="sphere1_model">
- <xyz> 2.5 -0.5 0.1464</xyz>
+ <xyz> 2.5 -0.5 0.5064</xyz>
<rpy> 0.0 0.0 0.0 </rpy>
<static>false</static>
<body:sphere name="sphere1_body">
<geom:sphere name="sphere1_geom">
<mesh>default</mesh>
- <size>0.15</size>
+ <size>0.5</size>
<mass> 0.5</mass>
<cfm>0.000001</cfm>
<erp>0.8</erp>
<visual>
- <size> 0.3 0.3 0.3</size>
+ <size> 1.0 1.0 1.0</size>
<material>Gazebo/PioneerBody</material>
<mesh>unit_sphere</mesh>
</visual>
@@ -144,6 +144,7 @@
</model:physical>
<!-- The trimesh cup -->
+ <!-- commented out because xvfb is not working reliably yet
<model:physical name="cup1_model">
<xyz> 3.0 0.0 0.009</xyz>
<rpy> 90.0 0.0 90.0</rpy>
@@ -175,6 +176,7 @@
</geom:trimesh>
</body:trimesh>
</model:physical>
+ -->
<!-- White Directional light -->
<model:renderable name="directional_white">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|