|
From: <hsu...@us...> - 2008-12-11 22:22:35
|
Revision: 7987
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7987&view=rev
Author: hsujohnhsu
Date: 2008-12-11 21:37:32 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
* update image test in gazebo_plugins tests according to xvfb-run produced image on desktop.
* move tuck arm command out of default controlers.
Modified Paths:
--------------
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-amcl.xml
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-fake_localization.xml
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-amcl-no_x.xml
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-amcl.xml
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-fake_localization-no_x.xml
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-fake_localization.xml
pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch
pkg/trunk/drivers/simulator/gazebo_plugin/test/test_camera.py
pkg/trunk/drivers/simulator/gazebo_plugin/test/test_camera.valid.ppm
Added Paths:
-----------
pkg/trunk/demos/pr2_gazebo/tuck_arms.py
Removed Paths:
-------------
pkg/trunk/demos/pr2_gazebo/setarms.py
Modified: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-amcl.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-amcl.xml 2008-12-11 20:17:46 UTC (rev 7986)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-amcl.xml 2008-12-11 21:37:32 UTC (rev 7987)
@@ -7,6 +7,9 @@
<!-- load map -->
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map3.png 0.1" respawn="false" output="screen" />
+ <!-- Tug Arms For Navigation -->
+ <node pkg="pr2_gazebo" type="tuck_arms.py" output="screen"/>
+
<!-- nav-stack -->
<include file="$(find 2dnav_gazebo)/2dnav-stack-amcl.xml"/>
Modified: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-fake_localization.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-fake_localization.xml 2008-12-11 20:17:46 UTC (rev 7986)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-fake_localization.xml 2008-12-11 21:37:32 UTC (rev 7987)
@@ -7,6 +7,9 @@
<!-- load map -->
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map3.png 0.1" respawn="false" output="screen" />
+ <!-- Tug Arms For Navigation -->
+ <node pkg="pr2_gazebo" type="tuck_arms.py" output="screen"/>
+
<!-- nav-stack -->
<include file="$(find 2dnav_gazebo)/2dnav-stack-fake_localization.xml"/>
Modified: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-amcl-no_x.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-amcl-no_x.xml 2008-12-11 20:17:46 UTC (rev 7986)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-amcl-no_x.xml 2008-12-11 21:37:32 UTC (rev 7987)
@@ -7,6 +7,9 @@
<!-- load map -->
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/willowMap.png 0.1" respawn="false" output="screen" />
+ <!-- Tug Arms For Navigation -->
+ <node pkg="pr2_gazebo" type="tuck_arms.py" output="screen"/>
+
<!-- nav-stack -->
<include file="$(find 2dnav_gazebo)/2dnav-stack-amcl.xml"/>
Modified: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-amcl.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-amcl.xml 2008-12-11 20:17:46 UTC (rev 7986)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-amcl.xml 2008-12-11 21:37:32 UTC (rev 7987)
@@ -7,6 +7,9 @@
<!-- load map -->
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/willowMap.png 0.1" respawn="false" output="screen" />
+ <!-- Tug Arms For Navigation -->
+ <node pkg="pr2_gazebo" type="tuck_arms.py" output="screen"/>
+
<!-- nav-stack -->
<include file="$(find 2dnav_gazebo)/2dnav-stack-amcl.xml"/>
Modified: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-fake_localization-no_x.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-fake_localization-no_x.xml 2008-12-11 20:17:46 UTC (rev 7986)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-fake_localization-no_x.xml 2008-12-11 21:37:32 UTC (rev 7987)
@@ -7,6 +7,9 @@
<!-- load map -->
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/willowMap.png 0.1" respawn="false" output="screen" />
+ <!-- Tug Arms For Navigation -->
+ <node pkg="pr2_gazebo" type="tuck_arms.py" output="screen"/>
+
<!-- nav-stack -->
<include file="$(find 2dnav_gazebo)/2dnav-stack-fake_localization.xml"/>
Modified: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-fake_localization.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-fake_localization.xml 2008-12-11 20:17:46 UTC (rev 7986)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-wg-fake_localization.xml 2008-12-11 21:37:32 UTC (rev 7987)
@@ -7,6 +7,9 @@
<!-- load map -->
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/willowMap.png 0.1" respawn="false" output="screen" />
+ <!-- Tug Arms For Navigation -->
+ <node pkg="pr2_gazebo" type="tuck_arms.py" output="screen"/>
+
<!-- nav-stack -->
<include file="$(find 2dnav_gazebo)/2dnav-stack-fake_localization.xml"/>
Modified: pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch
===================================================================
--- pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch 2008-12-11 20:17:46 UTC (rev 7986)
+++ pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch 2008-12-11 21:37:32 UTC (rev 7987)
@@ -9,7 +9,7 @@
<node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/pr2_prototype1/controllers_head_laser_tilt_torso_gazebo.xml" output="screen"/>
<!-- Tug Arms For Navigation -->
- <node pkg="pr2_gazebo" type="setarms.py" output="screen"/>
+ <!--node pkg="pr2_gazebo" type="tuck_arms.py" output="screen"/-->
<!-- PR2 Calibration -->
<!--include file="$(find wg_robot_description)/pr2_prototype1/calibrate.launch" /-->
Deleted: pkg/trunk/demos/pr2_gazebo/setarms.py
===================================================================
--- pkg/trunk/demos/pr2_gazebo/setarms.py 2008-12-11 20:17:46 UTC (rev 7986)
+++ pkg/trunk/demos/pr2_gazebo/setarms.py 2008-12-11 21:37:32 UTC (rev 7987)
@@ -1,79 +0,0 @@
-#!/usr/bin/env python
-# 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.
-#
-
-## Gazebo tug arms for navigation
-
-PKG = 'pr2_gazebo'
-NAME = 'setarms'
-
-import math
-import rostools
-rostools.update_path(PKG)
-rostools.update_path('rostest')
-rostools.update_path('std_msgs')
-rostools.update_path('pr2_mechanism_controllers')
-rostools.update_path('robot_msgs')
-rostools.update_path('rospy')
-
-
-import sys, unittest
-import os, os.path, threading, time
-import rospy, rostest
-from std_msgs.msg import *
-from pr2_mechanism_controllers.msg import *
-
-
-CMD_POS_1 = 0.0
-CMD_POS_2 = 3.142
-CMD_POS_3 = 0.0
-CMD_POS_4 = 3.142
-CMD_POS_5 = 3.142
-CMD_POS_6 = 3.142
-CMD_POS_7 = 0.0
-CMD_POS_8 = 0.8
-
-if __name__ == '__main__':
- pub_l_arm = rospy.Publisher("left_arm_commands", JointPosCmd)
- pub_l_gripper = rospy.Publisher("l_gripper_controller/set_command", Float64)
- pub_r_arm = rospy.Publisher("right_arm_commands", JointPosCmd)
- pub_r_gripper = rospy.Publisher("r_gripper_controller/set_command", Float64)
- rospy.init_node(NAME, anonymous=True)
- timeout_t = time.time() + 10.0 #publish for 10 seconds then stop
- while time.time() < timeout_t:
- pub_l_arm.publish(JointPosCmd(['l_shoulder_pan_joint','l_shoulder_lift_joint','l_upper_arm_roll_joint','l_elbow_flex_joint','l_forearm_roll_joint','l_wrist_flex_joint','l_wrist_roll_joint'],[CMD_POS_1,CMD_POS_2,CMD_POS_3,CMD_POS_4,CMD_POS_5,CMD_POS_6,CMD_POS_7],[0,0,0,0,0,0,0],0))
- pub_l_gripper.publish(Float64(CMD_POS_8))
- pub_r_arm.publish(JointPosCmd(['r_shoulder_pan_joint','r_shoulder_lift_joint','r_upper_arm_rolr_joint','r_elbow_flex_joint','r_forearm_roll_joint','r_wrist_flex_joint','r_wrist_roll_joint'],[CMD_POS_1,CMD_POS_2,CMD_POS_3,CMD_POS_4,CMD_POS_5,CMD_POS_6,CMD_POS_7],[0,0,0,0,0,0,0],0))
- pub_r_gripper.publish(Float64(CMD_POS_8))
- time.sleep(0.2)
-
Copied: pkg/trunk/demos/pr2_gazebo/tuck_arms.py (from rev 7982, pkg/trunk/demos/pr2_gazebo/setarms.py)
===================================================================
--- pkg/trunk/demos/pr2_gazebo/tuck_arms.py (rev 0)
+++ pkg/trunk/demos/pr2_gazebo/tuck_arms.py 2008-12-11 21:37:32 UTC (rev 7987)
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+# 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.
+#
+
+## Gazebo tug arms for navigation
+
+PKG = 'pr2_gazebo'
+NAME = 'tuck_arms'
+
+import math
+import rostools
+rostools.update_path(PKG)
+rostools.update_path('rostest')
+rostools.update_path('std_msgs')
+rostools.update_path('pr2_mechanism_controllers')
+rostools.update_path('robot_msgs')
+rostools.update_path('rospy')
+
+
+import sys, unittest
+import os, os.path, threading, time
+import rospy, rostest
+from std_msgs.msg import *
+from pr2_mechanism_controllers.msg import *
+
+
+CMD_POS_1 = 0.0
+CMD_POS_2 = 3.142
+CMD_POS_3 = 0.0
+CMD_POS_4 = 3.142
+CMD_POS_5 = 3.142
+CMD_POS_6 = 3.142
+CMD_POS_7 = 0.0
+CMD_POS_8 = 0.8
+
+if __name__ == '__main__':
+ pub_l_arm = rospy.Publisher("left_arm_commands", JointPosCmd)
+ pub_l_gripper = rospy.Publisher("l_gripper_controller/set_command", Float64)
+ pub_r_arm = rospy.Publisher("right_arm_commands", JointPosCmd)
+ pub_r_gripper = rospy.Publisher("r_gripper_controller/set_command", Float64)
+ rospy.init_node(NAME, anonymous=True)
+ timeout_t = time.time() + 10.0 #publish for 10 seconds then stop
+ while time.time() < timeout_t:
+ pub_l_arm.publish(JointPosCmd(['l_shoulder_pan_joint','l_shoulder_lift_joint','l_upper_arm_roll_joint','l_elbow_flex_joint','l_forearm_roll_joint','l_wrist_flex_joint','l_wrist_roll_joint'],[CMD_POS_1,CMD_POS_2,CMD_POS_3,CMD_POS_4,CMD_POS_5,CMD_POS_6,CMD_POS_7],[0,0,0,0,0,0,0],0))
+ pub_l_gripper.publish(Float64(CMD_POS_8))
+ pub_r_arm.publish(JointPosCmd(['r_shoulder_pan_joint','r_shoulder_lift_joint','r_upper_arm_rolr_joint','r_elbow_flex_joint','r_forearm_roll_joint','r_wrist_flex_joint','r_wrist_roll_joint'],[CMD_POS_1,CMD_POS_2,CMD_POS_3,CMD_POS_4,CMD_POS_5,CMD_POS_6,CMD_POS_7],[0,0,0,0,0,0,0],0))
+ pub_r_gripper.publish(Float64(CMD_POS_8))
+ time.sleep(0.2)
+
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/test_camera.py
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/test_camera.py 2008-12-11 20:17:46 UTC (rev 7986)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/test_camera.py 2008-12-11 21:37:32 UTC (rev 7987)
@@ -56,8 +56,8 @@
FRAME_TARGET = "cam_sen-0050.ppm"
FRAME_DIR = "test_camera_frames"
TOTAL_ERROR_TOL = 5
-TEST_DURATION = 30
-TEST_INIT_WAIT = 10
+TEST_DURATION = 10
+TEST_INIT_WAIT = 40
class PollCameraThread(threading.Thread):
def __init__(self, target, dir):
@@ -160,9 +160,9 @@
print " - comparing images "
- im1.save("testsave.ppm") # uncomment this line to capture a new valid frame when things change
+ im1.save("test_1.ppm") # uncomment this line to capture a new valid frame when things change
im0.save("test_0.ppm")
- imc.save("test_diff.ppm")
+ imc.save("test_d.ppm")
#im1.show()
#im0.show()
#imc.show()
@@ -178,7 +178,7 @@
self.success = False
def test_camera(self):
- print " wait TEST_INIT_WAIT sec for objects to settle "
+ print " wait TEST_INIT_WAIT sec for objects to settle and arms to tuck "
time.sleep(TEST_INIT_WAIT)
print " subscribe stereo left image from ROS "
#rospy.TopicSub("test_camera/image", Image, self.imageInput) # this is a test camera, simply looking at the cups
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/test_camera.valid.ppm
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|