|
From: <rdi...@us...> - 2008-11-21 18:26:14
|
Revision: 7141
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7141&view=rev
Author: rdiankov
Date: 2008-11-21 18:26:09 +0000 (Fri, 21 Nov 2008)
Log Message:
-----------
fixed openrave robot issues
Modified Paths:
--------------
pkg/trunk/3rdparty/openrave/Makefile
pkg/trunk/openrave_planning/or_rosplanning/src/rosarmik.cpp
pkg/trunk/openrave_planning/or_rosplanning/test/testrosik.m
pkg/trunk/robot_descriptions/openrave_robot_description/CMakeLists.txt
pkg/trunk/robot_descriptions/openrave_robot_description/robots/pr2full.robot.xml
pkg/trunk/robot_descriptions/openrave_robot_description/src/urdf2openrave.cpp
pkg/trunk/robot_descriptions/openrave_robot_description/test/test_robots.cpp
Modified: pkg/trunk/3rdparty/openrave/Makefile
===================================================================
--- pkg/trunk/3rdparty/openrave/Makefile 2008-11-21 18:09:26 UTC (rev 7140)
+++ pkg/trunk/3rdparty/openrave/Makefile 2008-11-21 18:26:09 UTC (rev 7141)
@@ -2,7 +2,7 @@
SVN_DIR = openrave_svn
# Should really specify a revision
-SVN_REVISION = -r 499
+SVN_REVISION = -r 500
SVN_URL = https://openrave.svn.sourceforge.net/svnroot/openrave
include $(shell rospack find mk)/svn_checkout.mk
Modified: pkg/trunk/openrave_planning/or_rosplanning/src/rosarmik.cpp
===================================================================
--- pkg/trunk/openrave_planning/or_rosplanning/src/rosarmik.cpp 2008-11-21 18:09:26 UTC (rev 7140)
+++ pkg/trunk/openrave_planning/or_rosplanning/src/rosarmik.cpp 2008-11-21 18:26:09 UTC (rev 7141)
@@ -72,49 +72,49 @@
axis.push_back(aj);
an << 0 << 0 << 0;
anchor.push_back(an);
- _vjointmult.push_back(-1);
+ _vjointmult.push_back(1);
// Shoulder pitch
aj << 0 << 1 << 0;
axis.push_back(aj);
an << 0.1 << 0 << 0;
anchor.push_back(an);
- _vjointmult.push_back(-1);
+ _vjointmult.push_back(1);
// Shoulder roll
aj << 1 << 0 << 0;
axis.push_back(aj);
an << 0.1 << 0 << 0;
anchor.push_back(an);
- _vjointmult.push_back(-1);
+ _vjointmult.push_back(1);
// Elbow flex
aj << 0 << 1 << 0;
axis.push_back(aj);
an << 0.5 << 0 << 0;
anchor.push_back(an);
- _vjointmult.push_back(1);
+ _vjointmult.push_back(-1);
// Forearm roll
aj << 1 << 0 << 0;
axis.push_back(aj);
an << 0.5 << 0 << 0;
anchor.push_back(an);
- _vjointmult.push_back(1);
+ _vjointmult.push_back(-1);
// Wrist flex
aj << 0 << 1 << 0;
axis.push_back(aj);
an << 0.82025 << 0 << 0;
anchor.push_back(an);
- _vjointmult.push_back(1);
+ _vjointmult.push_back(-1);
// Gripper roll
aj << 1 << 0 << 0;
axis.push_back(aj);
an << 0.82025 << 0 << 0;
anchor.push_back(an);
- _vjointmult.push_back(-1);
+ _vjointmult.push_back(1);
for(int i=0; i < 7; i++)
joint_type[i] = std::string("ROTARY");
Modified: pkg/trunk/openrave_planning/or_rosplanning/test/testrosik.m
===================================================================
--- pkg/trunk/openrave_planning/or_rosplanning/test/testrosik.m 2008-11-21 18:09:26 UTC (rev 7140)
+++ pkg/trunk/openrave_planning/or_rosplanning/test/testrosik.m 2008-11-21 18:26:09 UTC (rev 7141)
@@ -8,7 +8,8 @@
manips = orRobotGetManipulators(robotid);
-% orBodySetJointValues(robotid,[ -0.21 0.754256 0.40712 0.323661 1.28898 0.175237 2.13528],manips{1}.armjoints);
+%% test any specific ik configuration
+% orBodySetJointValues(robotid,[ -0.503115 0.573333 -2.99203 0.365955 1.95347 2.04003 -0.175888 ],manips{1}.armjoints);
% links = orBodyGetLinks(robotid);
% Thand = reshape(links(:,manips{1}.eelink),[3 4]);
% s = orProblemSendCommand(['iktest matrix ' sprintf('%f ',Thand(:))]);
Modified: pkg/trunk/robot_descriptions/openrave_robot_description/CMakeLists.txt
===================================================================
--- pkg/trunk/robot_descriptions/openrave_robot_description/CMakeLists.txt 2008-11-21 18:09:26 UTC (rev 7140)
+++ pkg/trunk/robot_descriptions/openrave_robot_description/CMakeLists.txt 2008-11-21 18:26:09 UTC (rev 7141)
@@ -26,4 +26,7 @@
# add the test package
rospack_add_gtest(test_or_robots test/test_robots.cpp)
-set_target_properties(test_or_robots PROPERTIES COMPILE_FLAGS "-DROBOT_FILES=\\\"${robot_files}\\\" -DOPENRAVE_EXECUTABLE=\\\"${openrave_PACKAGE_PATH}/bin/openrave\\\"")
+
+string(REGEX REPLACE ";" ":" robot_test_files "${robot_files}")
+set(robot_test_files "${robot_test_files}:${openrave_robot_description_PACKAGE_PATH}/robots/pr2full.robot.xml")
+set_target_properties(test_or_robots PROPERTIES COMPILE_FLAGS "-DROBOT_FILES=\\\"${robot_test_files}\\\" -DOPENRAVE_EXECUTABLE=\\\"${openrave_PACKAGE_PATH}/bin/openrave\\\"")
Modified: pkg/trunk/robot_descriptions/openrave_robot_description/robots/pr2full.robot.xml
===================================================================
--- pkg/trunk/robot_descriptions/openrave_robot_description/robots/pr2full.robot.xml 2008-11-21 18:09:26 UTC (rev 7140)
+++ pkg/trunk/robot_descriptions/openrave_robot_description/robots/pr2full.robot.xml 2008-11-21 18:26:09 UTC (rev 7141)
@@ -2,10 +2,10 @@
<Robot file="pr2.robot.xml">
<!-- left gripper -->
<Manipulator>
- <base>torso_lift</base>
- <effector>l_gripper_palm</effector>
- <armjoints>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</armjoints>
- <joints>l_gripper_l_finger_joint</joints>
+ <base>torso</base>
+ <effector>left_gripper_palm</effector>
+ <armjoints>left_shoulder_pan_joint left_shoulder_pitch_joint left_upper_arm_roll_joint left_elbow_flex_joint left_forearm_roll_joint left_wrist_flex_joint left_wrist_roll_joint</armjoints>
+ <joints>left_gripper_l_finger_joint</joints>
<closed>0</closed>
<opened>0.8</opened>
<iksolver>rosarmik</iksolver>
@@ -13,10 +13,10 @@
<!-- right gripper -->
<Manipulator>
- <base>torso_lift</base>
- <effector>r_gripper_palm</effector>
- <armjoints>r_shoulder_pan_joint r_shoulder_lift_joint r_upper_arm_roll_joint r_elbow_flex_joint r_forearm_roll_joint r_wrist_flex_joint r_wrist_roll_joint</armjoints>
- <joints>r_gripper_l_finger_joint</joints>
+ <base>torso</base>
+ <effector>right_gripper_palm</effector>
+ <armjoints>right_shoulder_pan_joint right_shoulder_pitch_joint right_upper_arm_roll_joint right_elbow_flex_joint right_forearm_roll_joint right_wrist_flex_joint right_wrist_roll_joint</armjoints>
+ <joints>right_gripper_l_finger_joint</joints>
<closed>0</closed>
<opened>0.8</opened>
<iksolver>rosarmik</iksolver>
Modified: pkg/trunk/robot_descriptions/openrave_robot_description/src/urdf2openrave.cpp
===================================================================
--- pkg/trunk/robot_descriptions/openrave_robot_description/src/urdf2openrave.cpp 2008-11-21 18:09:26 UTC (rev 7140)
+++ pkg/trunk/robot_descriptions/openrave_robot_description/src/urdf2openrave.cpp 2008-11-21 18:26:09 UTC (rev 7141)
@@ -90,13 +90,12 @@
{
btVector3 pz = transform.getOrigin();
double cpos[3] = { pz.x(), pz.y(), pz.z() };
- btMatrix3x3 mat = transform.getBasis();
- double crot[3];
- mat.getEulerZYX(crot[2],crot[1],crot[0]);
+ btQuaternion qt = transform.getRotation();
+ double cquat[4] = { qt.getW(),qt.getX(), qt.getY(), qt.getZ() };
- /* set geometry transform */
- addKeyValue(elem, "xyz", values2str(3, cpos));
- addKeyValue(elem, "rpy", values2str(3, crot, rad2deg));
+ // set geometry transform
+ addKeyValue(elem, "translation", values2str(3, cpos));
+ addKeyValue(elem, "quaternion", values2str(4, cquat));
}
void copyOpenraveMap(const robot_desc::URDF::Map& data, TiXmlElement *elem, const vector<string> *tags = NULL)
@@ -277,8 +276,9 @@
addKeyValue(joint, "highStop", "0");
addKeyValue(joint, "axis", "1 0 0");
}
- else {
- addKeyValue(joint, "axis", values2str(3, link->joint->axis));
+ else {
+ double jaxis[3] = {-link->joint->axis[0], -link->joint->axis[1], -link->joint->axis[2]};
+ addKeyValue(joint, "axis", values2str(3, jaxis));
addKeyValue(joint, "anchor", values2str(3, link->joint->anchor));
if (link->joint->pjointMimic == NULL && enforce_limits && link->joint->isSet["limit"]) {
Modified: pkg/trunk/robot_descriptions/openrave_robot_description/test/test_robots.cpp
===================================================================
--- pkg/trunk/robot_descriptions/openrave_robot_description/test/test_robots.cpp 2008-11-21 18:09:26 UTC (rev 7140)
+++ pkg/trunk/robot_descriptions/openrave_robot_description/test/test_robots.cpp 2008-11-21 18:26:09 UTC (rev 7141)
@@ -28,7 +28,7 @@
TEST(URDF, LoadRobots)
{
bool bSuccess = true;
- vector<string> files = tokenizer(ROBOT_FILES,"; \r\n");
+ vector<string> files = tokenizer(ROBOT_FILES,":; \r\n");
for(vector<string>::iterator it = files.begin(); it != files.end(); ++it) {
cout << "testing: " << *it << "... ";
int result = runExternalProcess(OPENRAVE_EXECUTABLE, *it + string(" -testscene -nogui"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hsu...@us...> - 2008-11-21 21:03:20
|
Revision: 7160
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7160&view=rev
Author: hsujohnhsu
Date: 2008-11-21 21:03:16 +0000 (Fri, 21 Nov 2008)
Log Message:
-----------
* more name change correction for tilt_laser to laser_tilt.
* also updated visualization camera topic names from axis_left to axis_l and similarly for others.
* update frame name references in highlevel_controller to laser_tilt_link.
* update stereo to stereo_link for sensor link in pr2_robot_defs.
Modified Paths:
--------------
pkg/trunk/demos/pr2_gazebo/controllers_2dnav_test.xml
pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo.xml
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo_obstacle.xml
pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp
pkg/trunk/robot_descriptions/wg_robot_description/pr2_robot_defs/head_defs.xml
pkg/trunk/visualization/pr2_gui/src/pr2_gui/pr2_frame.py
Modified: pkg/trunk/demos/pr2_gazebo/controllers_2dnav_test.xml
===================================================================
--- pkg/trunk/demos/pr2_gazebo/controllers_2dnav_test.xml 2008-11-21 20:51:28 UTC (rev 7159)
+++ pkg/trunk/demos/pr2_gazebo/controllers_2dnav_test.xml 2008-11-21 21:03:16 UTC (rev 7160)
@@ -212,10 +212,10 @@
</controller>
<!-- this version of laser scanner controller seems to be broken
- <controller name="tilt_laser_controller" topic="laser_test" type="LaserScannerControllerNode">
+ <controller name="laser_tilt_mount_controller" topic="laser_test" type="LaserScannerControllerNode">
<velocity>
<velocityFilter smoothing="0.2"/>
- <joint name="tilt_laser_mount_joint" type="velocity">
+ <joint name="laser_tilt_mount_joint" type="velocity">
<pid p="0.56" i = "14" d = "0.000001" iClamp = "0.02" />
</joint>
</velocity>
Modified: pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch
===================================================================
--- pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch 2008-11-21 20:51:28 UTC (rev 7159)
+++ pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch 2008-11-21 21:03:16 UTC (rev 7160)
@@ -8,6 +8,9 @@
<node pkg="mechanism_control" type="spawner.py" args="$(find pr2_alpha)/controllers_base_lab.xml" output="screen"/>
<node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/pr2_prototype1/controllers_head_laser_tilt_torso_gazebo.xml" output="screen"/>
+ <!-- PR2 Calibration -->
+ <!--include file="$(find wg_robot_description)/pr2_prototype1/calibrate.launch" /-->
+
<!-- send laser tilt motor a command -->
<!--node pkg="pr2_mechanism_controllers" type="control_laser.py" args="laser_tilt_controller sine 20 0.872 0.3475" respawn="false" output="screen" /-->
<node pkg="pr2_mechanism_controllers" type="control_laser.py" args="laser_tilt_controller sine 1 .45 .40" />
Modified: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo.xml 2008-11-21 20:51:28 UTC (rev 7159)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo.xml 2008-11-21 21:03:16 UTC (rev 7160)
@@ -4,7 +4,7 @@
<node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/pr2/controllers.xml" respawn="false" output="screen" />
- <node pkg="robot_mechanism_controllers" type="control.py" args="set tilt_laser_controller 46" respawn="false" output="screen" />
+ <node pkg="robot_mechanism_controllers" type="control.py" args="set laser_tilt_controller 46" respawn="false" output="screen" />
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map3.png 0.1" respawn="false" />
Modified: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo_obstacle.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo_obstacle.xml 2008-11-21 20:51:28 UTC (rev 7159)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo_obstacle.xml 2008-11-21 21:03:16 UTC (rev 7160)
@@ -6,7 +6,7 @@
<node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/pr2/controllers.xml" respawn="false" output="screen" />
- <node pkg="robot_mechanism_controllers" type="control.py" args="set tilt_laser_controller 46" respawn="false" output="screen" />
+ <node pkg="robot_mechanism_controllers" type="control.py" args="set laser_tilt_controller 46" respawn="false" output="screen" />
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map3.png 0.1" respawn="false" />
<node pkg="amcl_player" type="amcl_player" args="scan:=base_scan" respawn="false" />
Modified: pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp 2008-11-21 20:51:28 UTC (rev 7159)
+++ pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp 2008-11-21 21:03:16 UTC (rev 7160)
@@ -123,10 +123,9 @@
robotWidth_ = inscribedRadius * 2;
// Allocate observation buffers
-
tf::TransformListener *tempTf_ = new tf::TransformListener(*this, true, (uint64_t)10000000000ULL);
baseScanBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("base_laser"), *tempTf_, ros::Duration(0, 0), inscribedRadius, minZ_, maxZ_);
- tiltScanBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("tilt_laser"), *tempTf_, ros::Duration(1, 0), inscribedRadius, minZ_, maxZ_);
+ tiltScanBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("laser_tilt_link"), *tempTf_, ros::Duration(1, 0), inscribedRadius, minZ_, maxZ_);
stereoCloudBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("stereo"), *tempTf_, ros::Duration(0, 0), inscribedRadius, minZ_, maxZ_);
// get map via RPC
Modified: pkg/trunk/robot_descriptions/wg_robot_description/pr2_robot_defs/head_defs.xml
===================================================================
--- pkg/trunk/robot_descriptions/wg_robot_description/pr2_robot_defs/head_defs.xml 2008-11-21 20:51:28 UTC (rev 7159)
+++ pkg/trunk/robot_descriptions/wg_robot_description/pr2_robot_defs/head_defs.xml 2008-11-21 21:03:16 UTC (rev 7160)
@@ -155,19 +155,19 @@
<map name="sensor" flag="gazebo">
<verbatim key="sensor_${name}_camera">
- <sensor:camera name="${name}_left_sensor">
+ <sensor:camera name="${name}_l_sensor">
<imageWidth>640</imageWidth>
<imageHeight>480</imageHeight>
<hfov>60</hfov>
<nearClip>0.1</nearClip>
<farClip>100</farClip>
<updateRate>20.0</updateRate>
- <controller:ros_camera name="${name}_left_controller" plugin="libRos_Camera.so">
+ <controller:ros_camera name="${name}_l_controller" plugin="libRos_Camera.so">
<alwaysOn>true</alwaysOn>
<updateRate>20.0</updateRate>
- <topicName>${name}_left/image</topicName>
- <frameName>${name}</frameName>
- <interface:camera name="${name}_left_iface" />
+ <topicName>${name}_l/image</topicName>
+ <frameName>${name}_link</frameName>
+ <interface:camera name="${name}_l_iface" />
</controller:ros_camera>
</sensor:camera>
</verbatim>
@@ -199,7 +199,7 @@
<alwaysOn>true</alwaysOn>
<updateRate>10.0</updateRate>
<topicName>full_cloud</topicName>
- <frameName>${name}</frameName>
+ <frameName>${name}_link</frameName>
<interface:laser name="${name}_laser_iface" />
</controller:ros_block_laser>
</sensor:ray>
Modified: pkg/trunk/visualization/pr2_gui/src/pr2_gui/pr2_frame.py
===================================================================
--- pkg/trunk/visualization/pr2_gui/src/pr2_gui/pr2_frame.py 2008-11-21 20:51:28 UTC (rev 7159)
+++ pkg/trunk/visualization/pr2_gui/src/pr2_gui/pr2_frame.py 2008-11-21 21:03:16 UTC (rev 7160)
@@ -99,11 +99,11 @@
self._aui_manager.AddPane(self._monitor_panel, wx.aui.AuiPaneInfo().BottomDockable().Bottom().Layer(1).BestSize(wx.Size(700,600)).Name('runtime_monitor').Caption('Runtime Monitor'), 'Runtime Monitor')
self._aui_manager.AddPane(self._hardware_panel, wx.aui.AuiPaneInfo().BottomDockable().Bottom().Layer(1).BestSize(wx.Size(300,200)).Name('hardware').Caption('Hardware'), 'Hardware')
- self.add_camera_pane("forearm_right", False)
- self.add_camera_pane("forearm_left", False)
- self.add_camera_pane("axis_right", True)
- self.add_camera_pane("axis_left", True)
- self.add_camera_pane("stereo_left", False)
+ self.add_camera_pane("forearm_r", False)
+ self.add_camera_pane("forearm_l", False)
+ self.add_camera_pane("axis_r", True)
+ self.add_camera_pane("axis_l", True)
+ self.add_camera_pane("stereo_l", False)
self._aui_manager.Update()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tpr...@us...> - 2008-11-22 02:29:31
|
Revision: 7186
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7186&view=rev
Author: tpratkanis
Date: 2008-11-22 02:29:25 +0000 (Sat, 22 Nov 2008)
Log Message:
-----------
Massive commit to port trajectory rollout and highlevel_controllers to the new transform lib.
Modified Paths:
--------------
pkg/trunk/highlevel/highlevel_controllers/include/MoveBase.hh
pkg/trunk/highlevel/highlevel_controllers/include/VelocityControllers.hh
pkg/trunk/highlevel/highlevel_controllers/manifest.xml
pkg/trunk/highlevel/highlevel_controllers/src/MoveArm.cpp
pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp
pkg/trunk/highlevel/highlevel_controllers/src/VelocityControllers.cc
pkg/trunk/trajectory_rollout/include/trajectory_rollout/governor_node.h
pkg/trunk/trajectory_rollout/include/trajectory_rollout/trajectory_controller.h
pkg/trunk/trajectory_rollout/manifest.xml
pkg/trunk/trajectory_rollout/src/governor_node.cpp
pkg/trunk/trajectory_rollout/src/trajectory_controller.cpp
Modified: pkg/trunk/highlevel/highlevel_controllers/include/MoveBase.hh
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/include/MoveBase.hh 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/highlevel/highlevel_controllers/include/MoveBase.hh 2008-11-22 02:29:25 UTC (rev 7186)
@@ -50,7 +50,8 @@
#include <std_msgs/RobotBase2DOdom.h>
// For transform support
-#include <rosTF/rosTF.h>
+#include <tf/transform_listener.h>
+#include <tf/transform_broadcaster.h>
// Laser projection
#include "laser_scan_utils/laser_scan.h"
@@ -201,7 +202,7 @@
std_msgs::RobotBase2DOdom odomMsg_; /**< Odometry in the odom frame picked up by subscription */
laser_scan::LaserProjection projector_; /**< Used to project laser scans */
- rosTFClient tf_; /**< Used to do transforms */
+ tf::TransformListener tf_; /**< Used to do transforms */
// Observation Buffers are dynamically allocated since their constructors take
// arguments bound by lookup to the param server. This could be chnaged with some reworking of how paramaters
@@ -219,7 +220,7 @@
CostMapAccessor* ma_; /**< Sliding read-only window on the cost map */
- libTF::TFPose2D global_pose_; /**< The global pose in the map frame */
+ tf::Stamped<tf::Pose> global_pose_; /**< The global pose in the map frame */
std_msgs::RobotBase2DOdom base_odom_; /**< Odometry in the base frame */
Modified: pkg/trunk/highlevel/highlevel_controllers/include/VelocityControllers.hh
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/include/VelocityControllers.hh 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/highlevel/highlevel_controllers/include/VelocityControllers.hh 2008-11-22 02:29:25 UTC (rev 7186)
@@ -11,7 +11,7 @@
#include <trajectory_rollout/trajectory_controller.h>
// For transform support
-#include <rosTF/rosTF.h>
+#include <tf/transform_listener.h>
using namespace costmap_2d;
@@ -30,7 +30,7 @@
* @brief Compute velocities for x, y and theta based on an obstacle map, and a current path
*/
virtual bool computeVelocityCommands(const std::list<std_msgs::Pose2DFloat32>& globalPlan,
- const libTF::TFPose2D& pose,
+ const tf::Stamped<tf::Pose>& pose,
const std_msgs::BaseVel& currentVel,
std_msgs::BaseVel& cmdVel,
std::list<std_msgs::Pose2DFloat32>& localPlan) = 0;
@@ -44,7 +44,7 @@
*/
class TrajectoryRolloutController: public VelocityController {
public:
- TrajectoryRolloutController(rosTFClient* tf, const CostMapAccessor& ma,
+ TrajectoryRolloutController(tf::TransformListener* tf, const CostMapAccessor& ma,
double sim_time, int sim_steps, int samples_per_dim,
double pdist_scale, double gdist_scale, double dfast_scale, double occdist_scale,
double acc_lim_x, double acc_lim_y, double acc_lim_th, std::vector<std_msgs::Point2DFloat32> footprint_spec);
@@ -52,7 +52,7 @@
virtual ~TrajectoryRolloutController(){}
virtual bool computeVelocityCommands(const std::list<std_msgs::Pose2DFloat32>& globalPlan,
- const libTF::TFPose2D& pose,
+ const tf::Stamped<tf::Pose>& pose,
const std_msgs::BaseVel& currentVel,
std_msgs::BaseVel& cmdVel,
std::list<std_msgs::Pose2DFloat32>& localPlan);
@@ -63,7 +63,7 @@
private:
//transform client
- rosTFClient* tf_;
+ tf::TransformListener* tf_;
// Cost map accessor
const costmap_2d::ObstacleMapAccessor& ma_;
Modified: pkg/trunk/highlevel/highlevel_controllers/manifest.xml
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/manifest.xml 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/highlevel/highlevel_controllers/manifest.xml 2008-11-22 02:29:25 UTC (rev 7186)
@@ -20,7 +20,6 @@
<depend package="trajectory_rollout"/>
<depend package="laser_scan_utils" />
<depend package="costmap_2d"/>
- <depend package="rosTF"/>
<depend package="tf"/>
<depend package="ompl"/>
<depend package="sbpl"/>
Modified: pkg/trunk/highlevel/highlevel_controllers/src/MoveArm.cpp
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/src/MoveArm.cpp 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/highlevel/highlevel_controllers/src/MoveArm.cpp 2008-11-22 02:29:25 UTC (rev 7186)
@@ -80,7 +80,7 @@
#include <robot_msgs/DisplayKinematicPath.h>
#include <robot_srvs/NamedKinematicPlanState.h>
#include <robot_srvs/PlanNames.h>
-#include <rosTF/rosTF.h>
+#include "tf/transform_listener.h"
static const unsigned int RIGHT_ARM_JOINTS_BASE_INDEX = 11;
static const unsigned int LEFT_ARM_JOINTS_BASE_INDEX = 12;
@@ -120,7 +120,7 @@
robot_msgs::MechanismState mechanismState;
robot_srvs::NamedKinematicPlanState::response plan;
unsigned int currentWaypoint; /*!< The waypoint in the plan that we are targetting */
- rosTFClient tf_; /**< Used to do transforms */
+ tf::TransformListener tf_; /**< Used to do transforms */
protected:
std::vector<std::string> jointNames_; /*< The collection of joint names of interest. Instantiate in the derived class.*/
@@ -217,28 +217,25 @@
//Get the pose of the robot:
- libTF::TFPose2D robotPose, globalPose;
- globalPose.x = robotPose.x = 0;
- globalPose.y = robotPose.y = 0;
- globalPose.yaw = robotPose.yaw = 0;
- robotPose.frame = "base_link";
- globalPose.time = robotPose.time = 0;
+ tf::Stamped<tf::Pose> robotPose, globalPose;
+ robotPose.setIdentity();
+ robotPose.frame_id_ = "base_link";
+ robotPose.stamp_ = ros::Time((uint64_t)0ULL);
+
try{
- globalPose = this->tf_.transformPose2D("map", robotPose);
+ tf_.transformPose("map", robotPose, globalPose);
}
- catch(libTF::TransformReference::LookupException& ex){
- std::cout << "No Transform available Error\n";
+ catch(tf::LookupException& ex) {
+ ROS_INFO("No Transform available Error\n");
}
- catch(libTF::TransformReference::ConnectivityException& ex){
- std::cout << "Connectivity Error\n";
+ catch(tf::ConnectivityException& ex) {
+ ROS_INFO("Connectivity Error\n");
}
- catch(libTF::TransformReference::ExtrapolateException& ex){
- std::cout << "Extrapolation Error\n";
+ catch(tf::ExtrapolationException& ex) {
+ ROS_INFO("Extrapolation Error\n");
}
-
-
//initializing full value state
req.start_state.set_names_size(names.get_names_size());
req.start_state.set_joints_size(names.get_names_size());
@@ -247,10 +244,12 @@
//std::cout << req.start_state.names[i] << ": " << names.num_values[i] << std::endl;
req.start_state.joints[i].set_vals_size(names.num_values[i]);
if (names.names[i] == "base_joint") {
- std::cout << "Base: " << i << ", " << globalPose.x << ", " << globalPose.y << ", " << globalPose.yaw << std::endl;
- req.start_state.joints[i].vals[0] = globalPose.x;
- req.start_state.joints[i].vals[1] = globalPose.y;
- req.start_state.joints[i].vals[2] = globalPose.yaw;
+ double yaw, pitch, roll;
+ globalPose.getBasis().getEulerZYX(yaw, pitch, roll);
+ std::cout << "Base: " << i << ", " << globalPose.getOrigin().getX() << ", " << globalPose.getOrigin().getY() << ", " << yaw << std::endl;
+ req.start_state.joints[i].vals[0] = globalPose.getOrigin().getX();
+ req.start_state.joints[i].vals[1] = globalPose.getOrigin().getY();
+ req.start_state.joints[i].vals[2] = yaw;
} else {
for (int k = 0 ; k < names.num_values[i]; k++) {
req.start_state.joints[i].vals[k] = 0;
Modified: pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp 2008-11-22 02:29:25 UTC (rev 7186)
@@ -47,7 +47,7 @@
MoveBase::MoveBase()
: HighlevelController<std_msgs::Planner2DState, std_msgs::Planner2DGoal>("move_base", "state", "goal"),
- tf_(*this, true, 10000000000ULL, 0ULL), // cache for 10 sec, no extrapolation
+ tf_(*this, true, 10000000000ULL), // cache for 10 sec, no extrapolation
controller_(NULL),
costMap_(NULL),
ma_(NULL),
@@ -56,9 +56,7 @@
minZ_(0.03), maxZ_(2.0), robotWidth_(0.0), active_(true) , map_update_frequency_(10.0)
{
// Initialize global pose. Will be set in control loop based on actual data.
- global_pose_.x = 0;
- global_pose_.y = 0;
- global_pose_.yaw = 0;
+ global_pose_.setIdentity();
// Initialize odometry
base_odom_.vel.x = 0;
@@ -117,10 +115,9 @@
robotWidth_ = inscribedRadius * 2;
// Allocate observation buffers
- tf::TransformListener *tempTf_ = new tf::TransformListener(*this, true, (uint64_t)10000000000ULL);
- baseScanBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("base_laser"), *tempTf_, ros::Duration(0, 0), inscribedRadius, minZ_, maxZ_);
- tiltScanBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("laser_tilt_link"), *tempTf_, ros::Duration(1, 0), inscribedRadius, minZ_, maxZ_);
- stereoCloudBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("stereo"), *tempTf_, ros::Duration(0, 0), inscribedRadius, minZ_, maxZ_);
+ baseScanBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("base_laser"), tf_, ros::Duration(0, 0), inscribedRadius, minZ_, maxZ_);
+ tiltScanBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("laser_tilt_link"), tf_, ros::Duration(1, 0), inscribedRadius, minZ_, maxZ_);
+ stereoCloudBuffer_ = new costmap_2d::BasicObservationBuffer(std::string("stereo"), tf_, ros::Duration(0, 0), inscribedRadius, minZ_, maxZ_);
// get map via RPC
std_srvs::StaticMap::request req;
@@ -261,58 +258,67 @@
delete stereoCloudBuffer_;
}
- void MoveBase::updateGlobalPose(){
- libTF::TFPose2D robotPose;
- robotPose.x = 0;
- robotPose.y = 0;
- robotPose.yaw = 0;
- robotPose.frame = "base_link";
- robotPose.time = 0;
+ void MoveBase::updateGlobalPose(){
+ tf::Stamped<tf::Pose> robotPose;
+ robotPose.setIdentity();
+ robotPose.frame_id_ = "base_link";
+ robotPose.stamp_ = ros::Time((uint64_t)0ULL);
try{
- global_pose_ = this->tf_.transformPose2D("map", robotPose);
+ tf_.transformPose("map", robotPose, global_pose_);
}
- catch(libTF::TransformReference::LookupException& ex){
+ catch(tf::LookupException& ex) {
ROS_INFO("No Transform available Error\n");
}
- catch(libTF::TransformReference::ConnectivityException& ex){
- ROS_INFO("Connectivity Error\n");
+ catch(tf::ConnectivityException& ex) {
+ ROS_INFO("Connectivity Error\n");
}
- catch(libTF::TransformReference::ExtrapolateException& ex){
- ROS_INFO("Extrapolation Error\n");
- }
+ catch(tf::ExtrapolationException& ex) {
+ ROS_INFO("Extrapolation Error\n");
+ }
+
+ // Update the cost map window
+
+
+ double uselessPitch, uselessRoll, yaw;
+ global_pose_.getBasis().getEulerZYX(yaw, uselessPitch, uselessRoll);
+ printf("Received new position (x=%f, y=%f, th=%f)\n", global_pose_.getOrigin().x(), global_pose_.getOrigin().y(), yaw);
+
+ ma_->updateForRobotPosition(global_pose_.getOrigin().x(), global_pose_.getOrigin().y());
}
void MoveBase::updateGoalMsg(){
- libTF::TFPose2D goalPose, transformedGoalPose;
- goalPose.x = goalMsg.goal.x;
- goalPose.y = goalMsg.goal.y;
- goalPose.yaw = goalMsg.goal.th;
- goalPose.frame = goalMsg.header.frame_id;
- goalPose.time = 0;
-
+ tf::Stamped<tf::Pose> goalPose, transformedGoalPose;
+ btQuaternion qt;
+ qt.setEulerZYX(goalMsg.goal.th, 0, 0);
+ goalPose.setData(btTransform(qt, btVector3(goalMsg.goal.x, goalMsg.goal.y, 0)));
+ goalPose.frame_id_ = goalMsg.header.frame_id;
+ goalPose.stamp_ = ros::Time((uint64_t)0ULL);
+
try{
- transformedGoalPose = this->tf_.transformPose2D("map", goalPose);
+ tf_.transformPose("map", goalPose, transformedGoalPose);
}
- catch(libTF::TransformReference::LookupException& ex){
+ catch(tf::LookupException& ex){
ROS_ERROR("No transform available from %s to map. This may be because the frame_id of the goalMsg is wrong.\n", goalMsg.header.frame_id.c_str());
ROS_ERROR("The details of the LookupException are: %s\n", ex.what());
}
- catch(libTF::TransformReference::ConnectivityException& ex){
+ catch(tf::ConnectivityException& ex){
ROS_ERROR("No transform available from %s to map. This may be because the frame_id of the goalMsg is wrong.\n", goalMsg.header.frame_id.c_str());
ROS_ERROR("The details of the LookupException are: %s\n", ex.what());
}
- catch(libTF::TransformReference::ExtrapolateException& ex){
+ catch(tf::ExtrapolationException& ex){
ROS_ERROR("No transform available from %s to map. This may be because the frame_id of the goalMsg is wrong.\n", goalMsg.header.frame_id.c_str());
ROS_ERROR("The details of the LookupException are: %s\n", ex.what());
}
- stateMsg.goal.x = goalPose.x;
- stateMsg.goal.y = goalPose.y;
- stateMsg.goal.th = goalPose.yaw;
-
- ROS_DEBUG("Received new goal (x=%f, y=%f, th=%f)\n", goalMsg.goal.x, goalMsg.goal.y, goalMsg.goal.th);
+ stateMsg.goal.x = transformedGoalPose.getOrigin().x();
+ stateMsg.goal.y = transformedGoalPose.getOrigin().y();
+ double uselessPitch, uselessRoll, yaw;
+ transformedGoalPose.getBasis().getEulerZYX(yaw, uselessPitch, uselessRoll);
+ stateMsg.goal.th = (float)yaw;
+
+ ROS_DEBUG("Received new goal (x=%f, y=%f, th=%f)\n", stateMsg.goal.x, stateMsg.goal.y, stateMsg.goal.th);
}
void MoveBase::updateStateMsg(){
@@ -320,9 +326,11 @@
updateGlobalPose();
// Assign state data
- stateMsg.pos.x = global_pose_.x;
- stateMsg.pos.y = global_pose_.y;
- stateMsg.pos.th = global_pose_.yaw;
+ stateMsg.pos.x = global_pose_.getOrigin().x();
+ stateMsg.pos.y = global_pose_.getOrigin().y();
+ double uselessPitch, uselessRoll, yaw;
+ global_pose_.getBasis().getEulerZYX(yaw, uselessPitch, uselessRoll);
+ stateMsg.pos.th = (float)yaw;
}
void MoveBase::baseScanCallback()
@@ -366,28 +374,23 @@
try
{
- libTF::TFVector v_in, v_out;
- v_in.x = odomMsg_.vel.x;
- v_in.y = odomMsg_.vel.y;
- v_in.z = odomMsg_.vel.th;
- v_in.time = 0; // Gets the latest
- v_in.frame = "odom";
- v_out = tf_.transformVector("base_link", v_in);
- base_odom_.vel.x = v_in.x;
- base_odom_.vel.y = v_in.y;
- base_odom_.vel.th = v_in.z;
+ tf::Stamped<btVector3> v_in(btVector3(odomMsg_.vel.x, odomMsg_.vel.y, odomMsg_.vel.th), ros::Time((uint64_t)0ULL), "odom"), v_out;
+ tf_.transformVector("base_link", ros::Time((uint64_t)0ULL), v_in, "odom", v_out);
+ base_odom_.vel.x = v_in.x();
+ base_odom_.vel.y = v_in.y();
+ base_odom_.vel.th = v_in.z();
}
- catch(libTF::TransformReference::LookupException& ex)
+ catch(tf::LookupException& ex)
{
puts("no odom->base Tx yet");
ROS_DEBUG("%s\n", ex.what());
}
- catch(libTF::TransformReference::ConnectivityException& ex)
+ catch(tf::ConnectivityException& ex)
{
puts("no odom->base Tx yet");
ROS_DEBUG("%s\n", ex.what());
}
- catch(libTF::TransformReference::ExtrapolateException& ex)
+ catch(tf::ExtrapolationException& ex)
{
puts("Extrapolation exception");
}
@@ -485,12 +488,14 @@
// If the plan has been executed (i.e. empty) and we are within a required distance of the target orientation,
// and we have stopped the robot, then we are done
+ double uselessPitch, uselessRoll, yaw;
+ global_pose_.getBasis().getEulerZYX(yaw, uselessPitch, uselessRoll);
if(plan_.empty() &&
- fabs(global_pose_.yaw - stateMsg.goal.th) < 0.1){
+ fabs(yaw - stateMsg.goal.th) < 0.1){
ROS_DEBUG("Goal achieved at: (%f, %f, %f) for (%f, %f, %f)\n",
- global_pose_.x, global_pose_.y, global_pose_.yaw,
- stateMsg.goal.x, stateMsg.goal.y, stateMsg.goal.th);
+ global_pose_.getOrigin().x(), global_pose_.getOrigin().y(), yaw,
+ stateMsg.goal.x, stateMsg.goal.y, stateMsg.goal.th);
// The last act will issue stop command
stopRobot();
@@ -500,11 +505,11 @@
// If we have reached the end of the path then clear the plan
if(!plan_.empty() &&
- withinDistance(global_pose_.x, global_pose_.y, global_pose_.yaw,
- stateMsg.goal.x, stateMsg.goal.y, global_pose_.yaw)){
+ withinDistance(global_pose_.getOrigin().x(), global_pose_.getOrigin().y(), yaw,
+ stateMsg.goal.x, stateMsg.goal.y, yaw)){
ROS_DEBUG("Last waypoint achieved at: (%f, %f, %f) for (%f, %f, %f)\n",
- global_pose_.x, global_pose_.y, global_pose_.yaw,
- stateMsg.goal.x, stateMsg.goal.y, stateMsg.goal.th);
+ global_pose_.getOrigin().x(), global_pose_.getOrigin().y(), yaw,
+ stateMsg.goal.x, stateMsg.goal.y, stateMsg.goal.th);
plan_.clear();
}
@@ -550,15 +555,17 @@
std_msgs::BaseVel cmdVel; // Commanded velocities
// Update the cost map window
- ma_->updateForRobotPosition(global_pose_.x, global_pose_.y);
+ ma_->updateForRobotPosition(global_pose_.getOrigin().getX(), global_pose_.getOrigin().getY());
// if we have achieved all our waypoints but have yet to achieve the goal, then we know that we wish to accomplish our desired
// orientation
if(plan_.empty()){
+ double uselessPitch, uselessRoll, yaw;
+ global_pose_.getBasis().getEulerZYX(yaw, uselessPitch, uselessRoll);
ROS_DEBUG("Moving to desired goal orientation\n");
cmdVel.vx = 0;
cmdVel.vy = 0;
- cmdVel.vw = stateMsg.goal.th - global_pose_.yaw;
+ cmdVel.vw = stateMsg.goal.th - yaw;
cmdVel.vw = cmdVel.vw >= 0.0 ? cmdVel.vw + .4 : cmdVel.vw - .4;
}
else {
@@ -570,8 +577,8 @@
while(it != plan_.end()){
const std_msgs::Pose2DFloat32& w = *it;
// Fixed error bound of 2 meters for now. Can reduce to a portion of the map size or based on the resolution
- if(fabs(global_pose_.x - w.x) < 2 && fabs(global_pose_.y - w.y) < 2){
- ROS_DEBUG("Nearest waypoint to <%f, %f> is <%f, %f>\n", global_pose_.x, global_pose_.y, w.x, w.y);
+ if(fabs(global_pose_.getOrigin().x() - w.x) < 2 && fabs(global_pose_.getOrigin().y() - w.y) < 2){
+ ROS_DEBUG("Nearest waypoint to <%f, %f> is <%f, %f>\n", global_pose_.getOrigin().x(), global_pose_.getOrigin().y(), w.x, w.y);
break;
}
@@ -619,7 +626,9 @@
}
publish("cmd_vel", cmdVel);
- publishFootprint(global_pose_.x, global_pose_.y, global_pose_.yaw);
+ double uselessPitch, uselessRoll, yaw;
+ global_pose_.getBasis().getEulerZYX(yaw, uselessPitch, uselessRoll);
+ publishFootprint(global_pose_.getOrigin().x(), global_pose_.getOrigin().y(), yaw);
//publish a point that the head can track
double ptx, pty;
@@ -651,7 +660,7 @@
*/
void MoveBase::publishLocalCostMap() {
double mapSize = std::min(costMap_->getWidth()/2, costMap_->getHeight()/2);
- CostMapAccessor cm(*costMap_, std::min(10.0, mapSize), global_pose_.x, global_pose_.y);
+ CostMapAccessor cm(*costMap_, std::min(10.0, mapSize), global_pose_.getOrigin().x(), global_pose_.getOrigin().y());
// Publish obstacle data for each obstacle cell
std::vector< std::pair<double, double> > rawObstacles, inflatedObstacles;
@@ -710,7 +719,7 @@
*/
void MoveBase::publishFreeSpaceAndObstacles() {
double mapSize = std::min(costMap_->getWidth()/2, costMap_->getHeight()/2);
- CostMapAccessor cm(*costMap_, std::min(10.0, mapSize), global_pose_.x, global_pose_.y);
+ CostMapAccessor cm(*costMap_, std::min(10.0, mapSize), global_pose_.getOrigin().x(), global_pose_.getOrigin().y());
// Publish obstacle data for each obstacle cell
std::vector< std::pair<double, double> > rawObstacles, inflatedObstacles;
@@ -806,7 +815,7 @@
gettimeofday(&curr,NULL);
double curr_t, last_t, t_diff;
curr_t = curr.tv_sec + curr.tv_usec / 1e6;
- costMap_->updateDynamicObstacles(global_pose_.x, global_pose_.y, observations);
+ costMap_->updateDynamicObstacles(global_pose_.getOrigin().x(), global_pose_.getOrigin().y(), observations);
gettimeofday(&curr,NULL);
last_t = curr.tv_sec + curr.tv_usec / 1e6;
t_diff = last_t - curr_t;
Modified: pkg/trunk/highlevel/highlevel_controllers/src/VelocityControllers.cc
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/src/VelocityControllers.cc 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/highlevel/highlevel_controllers/src/VelocityControllers.cc 2008-11-22 02:29:25 UTC (rev 7186)
@@ -4,7 +4,7 @@
namespace ros {
namespace highlevel_controllers {
- TrajectoryRolloutController::TrajectoryRolloutController(rosTFClient* tf, const CostMapAccessor& ma,
+ TrajectoryRolloutController::TrajectoryRolloutController(tf::TransformListener* tf, const CostMapAccessor& ma,
double sim_time, int sim_steps, int samples_per_dim,
double pdist_scale, double gdist_scale, double dfast_scale, double occdist_scale,
double acc_lim_x, double acc_lim_y, double acc_lim_th, std::vector<std_msgs::Point2DFloat32> footprint_spec)
@@ -17,20 +17,20 @@
}
bool TrajectoryRolloutController::computeVelocityCommands(const std::list<std_msgs::Pose2DFloat32>& globalPlan,
- const libTF::TFPose2D& pose,
+ const tf::Stamped<tf::Pose>& pose,
const std_msgs::BaseVel& currentVel,
std_msgs::BaseVel& cmdVel,
std::list<std_msgs::Pose2DFloat32>& localPlan){
localPlan.clear();
- libTF::TFPose2D drive_cmds;
+ tf::Stamped<tf::Pose> drive_cmds;
+ drive_cmds.frame_id_ = "base_link";
- libTF::TFPose2D robot_vel;
- robot_vel.x = currentVel.vx;
- robot_vel.y = currentVel.vy;
- robot_vel.yaw = currentVel.vw;
- robot_vel.frame = "base_link";
- robot_vel.time = 0;
+ tf::Stamped<tf::Pose> robot_vel;
+ btQuaternion qt(currentVel.vw, 0, 0);
+ robot_vel.setData(btTransform(qt, btVector3(currentVel.vx, currentVel.vy, 0)));
+ robot_vel.frame_id_ = "base_link";
+ robot_vel.stamp_ = ros::Time((uint64_t)0ULL);
//do we need to resize our map?
double origin_x, origin_y;
@@ -47,14 +47,20 @@
}
tc_.updatePlan(copiedGlobalPlan);
-
+
+
+
+
//compute what trajectory to drive along
Trajectory path = tc_.findBestPath(pose, robot_vel, drive_cmds);
//pass along drive commands
- cmdVel.vx = drive_cmds.x;
- cmdVel.vy = drive_cmds.y;
- cmdVel.vw = drive_cmds.yaw;
+ cmdVel.vx = drive_cmds.getOrigin().getX();
+ cmdVel.vy = drive_cmds.getOrigin().getY();
+ double uselessPitch, uselessRoll, yaw;
+ drive_cmds.getBasis().getEulerZYX(yaw, uselessPitch, uselessRoll);
+
+ cmdVel.vw = yaw;
//if we cannot move... tell someone
if(path.cost_ < 0)
Modified: pkg/trunk/trajectory_rollout/include/trajectory_rollout/governor_node.h
===================================================================
--- pkg/trunk/trajectory_rollout/include/trajectory_rollout/governor_node.h 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/trajectory_rollout/include/trajectory_rollout/governor_node.h 2008-11-22 02:29:25 UTC (rev 7186)
@@ -52,7 +52,7 @@
#include <sys/time.h>
//for transform support
-#include <rosTF/rosTF.h>
+#include "tf/transform_listener.h"
//the trajectory controller
#include <trajectory_rollout/trajectory_controller.h>
@@ -145,7 +145,7 @@
MapGrid map_;
//transform client
- rosTFClient tf_;
+ tf::TransformListener tf_;
//map accessor
WavefrontMapAccessor ma_;
@@ -168,7 +168,7 @@
ros::thread::mutex map_lock;
//keep track of the robot's velocity
- libTF::TFPose2D robot_vel_;
+ tf::Stamped<tf::Pose> robot_vel_;
//how long for each cycle
double cycle_time_;
Modified: pkg/trunk/trajectory_rollout/include/trajectory_rollout/trajectory_controller.h
===================================================================
--- pkg/trunk/trajectory_rollout/include/trajectory_rollout/trajectory_controller.h 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/trajectory_rollout/include/trajectory_rollout/trajectory_controller.h 2008-11-22 02:29:25 UTC (rev 7186)
@@ -45,7 +45,7 @@
#include <algorithm>
//For transform support
-#include <rosTF/rosTF.h>
+#include "tf/transform_listener.h"
#include <trajectory_rollout/map_cell.h>
#include <trajectory_rollout/map_grid.h>
@@ -70,12 +70,12 @@
//create a controller given a map and a path
TrajectoryController(MapGrid& mg, double sim_time, int num_steps, int samples_per_dim,
double pdist_scale, double gdist_scale, double dfast_scale, double occdist_scale,
- double acc_lim_x, double acc_lim_y, double acc_lim_theta, rosTFClient* tf,
+ double acc_lim_x, double acc_lim_y, double acc_lim_theta, tf::TransformListener* tf,
const costmap_2d::ObstacleMapAccessor& ma, std::vector<std_msgs::Point2DFloat32> footprint_spec);
//given the current state of the robot, find a good trajectory
- Trajectory findBestPath(libTF::TFPose2D global_pose, libTF::TFPose2D global_vel,
- libTF::TFPose2D& drive_velocities);
+ Trajectory findBestPath(tf::Stamped<tf::Pose> global_pose, tf::Stamped<tf::Pose> global_vel,
+ tf::Stamped<tf::Pose>& drive_velocities);
//compute the distance from each cell in the map grid to the planned path
void computePathDistance(std::queue<MapCell*>& dist_queue);
@@ -83,7 +83,7 @@
void computeGoalDistance(std::queue<MapCell*>& dist_queue);
//given a trajectory in map space get the drive commands to send to the robot
- libTF::TFPose2D getDriveVelocities(int t_num);
+ tf::Stamped<tf::Pose> getDriveVelocities(int t_num);
//create the trajectories we wish to score
Trajectory createTrajectories(double x, double y, double theta, double vx, double vy, double vtheta,
@@ -142,7 +142,7 @@
double prev_x_, prev_y_;
//transform client
- rosTFClient* tf_;
+ tf::TransformListener* tf_;
//so that we can access obstacle information
const costmap_2d::ObstacleMapAccessor& ma_;
Modified: pkg/trunk/trajectory_rollout/manifest.xml
===================================================================
--- pkg/trunk/trajectory_rollout/manifest.xml 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/trajectory_rollout/manifest.xml 2008-11-22 02:29:25 UTC (rev 7186)
@@ -12,7 +12,7 @@
<!-- <depend package="newmat10" /> -->
<!-- <depend package="boost" /> -->
<!-- <depend package="xmlparam" /> -->
- <depend package="rosTF" />
+ <depend package="tf" />
<depend package="rospy" />
<depend package="costmap_2d" />
<url>http://pr.willowgarage.com</url>
Modified: pkg/trunk/trajectory_rollout/src/governor_node.cpp
===================================================================
--- pkg/trunk/trajectory_rollout/src/governor_node.cpp 2008-11-22 01:35:23 UTC (rev 7185)
+++ pkg/trunk/trajectory_rollout/src/governor_node.cpp 2008-11-22 02:29:25 UTC (rev 7186)
@@ -40,17 +40,15 @@
GovernorNode::GovernorNode(std::vector<std_msgs::Point2DFloat32> footprint_spec) :
ros::node("governor_node"), map_(MAP_SIZE_X, MAP_SIZE_Y),
- tf_(*this, true, 1 * 1000000000ULL, 100000000ULL),
+ tf_(*this, true, (uint64_t)10000000000ULL),
ma_(map_, OUTER_RADIUS),
tc_(map_, SIM_TIME, SIM_STEPS, VEL_SAMPLES,
PDIST_SCALE, GDIST_SCALE, OCCDIST_SCALE, DFAST_SCALE, MAX_ACC_X, MAX_ACC_Y, MAX_ACC_THETA, &tf_, ma_, footprint_spec),
cycle_time_(0.1)
{
- robot_vel_.x = 0.0;
- robot_vel_.y = 0.0;
- robot_vel_.yaw = 0.0;
- robot_vel_.frame = "base";
- robot_vel_.time = 0;
+ robot_vel_.setIdentity();
+ robot_vel_.frame_id_ = "base_link";
+ robot_vel_.stamp_ = (ros::Time)0ULL;
//so we can draw the local path
advertise<std_msgs::Polyline2D>("local_path", 10);
@@ -66,11 +64,12 @@
void GovernorNode::odomReceived(){
//we want to make sure that processPlan isn't using robot_vel_
vel_lock.lock();
- robot_vel_.x = odom_msg_.vel.x;
- robot_vel_.y = odom_msg_.vel.y;
- robot_vel_.yaw = odom_msg_.vel.th;
- robot_vel_.frame = "base";
- robot_vel_.time = 0;
+
+ btQuaternion qt(odom_msg_.vel.th, 0, 0);
+ robot_vel_.setData(btTransform(qt, btVector3(odom_msg_.vel.x, odom_msg_.vel.y, 0)));
+ robot_vel_.frame_id_ = "base_link";
+ robot_vel_.st...
[truncated message content] |
|
From: <rob...@us...> - 2008-11-24 18:09:47
|
Revision: 7212
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7212&view=rev
Author: rob_wheeler
Date: 2008-11-24 18:09:44 +0000 (Mon, 24 Nov 2008)
Log Message:
-----------
Build realtime libraries statically so that Xenomai's posix wrappers can be
applied.
Modified Paths:
--------------
pkg/trunk/controllers/pr2_mechanism_controllers/CMakeLists.txt
pkg/trunk/controllers/pr2_mechanism_controllers/manifest.xml
pkg/trunk/controllers/qualification_controllers/gripper_qualification_controllers/CMakeLists.txt
pkg/trunk/controllers/qualification_controllers/gripper_qualification_controllers/manifest.xml
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/CMakeLists.txt
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml
pkg/trunk/controllers/qualification_controllers/motor_qualification_controllers/CMakeLists.txt
pkg/trunk/controllers/qualification_controllers/motor_qualification_controllers/manifest.xml
pkg/trunk/controllers/robot_mechanism_controllers/CMakeLists.txt
pkg/trunk/controllers/robot_mechanism_controllers/manifest.xml
pkg/trunk/drivers/motor/ethercat_hardware/manifest.xml
pkg/trunk/mechanism/mechanism_control/CMakeLists.txt
pkg/trunk/mechanism/mechanism_control/manifest.xml
pkg/trunk/robot_control_loops/pr2_etherCAT/manifest.xml
Removed Paths:
-------------
pkg/trunk/mechanism/mechanism_control_rt/
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/CMakeLists.txt
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/CMakeLists.txt 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/CMakeLists.txt 2008-11-24 18:09:44 UTC (rev 7212)
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
include(rosbuild)
+set(ROS_BUILD_STATIC_LIBS true)
+set(ROS_BUILD_SHARED_LIBS false)
rospack(pr2_mechanism_controllers)
genmsg()
gensrv()
@@ -21,14 +23,14 @@
src/gripper_calibration_controller.cpp
)
-rospack_add_executable(testBaseController test/test_base_controller.cpp)
-target_link_libraries(testBaseController pr2_mechanism_controllers)
+#rospack_add_executable(testBaseController test/test_base_controller.cpp)
+#target_link_libraries(testBaseController pr2_mechanism_controllers)
-rospack_add_executable(testRunBaseController test/test_run_base_controller.cpp)
-target_link_libraries(testRunBaseController pr2_mechanism_controllers)
+#rospack_add_executable(testRunBaseController test/test_run_base_controller.cpp)
+#target_link_libraries(testRunBaseController pr2_mechanism_controllers)
-rospack_add_executable(testArmDynamicsController test/test_arm_dynamics_controller.cpp)
-target_link_libraries(testRunBaseController pr2_mechanism_controllers)
+#rospack_add_executable(testArmDynamicsController test/test_arm_dynamics_controller.cpp)
+#target_link_libraries(testRunBaseController pr2_mechanism_controllers)
-rospack_add_executable(testOdom test/test_odom.cpp)
-target_link_libraries(testOdom pr2_mechanism_controllers)
+#rospack_add_executable(testOdom test/test_odom.cpp)
+#target_link_libraries(testOdom pr2_mechanism_controllers)
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/manifest.xml
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/manifest.xml 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/manifest.xml 2008-11-24 18:09:44 UTC (rev 7212)
@@ -26,7 +26,7 @@
<repository>http://pr.willowgarage.com/repos</repository>
<export>
<cpp cflags='-I${prefix}/include -I${prefix}/msg/cpp -I${prefix}/srv/cpp'
- lflags='-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lpr2_mechanism_controllers'/>
+ lflags='${prefix}/lib/libpr2_mechanism_controllers.a'/>
</export>
</package>
Modified: pkg/trunk/controllers/qualification_controllers/gripper_qualification_controllers/CMakeLists.txt
===================================================================
--- pkg/trunk/controllers/qualification_controllers/gripper_qualification_controllers/CMakeLists.txt 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/qualification_controllers/gripper_qualification_controllers/CMakeLists.txt 2008-11-24 18:09:44 UTC (rev 7212)
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
include(rosbuild)
+set(ROS_BUILD_STATIC_LIBS true)
+set(ROS_BUILD_SHARED_LIBS false)
rospack(gripper_qualification_controllers)
genmsg()
gensrv()
Modified: pkg/trunk/controllers/qualification_controllers/gripper_qualification_controllers/manifest.xml
===================================================================
--- pkg/trunk/controllers/qualification_controllers/gripper_qualification_controllers/manifest.xml 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/qualification_controllers/gripper_qualification_controllers/manifest.xml 2008-11-24 18:09:44 UTC (rev 7212)
@@ -15,7 +15,7 @@
<url>http://pr.willowgarage.com</url>
<repository>http://pr.willowgarage.com/repos</repository>
<export>
- <cpp cflags='-I${prefix}/include -I${prefix}/msg/cpp -I${prefix}/srv/cpp' lflags='-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lgripper_qualification_controllers'/>
+ <cpp cflags='-I${prefix}/include -I${prefix}/msg/cpp -I${prefix}/srv/cpp' lflags='${prefix}/lib/libgripper_qualification_controllers.a'/>
</export>
</package>
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/CMakeLists.txt
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/CMakeLists.txt 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/CMakeLists.txt 2008-11-24 18:09:44 UTC (rev 7212)
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
include(rosbuild)
+set(ROS_BUILD_STATIC_LIBS true)
+set(ROS_BUILD_SHARED_LIBS false)
rospack(joint_qualification_controllers)
genmsg()
gensrv()
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml 2008-11-24 18:09:44 UTC (rev 7212)
@@ -23,7 +23,7 @@
<sysdepend os="ubuntu" version="8.04-hardy" package="libwxgtk2.8-dev"/>
<repository>http://pr.willowgarage.com/repos</repository>
<export>
- <cpp cflags='-I${prefix}/include -I${prefix}/msg/cpp -I${prefix}/srv/cpp' lflags='-Wl,-rpath,${prefix}/lib -L${prefix}/lib -ljoint_qualification_controllers'/>
+ <cpp cflags='-I${prefix}/include -I${prefix}/msg/cpp -I${prefix}/srv/cpp' lflags='${prefix}/lib/libjoint_qualification_controllers.a'/>
</export>
</package>
Modified: pkg/trunk/controllers/qualification_controllers/motor_qualification_controllers/CMakeLists.txt
===================================================================
--- pkg/trunk/controllers/qualification_controllers/motor_qualification_controllers/CMakeLists.txt 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/qualification_controllers/motor_qualification_controllers/CMakeLists.txt 2008-11-24 18:09:44 UTC (rev 7212)
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
include(rosbuild)
+set(ROS_BUILD_STATIC_LIBS true)
+set(ROS_BUILD_SHARED_LIBS false)
rospack(motor_qualification_controllers)
genmsg()
gensrv()
Modified: pkg/trunk/controllers/qualification_controllers/motor_qualification_controllers/manifest.xml
===================================================================
--- pkg/trunk/controllers/qualification_controllers/motor_qualification_controllers/manifest.xml 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/qualification_controllers/motor_qualification_controllers/manifest.xml 2008-11-24 18:09:44 UTC (rev 7212)
@@ -12,11 +12,10 @@
<depend package="misc_utils" />
<depend package="robot_msgs" />
<depend package="robot_mechanism_controllers" />
- <depend package="xenomai" />
<url>http://pr.willowgarage.com</url>
<repository>http://pr.willowgarage.com/repos</repository>
<export>
- <cpp cflags='-I${prefix}/include -I${prefix}/msg/cpp -I${prefix}/srv/cpp' lflags='-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lmotor_qualification_controllers'/>
+ <cpp cflags='-I${prefix}/include -I${prefix}/msg/cpp -I${prefix}/srv/cpp' lflags='${prefix}/lib/libmotor_qualification_controllers.a'/>
</export>
</package>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/CMakeLists.txt
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/CMakeLists.txt 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/robot_mechanism_controllers/CMakeLists.txt 2008-11-24 18:09:44 UTC (rev 7212)
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
include(rosbuild)
+set(ROS_BUILD_STATIC_LIBS true)
+set(ROS_BUILD_SHARED_LIBS false)
rospack(robot_mechanism_controllers)
genmsg()
gensrv()
Modified: pkg/trunk/controllers/robot_mechanism_controllers/manifest.xml
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/manifest.xml 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/controllers/robot_mechanism_controllers/manifest.xml 2008-11-24 18:09:44 UTC (rev 7212)
@@ -21,7 +21,7 @@
<repository>http://pr.willowgarage.com/repos</repository>
<export>
<cpp cflags="-I${prefix}/include -I${prefix}/msg/cpp -I${prefix}/srv/cpp"
- lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lrobot_mechanism_controllers" />
+ lflags="${prefix}/lib/librobot_mechanism_controllers.a" />
</export>
</package>
Modified: pkg/trunk/drivers/motor/ethercat_hardware/manifest.xml
===================================================================
--- pkg/trunk/drivers/motor/ethercat_hardware/manifest.xml 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/drivers/motor/ethercat_hardware/manifest.xml 2008-11-24 18:09:44 UTC (rev 7212)
@@ -13,6 +13,7 @@
<depend package='loki' />
<depend package='misc_utils' />
<depend package='robot_msgs' />
+<depend package='xenomai' />
<export>
<cpp cflags="-I${prefix}/include" lflags="-L${prefix}/lib -lethercat_hardware -Wl,-rpath,${prefix}/lib"/>
</export>
Modified: pkg/trunk/mechanism/mechanism_control/CMakeLists.txt
===================================================================
--- pkg/trunk/mechanism/mechanism_control/CMakeLists.txt 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/mechanism/mechanism_control/CMakeLists.txt 2008-11-24 18:09:44 UTC (rev 7212)
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
include(rosbuild)
+set(ROS_BUILD_STATIC_LIBS true)
+set(ROS_BUILD_SHARED_LIBS false)
rospack(mechanism_control)
rospack_add_library(mechanism_control src/mechanism_control.cpp)
#rospack_add_executable(ms_publisher_test test/ms_publisher_test.cpp)
Modified: pkg/trunk/mechanism/mechanism_control/manifest.xml
===================================================================
--- pkg/trunk/mechanism/mechanism_control/manifest.xml 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/mechanism/mechanism_control/manifest.xml 2008-11-24 18:09:44 UTC (rev 7212)
@@ -17,7 +17,7 @@
<depend package="robot_srvs" />
<export>
<cpp cflags='-I${prefix}/include'
- lflags='-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lmechanism_control'/>
+ lflags='${prefix}/lib/libmechanism_control.a'/>
</export>
</package>
Modified: pkg/trunk/robot_control_loops/pr2_etherCAT/manifest.xml
===================================================================
--- pkg/trunk/robot_control_loops/pr2_etherCAT/manifest.xml 2008-11-24 17:36:58 UTC (rev 7211)
+++ pkg/trunk/robot_control_loops/pr2_etherCAT/manifest.xml 2008-11-24 18:09:44 UTC (rev 7212)
@@ -5,7 +5,7 @@
<author>Rob Wheeler/wh...@wi...</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
- <depend package="mechanism_control_rt"/>
+ <depend package="mechanism_control"/>
<depend package="roscpp" />
<depend package="ethercat_hardware"/>
<depend package="hardware_interface"/>
@@ -14,6 +14,7 @@
<depend package="pr2_mechanism_controllers"/>
<depend package="gripper_qualification_controllers"/>
<depend package="joint_qualification_controllers"/>
+ <depend package="xenomai"/>
<url>http://pr.willowgarage.com</url>
<repository>http://pr.willowgarage.com/repos</repository>
</package>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rob...@us...> - 2008-11-25 01:29:10
|
Revision: 7242
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7242&view=rev
Author: rob_wheeler
Date: 2008-11-25 01:29:02 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
Use Loki's factory which is held in a SingletonHolder and cleans up after itself properly. Remove Stu's Factory (based on the Loki one).
Modified Paths:
--------------
pkg/trunk/mechanism/mechanism_control/src/mechanism_control.cpp
pkg/trunk/mechanism/mechanism_model/include/mechanism_model/controller.h
pkg/trunk/mechanism/mechanism_model/include/mechanism_model/transmission.h
pkg/trunk/mechanism/mechanism_model/manifest.xml
pkg/trunk/mechanism/mechanism_model/src/robot.cpp
Removed Paths:
-------------
pkg/trunk/util/misc_utils/include/misc_utils/factory.h
Modified: pkg/trunk/mechanism/mechanism_control/src/mechanism_control.cpp
===================================================================
--- pkg/trunk/mechanism/mechanism_control/src/mechanism_control.cpp 2008-11-25 01:15:13 UTC (rev 7241)
+++ pkg/trunk/mechanism/mechanism_control/src/mechanism_control.cpp 2008-11-25 01:29:02 UTC (rev 7242)
@@ -136,7 +136,7 @@
const std::string &name,
TiXmlElement *config)
{
- controller::Controller *c = controller::ControllerFactory::instance().create(type);
+ controller::Controller *c = controller::ControllerFactory::Instance().CreateObject(type);
if (c == NULL)
return false;
printf("Spawning %s: %p\n", name.c_str(), &model_);
@@ -321,10 +321,8 @@
robot_srvs::ListControllerTypes::request &req,
robot_srvs::ListControllerTypes::response &resp)
{
- std::vector<std::string> types;
-
(void) req;
- controller::ControllerFactory::instance().getTypes(&types);
+ std::vector<std::string> types = controller::ControllerFactory::Instance().RegisteredIds();
resp.set_types_vec(types);
return true;
}
Modified: pkg/trunk/mechanism/mechanism_model/include/mechanism_model/controller.h
===================================================================
--- pkg/trunk/mechanism/mechanism_model/include/mechanism_model/controller.h 2008-11-25 01:15:13 UTC (rev 7241)
+++ pkg/trunk/mechanism/mechanism_model/include/mechanism_model/controller.h 2008-11-25 01:29:02 UTC (rev 7242)
@@ -42,7 +42,7 @@
*/
/***************************************************/
-#include <misc_utils/factory.h>
+#include <loki/Factory.h>
#include <mechanism_model/robot.h>
#include <tinyxml/tinyxml.h>
@@ -71,12 +71,17 @@
class Controller;
-typedef misc_utils::Factory<Controller> ControllerFactory;
+typedef Loki::SingletonHolder
+<
+ Loki::Factory< Controller, std::string >,
+ Loki::CreateUsingNew,
+ Loki::LongevityLifetime::DieAsSmallObjectChild
+> ControllerFactory;
#define ROS_REGISTER_CONTROLLER(c) \
controller::Controller *ROS_New_##c() { return new c(); } \
bool ROS_CONTROLLER_##c = \
- controller::ControllerFactory::instance().registerType(#c, ROS_New_##c);
+ controller::ControllerFactory::Instance().Register(#c, ROS_New_##c);
class Controller
{
Modified: pkg/trunk/mechanism/mechanism_model/include/mechanism_model/transmission.h
===================================================================
--- pkg/trunk/mechanism/mechanism_model/include/mechanism_model/transmission.h 2008-11-25 01:15:13 UTC (rev 7241)
+++ pkg/trunk/mechanism/mechanism_model/include/mechanism_model/transmission.h 2008-11-25 01:29:02 UTC (rev 7242)
@@ -38,7 +38,7 @@
#define TRANSMISSION_H
#include <tinyxml/tinyxml.h>
-#include <misc_utils/factory.h>
+#include <loki/Factory.h>
#include "mechanism_model/joint.h"
#include "hardware_interface/hardware_interface.h"
@@ -47,12 +47,17 @@
class Robot;
class Transmission;
-typedef misc_utils::Factory<Transmission> TransmissionFactory;
+typedef Loki::SingletonHolder
+<
+ Loki::Factory< Transmission, std::string >,
+ Loki::CreateUsingNew,
+ Loki::LongevityLifetime::DieAsSmallObjectChild
+> TransmissionFactory;
#define ROS_REGISTER_TRANSMISSION(c) \
mechanism::Transmission *ROS_New_##c() { return new c(); } \
bool ROS_TRANSMISSION_##c = \
- mechanism::TransmissionFactory::instance().registerType(#c, ROS_New_##c);
+ mechanism::TransmissionFactory::Instance().Register(#c, ROS_New_##c);
class Transmission
Modified: pkg/trunk/mechanism/mechanism_model/manifest.xml
===================================================================
--- pkg/trunk/mechanism/mechanism_model/manifest.xml 2008-11-25 01:15:13 UTC (rev 7241)
+++ pkg/trunk/mechanism/mechanism_model/manifest.xml 2008-11-25 01:29:02 UTC (rev 7242)
@@ -7,7 +7,7 @@
<depend package="roscpp" />
<depend package="hardware_interface" />
<depend package="stl_utils" />
-<depend package="misc_utils" />
+<depend package="loki" />
<depend package="tinyxml" />
<depend package="wg_robot_description_parser" />
<depend package="tf" />
Modified: pkg/trunk/mechanism/mechanism_model/src/robot.cpp
===================================================================
--- pkg/trunk/mechanism/mechanism_model/src/robot.cpp 2008-11-25 01:15:13 UTC (rev 7241)
+++ pkg/trunk/mechanism/mechanism_model/src/robot.cpp 2008-11-25 01:29:02 UTC (rev 7242)
@@ -57,7 +57,7 @@
xit = xit->NextSiblingElement("transmission"))
{
const char *type = xit->Attribute("type");
- Transmission *t = type ? TransmissionFactory::instance().create(type) : NULL;
+ Transmission *t = type ? TransmissionFactory::Instance().CreateObject(type) : NULL;
if (!t)
fprintf(stderr, "Unknown transmission type: \"%s\"\n", type);
else if (!t->initXml(xit, this))
Deleted: pkg/trunk/util/misc_utils/include/misc_utils/factory.h
===================================================================
--- pkg/trunk/util/misc_utils/include/misc_utils/factory.h 2008-11-25 01:15:13 UTC (rev 7241)
+++ pkg/trunk/util/misc_utils/include/misc_utils/factory.h 2008-11-25 01:29:02 UTC (rev 7242)
@@ -1,86 +0,0 @@
-/*
- * 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.
- */
-#ifndef ROS_MISC_FACTORY_H
-#define ROS_MISC_FACTORY_H
-
-#include <string>
-#include <map>
-#include <vector>
-
-namespace misc_utils {
-
-template <class BaseResult,
- class Constructor = BaseResult* (*)()>
-class Factory
-{
-public:
- static Factory<BaseResult>& instance()
- {
- static Factory<BaseResult> *instance = NULL;
- if (instance == NULL)
- instance = new Factory<BaseResult>;
- return *instance;
- }
-
- BaseResult *create(const std::string &name)
- {
- typename ConstructorMap::iterator it = types_.find(name);
- if (it == types_.end())
- return NULL;
- return (it->second)();
- }
-
- bool registerType(const std::string &name, Constructor c)
- {
- typename ConstructorMap::value_type value(name, c);
- types_.insert(value);
- return true;
- }
-
- void getTypes(std::vector<std::string> *result)
- {
- result->resize(types_.size());
- int i = 0;
- typename ConstructorMap::const_iterator it;
- for (it = types_.begin(); it != types_.end(); ++it)
- (*result)[i++] = it->first;
- }
-
-private:
- Factory() {}
- ~Factory() {}
-
- typedef std::map<std::string,Constructor> ConstructorMap;
- ConstructorMap types_;
-};
-
-}
-
-
-#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pof...@us...> - 2008-11-25 02:03:55
|
Revision: 7248
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7248&view=rev
Author: poftwaresatent
Date: 2008-11-25 02:03:52 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
Incorporating Max's recent commits into sbpl_util and highlevel_controllers.
* Added "generic" waypoint list and conversion from SBPLPlanner's raw
state ID vector plans. The conversion also computes some overall
plan "quality measures" in case you need them:
* cumulated plan length
* cumulated tangential direction change
* cumulated theta change
* Extended ompl::SBPLPlannerStatistics and
ompl::SBPLPlannerManager::replan() with:
* bool stop_at_first_solution
* bool plan_from_scratch
* int solution_cost
Modified Paths:
--------------
pkg/trunk/highlevel/highlevel_controllers/include/MoveBase.hh
pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp
pkg/trunk/highlevel/highlevel_controllers/src/move_base_sbpl.cpp
pkg/trunk/motion_planning/sbpl_util/CMakeLists.txt
pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.cpp
pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.hh
Added Paths:
-----------
pkg/trunk/motion_planning/sbpl_util/src/plan_wrap.cpp
pkg/trunk/motion_planning/sbpl_util/src/plan_wrap.h
Modified: pkg/trunk/highlevel/highlevel_controllers/include/MoveBase.hh
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/include/MoveBase.hh 2008-11-25 01:51:45 UTC (rev 7247)
+++ pkg/trunk/highlevel/highlevel_controllers/include/MoveBase.hh 2008-11-25 02:03:52 UTC (rev 7248)
@@ -42,6 +42,9 @@
#include <costmap_2d/costmap_2d.h>
#include <costmap_2d/basic_observation_buffer.h>
+// Generic OMPL plan representation (will move into <sbpl_util/...> or <ompl_tools/...> later)
+#include <plan_wrap.h>
+
// Message structures used
#include <std_msgs/Planner2DState.h>
#include <std_msgs/Planner2DGoal.h>
@@ -107,8 +110,14 @@
* @see publishPlan
*/
void updatePlan(const std::list<std_msgs::Pose2DFloat32>& newPlan);
-
+
/**
+ * @brief Overwrites the current plan with a new one. Will handle suitable publication
+ * @see publishPlan
+ */
+ void updatePlan(ompl::waypoint_plan_t const & newPlan);
+
+ /**
* @brief test the current plan for collisions with obstacles
*/
bool inCollision() const;
Modified: pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp 2008-11-25 01:51:45 UTC (rev 7247)
+++ pkg/trunk/highlevel/highlevel_controllers/src/MoveBase.cpp 2008-11-25 02:03:52 UTC (rev 7248)
@@ -41,6 +41,8 @@
#include <std_msgs/Polyline2D.h>
#include <std_srvs/StaticMap.h>
#include <std_msgs/PointStamped.h>
+#include <algorithm>
+#include <iterator>
namespace ros {
namespace highlevel_controllers {
@@ -417,6 +419,16 @@
unlock();
}
+
+ /** \todo Some code duplication wrt MoveBase::updatePlan(const std::list<std_msgs::Pose2DFloat32>&). */
+ void MoveBase::updatePlan(ompl::waypoint_plan_t const & newPlan) {
+ sentry<MoveBase> guard(this);
+ if (!isValid() || plan_.size() > newPlan.size()){
+ plan_.clear();
+ std::copy(newPlan.begin(), newPlan.end(), std::back_inserter(plan_));
+ publishPath(true, plan_);
+ }
+ }
/**
* This is used as a validation check and is only called from within dispatchCommands where the lock has already been
Modified: pkg/trunk/highlevel/highlevel_controllers/src/move_base_sbpl.cpp
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/src/move_base_sbpl.cpp 2008-11-25 01:51:45 UTC (rev 7247)
+++ pkg/trunk/highlevel/highlevel_controllers/src/move_base_sbpl.cpp 2008-11-25 02:03:52 UTC (rev 7248)
@@ -66,6 +66,7 @@
#include <MoveBase.hh>
#include <sbpl_util.hh>
#include <environment_wrap.h>
+#include <plan_wrap.h>
//sbpl headers file
#include <headers.h>
@@ -338,49 +339,29 @@
// Invoke the planner, updating the statistics in the process.
std::vector<int> solutionStateIDs;
statsEntry.allocated_time_sec = plannerTimeLimit_;
- statsEntry.status = pMgr_->replan(statsEntry.allocated_time_sec,
+ statsEntry.stop_at_first_solution = false;
+ statsEntry.plan_from_scratch = false;
+ statsEntry.status = pMgr_->replan(statsEntry.stop_at_first_solution,
+ statsEntry.plan_from_scratch,
+ statsEntry.allocated_time_sec,
&statsEntry.actual_time_wall_sec,
&statsEntry.actual_time_user_sec,
&statsEntry.actual_time_system_sec,
+ &statsEntry.solution_cost,
&solutionStateIDs);
-#warning 'use the (upcoming) sbpl_util/plan_wrap.h for plan conversion'
// Extract the solution, if available, and update statistics (as usual).
statsEntry.plan_length_m = 0;
statsEntry.plan_angle_change_rad = 0;
if ((1 == statsEntry.status) && (1 < solutionStateIDs.size())) {
- std::list<std_msgs::Pose2DFloat32> plan;
- double prevx(0), prevy(0), prevth(0);
- prevth = 42.17; // to detect when it has been initialized (see 42 below)
- for(std::vector<int>::const_iterator it = solutionStateIDs.begin(); it != solutionStateIDs.end(); ++it){
- std_msgs::Pose2DFloat32 const waypoint(env_->GetPoseFromState(*it));
-
- // update stats:
- // - first round, nothing to do
- // - second round, update path length only
- // - third round, update path length and angular change
- if (plan.empty()) {
- prevx = waypoint.x;
- prevy = waypoint.y;
- }
- else {
- double const dx(waypoint.x - prevx);
- double const dy(waypoint.y - prevy);
- statsEntry.plan_length_m += sqrt(pow(dx, 2) + pow(dy, 2));
- double const th(atan2(dy, dx));
- if (42 > prevth) // see 42.17 above
- statsEntry.plan_angle_change_rad += fabs(mod2pi(th - prevth));
- prevx = waypoint.x;
- prevy = waypoint.y;
- prevth = th;
- }
-
- plan.push_back(waypoint);
- }
- // probably we should add the delta from the last theta to
- // the goal theta onto statsEntry.plan_angle_change_rad here, but
- // that depends on whether our planner handles theta for us,
- // and needs special handling if we have no plan...
+ ompl::waypoint_plan_t plan;
+ ompl::convertPlan(*env_,
+ solutionStateIDs,
+ &plan,
+ &statsEntry.plan_length_m,
+ &statsEntry.plan_angle_change_rad,
+ 0 // should be non-null for 3DKIN planning...
+ );
{
ostringstream prefix_os;
prefix_os << "[" << goalCount_ << "] ";
Modified: pkg/trunk/motion_planning/sbpl_util/CMakeLists.txt
===================================================================
--- pkg/trunk/motion_planning/sbpl_util/CMakeLists.txt 2008-11-25 01:51:45 UTC (rev 7247)
+++ pkg/trunk/motion_planning/sbpl_util/CMakeLists.txt 2008-11-25 02:03:52 UTC (rev 7248)
@@ -14,7 +14,8 @@
src/sbpl_util.cpp
src/costmap_wrap.cpp
src/footprint.cpp
- src/environment_wrap.cpp)
+ src/environment_wrap.cpp
+ src/plan_wrap.cpp)
target_link_libraries (sbpl_util costmap_2d)
rospack_add_executable (t3dobst src/t3dobst.cpp)
Added: pkg/trunk/motion_planning/sbpl_util/src/plan_wrap.cpp
===================================================================
--- pkg/trunk/motion_planning/sbpl_util/src/plan_wrap.cpp (rev 0)
+++ pkg/trunk/motion_planning/sbpl_util/src/plan_wrap.cpp 2008-11-25 02:03:52 UTC (rev 7248)
@@ -0,0 +1,90 @@
+/*********************************************************************
+ * 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.
+ *********************************************************************/
+
+#include "plan_wrap.h"
+#include "environment_wrap.h"
+#include <sfl/util/numeric.hpp>
+
+namespace ompl {
+
+ void convertPlan(EnvironmentWrapper const & environment,
+ raw_sbpl_plan_t const & raw,
+ waypoint_plan_t * plan,
+ double * optPlanLengthM,
+ double * optTangentChangeRad,
+ double * optDirectionChangeRad)
+ {
+ double tmpPlanLengthM;
+ double tmpTangentChangeRad;
+ double tmpDirectionChangeRad;
+ double * planLengthM(optPlanLengthM ? optPlanLengthM : &tmpPlanLengthM);
+ double * tangentChangeRad(optTangentChangeRad ? optTangentChangeRad : &tmpTangentChangeRad);
+ double * directionChangeRad(optDirectionChangeRad ? optDirectionChangeRad : &tmpDirectionChangeRad);
+ *planLengthM = 0;
+ *tangentChangeRad = 0;
+ *directionChangeRad = 0;
+
+ double prevx(0), prevy(0), prevtan(0), prevdir(0);
+ prevtan = 42.17; // to detect when it has been initialized (see 42 below)
+ for (raw_sbpl_plan_t::const_iterator it(raw.begin()); it != raw.end(); ++it) {
+ std_msgs::Pose2DFloat32 const waypoint(environment.GetPoseFromState(*it));
+
+ // update stats:
+ // - first round, nothing to do
+ // - second round, update path length only
+ // - third round, update path length and angular change
+ if (plan->empty()) {
+ prevx = waypoint.x;
+ prevy = waypoint.y;
+ prevdir = waypoint.th;
+ }
+ else {
+ double const dx(waypoint.x - prevx);
+ double const dy(waypoint.y - prevy);
+ *planLengthM += sqrt(pow(dx, 2) + pow(dy, 2));
+ *directionChangeRad += fabs(sfl::mod2pi(waypoint.th - prevdir));
+ double const tangent(atan2(dy, dx));
+ if (42 > prevtan) // see 42.17 above
+ *tangentChangeRad += fabs(sfl::mod2pi(tangent - prevtan));
+ prevx = waypoint.x;
+ prevy = waypoint.y;
+ prevdir = waypoint.th;
+ prevtan = tangent;
+ }
+
+ plan->push_back(waypoint);
+ }
+ }
+
+}
Added: pkg/trunk/motion_planning/sbpl_util/src/plan_wrap.h
===================================================================
--- pkg/trunk/motion_planning/sbpl_util/src/plan_wrap.h (rev 0)
+++ pkg/trunk/motion_planning/sbpl_util/src/plan_wrap.h 2008-11-25 02:03:52 UTC (rev 7248)
@@ -0,0 +1,76 @@
+/*********************************************************************
+ * 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 OMPL_PLAN_WRAP_HPP
+#define OMPL_PLAN_WRAP_HPP
+
+#include <std_msgs/Pose2DFloat32.h>
+#include <vector>
+
+namespace ompl {
+
+ typedef std::vector<int> raw_sbpl_plan_t;
+ typedef std::vector<std_msgs::Pose2DFloat32> waypoint_plan_t;
+
+ class EnvironmentWrapper;
+
+ /**
+ Convert a plan from a raw state ID sequence (as computed by
+ SBPLPlanner subclasses) to waypoints that are
+ understandable. Optionally provides some statistics on the plan.
+ */
+ void convertPlan(/** in: how to translate state IDs to std_msgs::Pose2DFloat32 */
+ EnvironmentWrapper const & environment,
+ /** in: the raw plan */
+ raw_sbpl_plan_t const & raw,
+ /** out: the converted plan (it is just appended
+ to, not cleared for you) */
+ waypoint_plan_t * plan,
+ /** optional out: the cumulated path length */
+ double * optPlanLengthM,
+ /** optional out: the cumulated change in the path
+ tangential direction (the angle between the
+ x-axis and the delta between two successive
+ waypoints) */
+ double * optTangentChangeRad,
+ /** optional out: the cumulated change in the
+ direction of the waypoints (the delta of
+ std_msgs::Pose2DFloat32::th values).
+ \note This only makes sense for plans that are
+ aware of the robot's heading though. */
+ double * optDirectionChangeRad);
+
+}
+
+#endif // OMPL_PLAN_WRAP_HPP
Modified: pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.cpp
===================================================================
--- pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.cpp 2008-11-25 01:51:45 UTC (rev 7247)
+++ pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.cpp 2008-11-25 02:03:52 UTC (rev 7248)
@@ -157,22 +157,33 @@
int SBPLPlannerManager::
- replan(double allocated_time_sec,
+ replan(bool stop_at_first_solution,
+ bool plan_from_scratch,
+ double allocated_time_sec,
double * actual_time_wall_sec,
double * actual_time_user_sec,
double * actual_time_system_sec,
+ int * solution_cost,
vector<int>* solution_stateIDs_V) throw(no_planner_selected)
{
if ( ! planner_)
throw no_planner_selected();
+ if (stop_at_first_solution)
+ planner_->set_search_mode(true);
+ else
+ planner_->set_search_mode(false);
+
+ if (plan_from_scratch)
+ force_planning_from_scratch();
+
struct rusage ru_started;
struct timeval t_started;
getrusage(RUSAGE_SELF, &ru_started);
gettimeofday(&t_started, 0);
+
+ int const status(planner_->replan(allocated_time_sec, solution_stateIDs_V, solution_cost));
- int const status(planner_->replan(allocated_time_sec, solution_stateIDs_V));
-
struct rusage ru_finished;
struct timeval t_finished;
getrusage(RUSAGE_SELF, &ru_finished);
@@ -263,22 +274,9 @@
void SBPLPlannerStatistics::entry::
logInfo(char const * prefix) const
{
- ROS_INFO("%s\n"
- "%splanner: %s\n"
- "%sgoal (map/grid/state): %+8.3f %+8.3f %+8.3f / %u %u / %d\n"
- "%sstart (map/grid/state): %+8.3f %+8.3f %+8.3f / %u %u / %d\n"
- "%stime [s] (actual/alloc): %g / %g\n"
- "%sstatus (1 == SUCCESS): %d\n"
- "%splan_length [m]: %+8.3f\n"
- "%splan_rotation [rad]: %+8.3f\n",
- prefix,
- prefix, plannerType.c_str(),
- prefix, goal.x, goal.y, goal.th, goalIx, goalIy, goalState,
- prefix, start.x, start.y, start.th, startIx, startIy, startState,
- prefix, actual_time_wall_sec, allocated_time_sec,
- prefix, status,
- prefix, plan_length_m,
- prefix, plan_angle_change_rad);
+ ostringstream os;
+ logStream(os, "ompl::SBPLPlannerStatistics", prefix);
+ ROS_INFO("%s", os.str().c_str());
}
@@ -313,10 +311,13 @@
<< prefix << "start map: " << start.x << " " << start.y << " " << start.th << "\n"
<< prefix << "start grid: " << startIx << " " << startIy << "\n"
<< prefix << "start state: " << startState << "\n"
+ << prefix << "stop at first solution:" << (stop_at_first_solution ? "true\n" : "false\n")
+ << prefix << "plan from scratch: " << (plan_from_scratch ? "true\n" : "false\n")
<< prefix << "time alloc: " << allocated_time_sec << "\n"
<< prefix << "time actual (wall): " << actual_time_wall_sec << "\n"
<< prefix << "time actual (user): " << actual_time_user_sec << "\n"
<< prefix << "time actual (system): " << actual_time_system_sec << "\n"
+ << prefix << "solution cost: " << solution_cost << "\n"
<< prefix << "status (1 == SUCCESS): " << status << "\n"
<< prefix << "plan_length [m]: " << plan_length_m << "\n"
<< prefix << "plan_rotation [rad]: " << plan_angle_change_rad << "\n";
Modified: pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.hh
===================================================================
--- pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.hh 2008-11-25 01:51:45 UTC (rev 7247)
+++ pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.hh 2008-11-25 02:03:52 UTC (rev 7248)
@@ -112,12 +112,15 @@
unsigned int startIx; /**< x-index of the start in the costmap */
unsigned int startIy; /**< y-index of the start in the costmap */
int startState; /**< stateID of the start (from costmap indices) */
+ bool stop_at_first_solution; /**< whether to just plan until any plan is found */
+ bool plan_from_scratch; /**< whether to discard any previous solutions */
double allocated_time_sec; /**< the amount of time we had available for planning */
double actual_time_wall_sec; /**< the amount of time actually used for planning (wallclock) */
double actual_time_user_sec; /**< the amount of time actually used for planning (user time) */
double actual_time_system_sec; /**< the amount of time actually used for planning (system time) */
int status; /**< return value of replan() (i.e. success == 1, or -42 if replan() never got called) */
+ int solution_cost; /**< cost of the solution, as given by replan() */
double plan_length_m; /**< cumulated Euclidean distance between planned waypoints */
double plan_angle_change_rad; /**< cumulated abs(delta(angle)) along planned waypoints */
@@ -195,11 +198,28 @@
/** Dispatch to the currently select()-ed planner's
SBPLPlanner::replan(), measuring the time it actually takes to
- run it. */
- int replan(double allocated_time_sec,
+ run it.
+
+ \note You can use ompl::convertPlan() to translate the
+ solution_stateIDs_V into something more generic.
+
+ \return The status returned by SBPLPlanner::replan().
+ */
+ int replan(/** in: whether to just return the first feasible solution */
+ bool stop_at_first_solution,
+ /** in: whether to forcefully re-initialize the planner */
+ bool plan_from_scratch,
+ /** in: how much time is allocated for planning */
+ double allocated_time_sec,
+ /** out: how much time was actually used by the planner (wallclock) */
double * actual_time_wall_sec,
+ /** out: how much time was actually used by the planner (user time) */
double * actual_time_user_sec,
+ /** out: how much time was actually used by the planner (system time) */
double * actual_time_system_sec,
+ /** out: the cost of the planned path */
+ int * solution_cost,
+ /** out: the planned path, as a succession of state IDs */
std::vector<int>* solution_stateIDs_V) throw(no_planner_selected);
/** Dispatch to the currently select()-ed planner's
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jl...@us...> - 2008-11-25 07:10:38
|
Revision: 7272
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7272&view=rev
Author: jleibs
Date: 2008-11-25 07:10:27 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
Changes to make stereo_view cleanly work with color calibration.
Modified Paths:
--------------
pkg/trunk/image_msgs/include/image_msgs/CvBridge.h
pkg/trunk/image_msgs/manifest.xml
pkg/trunk/vision/color_calib/CMakeLists.txt
pkg/trunk/vision/color_calib/calib_node.cpp
pkg/trunk/vision/color_calib/calib_node_dcam.cpp
pkg/trunk/vision/color_calib/calib_test.cpp
pkg/trunk/vision/color_calib/libcolorcalib.cpp
pkg/trunk/vision/stereo_view/manifest.xml
pkg/trunk/vision/stereo_view/stereo_view.cpp
Added Paths:
-----------
pkg/trunk/vision/color_calib/calibration.cpp
pkg/trunk/vision/color_calib/color_calib.h
Removed Paths:
-------------
pkg/trunk/vision/color_calib/colorcalib.h
Modified: pkg/trunk/image_msgs/include/image_msgs/CvBridge.h
===================================================================
--- pkg/trunk/image_msgs/include/image_msgs/CvBridge.h 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/image_msgs/include/image_msgs/CvBridge.h 2008-11-25 07:10:27 UTC (rev 7272)
@@ -38,7 +38,6 @@
#include "image_msgs/Image.h"
#include "opencv/cxcore.h"
-
namespace image_msgs
{
@@ -48,21 +47,21 @@
IplImage* rosimg_;
IplImage* cvtimg_;
- void reallocCvtIfNeeded(CvSize sz, int depth, int channels)
+ void reallocIfNeeded_(IplImage** img, CvSize sz, int depth, int channels)
{
- if (cvtimg_ != 0)
- if (cvtimg_->width != sz.width ||
- cvtimg_->height != sz.height ||
- cvtimg_->depth != depth ||
- cvtimg_->nChannels != channels)
+ if ((*img) != 0)
+ if ((*img)->width != sz.width ||
+ (*img)->height != sz.height ||
+ (*img)->depth != depth ||
+ (*img)->nChannels != channels)
{
- cvReleaseImage(&cvtimg_);
- cvtimg_ = 0;
+ cvReleaseImage(img);
+ *img = 0;
}
- if (cvtimg_ == 0)
+ if (*img == 0)
{
- cvtimg_ = cvCreateImage(sz, depth, channels);
+ *img = cvCreateImage(sz, depth, channels);
}
}
@@ -109,13 +108,13 @@
{
if (encoding == "bgr" && rosimg.encoding == "rgb")
{
- reallocCvtIfNeeded(cvGetSize(rosimg_), IPL_DEPTH_8U, 3);
+ reallocIfNeeded(&cvtimg_, IPL_DEPTH_8U, 3);
cvCvtColor(rosimg_, cvtimg_, CV_RGB2BGR);
img_ = cvtimg_;
}
else if (encoding == "bgr" && rosimg.encoding == "mono" )
{
- reallocCvtIfNeeded(cvGetSize(rosimg_), IPL_DEPTH_8U, 3);
+ reallocIfNeeded(&cvtimg_, IPL_DEPTH_8U, 3);
cvCvtColor(rosimg_, cvtimg_, CV_GRAY2BGR);
img_ = cvtimg_;
}
@@ -126,8 +125,15 @@
}
return true;
}
- private:
+ void reallocIfNeeded(IplImage** img, int depth = -1, int channels = -1)
+ {
+ if (depth == -1)
+ depth = img_->depth;
+ if (channels == -1)
+ channels = img_->nChannels;
+ reallocIfNeeded_(img, cvGetSize(img_), depth, channels);
+ }
};
}
Modified: pkg/trunk/image_msgs/manifest.xml
===================================================================
--- pkg/trunk/image_msgs/manifest.xml 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/image_msgs/manifest.xml 2008-11-25 07:10:27 UTC (rev 7272)
@@ -4,8 +4,8 @@
<license>BSD</license>
<review status="unreviewed" notes=""/>
<depend package="std_msgs"/>
+ <depend package="dcam"/>
<depend package="opencv_latest"/>
- <depend package="dcam"/>
<export>
<cpp cflags="-I${prefix}/include -I${prefix}/msg/cpp"/>
</export>
Modified: pkg/trunk/vision/color_calib/CMakeLists.txt
===================================================================
--- pkg/trunk/vision/color_calib/CMakeLists.txt 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/vision/color_calib/CMakeLists.txt 2008-11-25 07:10:27 UTC (rev 7272)
@@ -5,7 +5,7 @@
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
-rospack_add_library(colorcalib libcolorcalib.cpp)
+rospack_add_library(colorcalib libcolorcalib.cpp calibration.cpp)
rospack_add_executable(calib_test calib_test.cpp)
target_link_libraries(calib_test colorcalib)
Modified: pkg/trunk/vision/color_calib/calib_node.cpp
===================================================================
--- pkg/trunk/vision/color_calib/calib_node.cpp 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/vision/color_calib/calib_node.cpp 2008-11-25 07:10:27 UTC (rev 7272)
@@ -44,9 +44,10 @@
#include <sys/stat.h>
-#include "colorcalib.h"
+#include "color_calib.h"
using namespace std;
+using namespace color_calib;
class ColorCalib : public ros::node
{
@@ -55,21 +56,15 @@
ros::thread::mutex cv_mutex;
- CvMat* color_cal;
-
bool first;
- ColorCalib() : node("color_calib", ros::node::ANONYMOUS_NAME), first(true)
+ Calibration color_cal;
+
+ ColorCalib() : node("color_calib", ros::node::ANONYMOUS_NAME), first(true), color_cal(this)
{
subscribe("images", image_msg, &ColorCalib::image_cb, 1);
- color_cal = cvCreateMat( 3, 3, CV_32FC1);
}
- ~ColorCalib()
- {
- cvReleaseMat(&color_cal);
- }
-
void image_cb()
{
if (!first)
@@ -96,27 +91,12 @@
find_calib(img2, color_cal, COLOR_CAL_BGR | COLOR_CAL_COMPAND_DISPLAY);
- printf("Color calibration:\n");
- for (int i = 0; i < 3; i ++)
- {
- for (int j = 0; j < 3; j++)
- {
- printf("%f ", cvmGet(color_cal, i, j));
- }
- printf("\n");
- }
-
IplImage* corrected_img = cvCreateImage(cvGetSize(img), IPL_DEPTH_32F, 3);
- cvTransform(img2, corrected_img, color_cal);
- XmlRpc::XmlRpcValue xml_color_cal;
- for (int i = 0; i < 3; i++)
- for (int j = 0; j < 3; j++)
- xml_color_cal[3*i + j] = cvmGet(color_cal, i, j);
-
- set_param(map_name("images") + std::string("/") + l + std::string("/color_cal"), xml_color_cal);
-
+ cvTransform(img2, corrected_img, color_cal.getCal());
+ color_cal.setParam(map_name("images") + std::string("/") + l);
+
cvNamedWindow("color_rect", CV_WINDOW_AUTOSIZE);
cvShowImage("color_rect", corrected_img);
Modified: pkg/trunk/vision/color_calib/calib_node_dcam.cpp
===================================================================
--- pkg/trunk/vision/color_calib/calib_node_dcam.cpp 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/vision/color_calib/calib_node_dcam.cpp 2008-11-25 07:10:27 UTC (rev 7272)
@@ -44,9 +44,10 @@
#include <sys/stat.h>
-#include "colorcalib.h"
+#include "color_calib.h"
using namespace std;
+using namespace color_calib;
class ColorCalib : public ros::node
{
@@ -56,21 +57,15 @@
ros::thread::mutex cv_mutex;
- CvMat* color_cal;
+ Calibration color_cal;
bool first;
- ColorCalib() : node("color_calib", ros::node::ANONYMOUS_NAME), first(true)
+ ColorCalib() : node("color_calib", ros::node::ANONYMOUS_NAME), color_cal(this), first(true)
{
subscribe("image", image, &ColorCalib::image_cb, 1);
- color_cal = cvCreateMat( 3, 3, CV_32FC1);
}
- ~ColorCalib()
- {
- cvReleaseMat(&color_cal);
- }
-
void image_cb()
{
if (!first)
@@ -90,26 +85,11 @@
find_calib(cv_img_decompand, color_cal, COLOR_CAL_BGR | COLOR_CAL_COMPAND_DISPLAY);
- printf("Color calibration:\n");
- for (int i = 0; i < 3; i ++)
- {
- for (int j = 0; j < 3; j++)
- {
- printf("%f ", cvmGet(color_cal, i, j));
- }
- printf("\n");
- }
+ color_cal.setParam("image");
IplImage* cv_img_correct = cvCreateImage(cvGetSize(cv_img), IPL_DEPTH_32F, 3);
- cvTransform(cv_img_decompand, cv_img_correct, color_cal);
+ cvTransform(cv_img_decompand, cv_img_correct, color_cal.getCal(COLOR_CAL_BGR));
- XmlRpc::XmlRpcValue xml_color_cal;
- for (int i = 0; i < 3; i++)
- for (int j = 0; j < 3; j++)
- xml_color_cal[3*i + j] = cvmGet(color_cal, i, j);
-
- set_param(map_name("image") + std::string("/") + std::string("/color_cal"), xml_color_cal);
-
cvNamedWindow("color_rect", CV_WINDOW_AUTOSIZE);
cvShowImage("color_rect", cv_img_correct);
Modified: pkg/trunk/vision/color_calib/calib_test.cpp
===================================================================
--- pkg/trunk/vision/color_calib/calib_test.cpp 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/vision/color_calib/calib_test.cpp 2008-11-25 07:10:27 UTC (rev 7272)
@@ -32,14 +32,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/
-#include "ros/node.h"
-
#include "opencv/cxcore.h"
#include "opencv/cv.h"
#include "opencv/highgui.h"
-#include "colorcalib.h"
+#include "color_calib.h"
+using namespace color_calib;
+
int main(int argc, char** argv)
{
IplImage* img = cvLoadImage(argv[1]);
@@ -47,22 +47,23 @@
// Load image
if (img)
{
- CvMat* color_cal = cvCreateMat( 3, 3, CV_32FC1);
IplImage* corrected_img = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 3);
- find_calib(img, color_cal);
+ Calibration cal(0);
+ find_calib(img, cal);
+
printf("Color calibration:\n");
for (int i = 0; i < 3; i ++)
{
for (int j = 0; j < 3; j++)
{
- printf("%f ", cvmGet(color_cal, i, j));
+ printf("%f ", cvmGet(cal.getCal(), i, j));
}
printf("\n");
}
- cvTransform(img, corrected_img, color_cal);
+ cvTransform(img, corrected_img, cal.getCal());
cvNamedWindow("color_rect", CV_WINDOW_AUTOSIZE);
cvShowImage("color_rect", corrected_img);
Added: pkg/trunk/vision/color_calib/calibration.cpp
===================================================================
--- pkg/trunk/vision/color_calib/calibration.cpp (rev 0)
+++ pkg/trunk/vision/color_calib/calibration.cpp 2008-11-25 07:10:27 UTC (rev 7272)
@@ -0,0 +1,162 @@
+/*********************************************************************
+* 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.
+*********************************************************************/
+
+#include "color_calib.h"
+
+#include "opencv/cxcore.h"
+#include "opencv/cv.h"
+#include "opencv/highgui.h"
+
+using namespace color_calib;
+
+color_calib::Calibration::Calibration(ros::node* node) : node_(node), color_cal_(NULL)
+{
+ color_cal_ = cvCreateMat(3, 3, CV_32FC1);
+ color_cal_bgr_ = cvCreateMat(3, 3, CV_32FC1);
+ cvSetIdentity(color_cal_, cvScalar(1.0));
+ cvSetIdentity(color_cal_bgr_, cvScalar(1.0));
+}
+
+color_calib::Calibration::~Calibration()
+{
+ if (color_cal_)
+ cvReleaseMat(&color_cal_);
+ if (color_cal_bgr_)
+ cvReleaseMat(&color_cal_bgr_);
+}
+
+bool
+color_calib::Calibration::getFromParam(std::string topic_name)
+{
+ if (node_)
+ {
+ std::string color_cal_str = (node_->map_name(topic_name) + std::string("/color_cal"));
+
+ if (node_->has_param(color_cal_str))
+ {
+ XmlRpc::XmlRpcValue xml_color_cal;
+ node_->get_param(color_cal_str, xml_color_cal);
+ for (int i = 0; i < 3; i++)
+ for (int j = 0; j < 3; j++)
+ {
+ cvmSet(color_cal_, i, j, (double)(xml_color_cal[3*i + j]));
+ }
+ populateBGR();
+ return true;
+ }
+ }
+ return false;
+}
+
+bool
+color_calib::Calibration::setParam(std::string topic_name)
+{
+ if (node_)
+ {
+ std::string color_cal_str = (node_->map_name(topic_name) + std::string("/color_cal"));
+
+ XmlRpc::XmlRpcValue xml_color_cal;
+ for (int i = 2; i >= 0; i--)
+ for (int j = 0; j < 3; j++)
+ xml_color_cal[3*i + j] = cvmGet(color_cal_, i, j);
+
+ node_->set_param(color_cal_str, xml_color_cal);
+
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+
+CvMat*
+color_calib::Calibration::getCal(uint32_t flag)
+{
+ if (flag & COLOR_CAL_BGR)
+ return color_cal_bgr_;
+ else
+ return color_cal_;
+}
+
+bool
+color_calib::Calibration::setCal(CvMat* cal, uint32_t flag)
+{
+ if (cal->height == 3 && cal->width==3)
+ {
+ if (flag & COLOR_CAL_BGR)
+ {
+ cvCopy(cal, color_cal_bgr_);
+ populateRGB();
+ } else {
+ cvCopy(cal, color_cal_);
+ populateBGR();
+ }
+ return true;
+ }
+ return false;
+}
+
+void
+color_calib::Calibration::populateBGR()
+{
+ for (int i = 0; i < 3; i++)
+ for (int j = 0; j < 3; j++)
+ cvmSet(color_cal_bgr_, 2-i, 2-j, cvmGet(color_cal_, i, j));
+}
+
+void
+color_calib::Calibration::populateRGB()
+{
+ for (int i = 0; i < 3; i++)
+ for (int j = 0; j < 3; j++)
+ cvmSet(color_cal_, 2-i, 2-j, cvmGet(color_cal_bgr_, i, j));
+}
+
+
+void
+color_calib::Calibration::correctColor(IplImage* src, IplImage* dst, bool do_decompand, bool do_recompand, uint32_t flags)
+{
+ if (do_decompand)
+ decompand(src, dst);
+
+ if (flags & COLOR_CAL_BGR)
+ cvTransform(dst, dst, color_cal_bgr_);
+ else
+ cvTransform(dst, dst, color_cal_);
+
+ if (do_recompand)
+ compand(dst, dst);
+}
Copied: pkg/trunk/vision/color_calib/color_calib.h (from rev 7259, pkg/trunk/vision/color_calib/colorcalib.h)
===================================================================
--- pkg/trunk/vision/color_calib/color_calib.h (rev 0)
+++ pkg/trunk/vision/color_calib/color_calib.h 2008-11-25 07:10:27 UTC (rev 7272)
@@ -0,0 +1,78 @@
+/*********************************************************************
+* 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 COLORCALIB_HH
+#define COLORCALIB_HH
+
+#include "opencv/cxcore.h"
+#include <string>
+#include "ros/node.h"
+
+static const uint32_t COLOR_CAL_BGR = 1;
+static const uint32_t COLOR_CAL_COMPAND_DISPLAY = 1 << 2;
+
+namespace color_calib
+{
+
+ class Calibration
+ {
+ ros::node* node_;
+
+ CvMat* color_cal_;
+ CvMat* color_cal_bgr_;
+ public:
+ Calibration(ros::node* node);
+ ~Calibration();
+
+ bool getFromParam(std::string topic_name_);
+ bool setParam(std::string topic_name_);
+
+ CvMat* getCal(uint32_t flag = 0);
+ bool setCal(CvMat* cal, uint32_t flag = 0);
+
+ void correctColor(IplImage* src, IplImage* dst, bool do_decompand, bool do_recompand, uint32_t flags = 0);
+
+ private:
+ void populateBGR();
+ void populateRGB();
+ };
+
+ float srgb2lrgb(float x);
+ float lrgb2srgb(float x);
+ void decompand(IplImage* src, IplImage* dst);
+ void compand(IplImage* src, IplImage* dst);
+ bool find_calib(IplImage* img, Calibration& cal, uint32_t flags=0);
+}
+
+#endif
Deleted: pkg/trunk/vision/color_calib/colorcalib.h
===================================================================
--- pkg/trunk/vision/color_calib/colorcalib.h 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/vision/color_calib/colorcalib.h 2008-11-25 07:10:27 UTC (rev 7272)
@@ -1,50 +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.
-*********************************************************************/
-
-#ifndef COLORCALIB_HH
-#define COLORCALIB_HH
-
-#include "opencv/cxcore.h"
-
-static const uint32_t COLOR_CAL_BGR = 1;
-static const uint32_t COLOR_CAL_FLOAT = 1 << 1;
-static const uint32_t COLOR_CAL_COMPAND_DISPLAY = 1 << 2;
-
-float srgb2lrgb(float x);
-float lrgb2srgb(float x);
-void decompand(IplImage* src, IplImage* dst);
-void compand(IplImage* src, IplImage* dst);
-bool find_calib(IplImage* img, CvMat* m, int flags=0);
-
-#endif
Modified: pkg/trunk/vision/color_calib/libcolorcalib.cpp
===================================================================
--- pkg/trunk/vision/color_calib/libcolorcalib.cpp 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/vision/color_calib/libcolorcalib.cpp 2008-11-25 07:10:27 UTC (rev 7272)
@@ -34,12 +34,14 @@
#include "ros/node.h"
-#include "colorcalib.h"
+#include "color_calib.h"
#include "opencv/cxcore.h"
#include "opencv/cv.h"
#include "opencv/highgui.h"
+using namespace color_calib;
+
IplImage* g_img;
IplImage* g_disp_img;
@@ -84,7 +86,7 @@
-float srgb2lrgb(float x)
+float color_calib::srgb2lrgb(float x)
{
if (x < 0.04045)
{
@@ -95,7 +97,7 @@
return x;
}
-float lrgb2srgb(float x)
+float color_calib::lrgb2srgb(float x)
{
if (x < 0.0031308)
{
@@ -106,7 +108,7 @@
return x;
}
-void compand(IplImage* src, IplImage* dst)
+void color_calib::compand(IplImage* src, IplImage* dst)
{
static int compandmap[4096];
static bool has_map = false;
@@ -161,7 +163,7 @@
}
-void decompand(IplImage* src, IplImage* dst)
+void color_calib::decompand(IplImage* src, IplImage* dst)
{
static float compandmap[1024];
static bool has_map = false;
@@ -197,13 +199,6 @@
for (int k = 0; k < src->nChannels; k++)
((float *)(dst->imageData + i*dst->widthStep))[j*dst->nChannels + k] =
compandmap[((uchar *)(src->imageData + i*src->widthStep))[j*src->nChannels + k] << 2];
- } else if (src->depth == IPL_DEPTH_8U && dst->depth == IPL_DEPTH_8U)
- {
- for (int i = 0; i < src->height; i++)
- for (int j = 0; j < src->width; j++)
- for (int k = 0; k < src->nChannels; k++)
- ((uchar *)(dst->imageData + i*dst->widthStep))[j*dst->nChannels + k] =
- compandmap[((uchar *)(src->imageData + i*src->widthStep))[j*src->nChannels + k] << 2]*255;
} else if (src->depth == IPL_DEPTH_32F && dst->depth == IPL_DEPTH_32F)
{
for (int i = 0; i < src->height; i++)
@@ -215,11 +210,18 @@
val = MIN(val, 1024);
((float *)(dst->imageData + i*dst->widthStep))[j*dst->nChannels + k] = compandmap[val];
}
- } else if (src->depth == IPL_DEPTH_32F && dst->depth == IPL_DEPTH_8U)
+ } else if (src->depth == IPL_DEPTH_8U && dst->depth == IPL_DEPTH_8U) // This probably shouldn't be allowed (loss of information)
{
for (int i = 0; i < src->height; i++)
for (int j = 0; j < src->width; j++)
for (int k = 0; k < src->nChannels; k++)
+ ((uchar *)(dst->imageData + i*dst->widthStep))[j*dst->nChannels + k] =
+ compandmap[((uchar *)(src->imageData + i*src->widthStep))[j*src->nChannels + k] << 2]*255;
+ } else if (src->depth == IPL_DEPTH_32F && dst->depth == IPL_DEPTH_8U) // This probably shouldn't be allowed (loss of information)
+ {
+ for (int i = 0; i < src->height; i++)
+ for (int j = 0; j < src->width; j++)
+ for (int k = 0; k < src->nChannels; k++)
{
int val = int(((float *)(src->imageData + i*src->widthStep))[j*src->nChannels + k]*1024.0);
val = MAX(val, 0);
@@ -319,7 +321,7 @@
}
}
-bool find_calib(IplImage* img, CvMat* mat, int flags)
+bool color_calib::find_calib(IplImage* img, Calibration& cal, uint32_t flags)
{
bool use_bgr = flags & COLOR_CAL_BGR;
@@ -345,7 +347,7 @@
CvScalar a = cvAvg(g_img);
printf("Avg value of g: %f %f %f\n", a.val[0], a.val[1], a.val[2]);
- if (g_img && mat)
+ if (g_img)
{
//Allocate matrices
g_real_corners = cvCreateMat( 4, 1, CV_32FC2);
@@ -389,8 +391,7 @@
g_meas_colors = cvCreateMat( 24, 3, CV_32FC1);
g_reproj_colors = cvCreateMat( 24, 3, CV_32FC1);
-
- g_color_cal = mat;
+ g_color_cal = cvCreateMat( 3, 3, CV_32FC1);
// Create display
cvNamedWindow("macbeth image", CV_WINDOW_AUTOSIZE);
@@ -403,6 +404,8 @@
usleep(1000);
}
+ cal.setCal(g_color_cal, flags);
+
cvDestroyWindow("macbeth image");
cvReleaseImage(&g_img);
@@ -412,6 +415,7 @@
cvReleaseMat(&g_real_colors);
cvReleaseMat(&g_meas_colors);
cvReleaseMat(&g_reproj_colors);
+ cvReleaseMat(&g_color_cal);
cvReleaseMat(&g_colors_pos);
cvReleaseMat(&g_hom);
Modified: pkg/trunk/vision/stereo_view/manifest.xml
===================================================================
--- pkg/trunk/vision/stereo_view/manifest.xml 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/vision/stereo_view/manifest.xml 2008-11-25 07:10:27 UTC (rev 7272)
@@ -11,4 +11,5 @@
<depend package="image_msgs"/>
<depend package="roscpp"/>
<depend package="topic_synchronizer"/>
+ <depend package="color_calib"/>
</package>
Modified: pkg/trunk/vision/stereo_view/stereo_view.cpp
===================================================================
--- pkg/trunk/vision/stereo_view/stereo_view.cpp 2008-11-25 07:07:21 UTC (rev 7271)
+++ pkg/trunk/vision/stereo_view/stereo_view.cpp 2008-11-25 07:10:27 UTC (rev 7272)
@@ -43,6 +43,8 @@
#include "image_msgs/Image.h"
#include "image_msgs/CvBridge.h"
+#include "color_calib.h"
+
#include "topic_synchronizer.h"
using namespace std;
@@ -60,11 +62,24 @@
image_msgs::CvBridge rbridge;
image_msgs::CvBridge dbridge;
+ color_calib::Calibration lcal;
+ color_calib::Calibration rcal;
+
+ IplImage* lcalimage;
+ IplImage* rcalimage;
+
TopicSynchronizer<StereoView> sync;
bool subscribe_color_;
+ bool calib_color_;
+ bool recompand_;
- StereoView() : ros::node("stereo_view"), sync(this, &StereoView::image_cb_all, ros::Duration(0.05), &StereoView::image_cb_timeout), subscribe_color_(false)
+ ros::thread::mutex cv_mutex;
+
+ StereoView() : ros::node("stereo_view"),
+ lcal(this), rcal(this), lcalimage(NULL), rcalimage(NULL),
+ sync(this, &StereoView::image_cb_all, ros::Duration(0.05), &StereoView::image_cb_timeout),
+ subscribe_color_(false), calib_color_(false), recompand_(false)
{
cvNamedWindow("left", CV_WINDOW_AUTOSIZE);
cvNamedWindow("right", CV_WINDOW_AUTOSIZE);
@@ -84,14 +99,44 @@
sync.subscribe("dcam/stereo_info", stinfo, 1);
}
+ ~StereoView()
+ {
+ if (lcalimage)
+ cvReleaseImage(&lcalimage);
+ if (rcalimage)
+ cvReleaseImage(&rcalimage);
+ }
+
void image_cb_all(ros::Time t)
{
+ cv_mutex.lock();
+
if (lbridge.fromImage(limage, "bgr"))
- cvShowImage("left", lbridge.toIpl());
+ {
+ if (calib_color_)
+ {
+ lbridge.reallocIfNeeded(&lcalimage, IPL_DEPTH_32F);
+ lcal.correctColor(lbridge.toIpl(), lcalimage, true, recompand_, COLOR_CAL_BGR);
+
+ cvShowImage("left", lcalimage);
+ } else
+ cvShowImage("left", lbridge.toIpl());
+ }
+
if (rbridge.fromImage(rimage, "bgr"))
- cvShowImage("right", rbridge.toIpl());
+ {
+ if (calib_color_)
+ {
+ rbridge.reallocIfNeeded(&rcalimage, IPL_DEPTH_32F);
+ rcal.correctColor(rbridge.toIpl(), rcalimage, true, recompand_, COLOR_CAL_BGR);
+
+ cvShowImage("right", rcalimage);
+ } else
+ cvShowImage("right", rbridge.toIpl());
+ }
+
if (dbridge.fromImage(dimage))
{
// Disparity has to be scaled to be be nicely displayable
@@ -101,7 +146,8 @@
cvReleaseImage(&disp);
}
- cvWaitKey(5);
+ cv_mutex.unlock();
+
}
void image_cb_timeout(ros::Time t)
@@ -118,6 +164,35 @@
//Proceed to show images anyways
image_cb_all(t);
}
+
+ bool spin()
+ {
+ while (ok())
+ {
+ cv_mutex.lock();
+ int key = cvWaitKey(3);
+
+ switch (key) {
+ case 10:
+ calib_color_ = !calib_color_;
+ break;
+ case 32:
+ recompand_ = !recompand_;
+ }
+
+ // Fetch color calibration parameters as necessary
+ if (calib_color_)
+ {
+ lcal.getFromParam("dcam/left/image_rect_color");
+ rcal.getFromParam("dcam/right/image_rect_color");
+ }
+
+ cv_mutex.unlock();
+ usleep(10000);
+ }
+
+ return true;
+ }
};
int main(int argc, char **argv)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rdi...@us...> - 2008-11-25 18:53:52
|
Revision: 7285
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7285&view=rev
Author: rdiankov
Date: 2008-11-25 18:53:40 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
updated openrave version
Modified Paths:
--------------
pkg/trunk/3rdparty/openrave/Makefile
pkg/trunk/robot_descriptions/openrave_robot_description/robots/pr2full.robot.xml
pkg/trunk/util/kinematics/libKinematics/CMakeLists.txt
Modified: pkg/trunk/3rdparty/openrave/Makefile
===================================================================
--- pkg/trunk/3rdparty/openrave/Makefile 2008-11-25 18:46:24 UTC (rev 7284)
+++ pkg/trunk/3rdparty/openrave/Makefile 2008-11-25 18:53:40 UTC (rev 7285)
@@ -2,7 +2,7 @@
SVN_DIR = openrave_svn
# Should really specify a revision
-SVN_REVISION = -r 500
+SVN_REVISION = -r 509
SVN_URL = https://openrave.svn.sourceforge.net/svnroot/openrave
include $(shell rospack find mk)/svn_checkout.mk
Modified: pkg/trunk/robot_descriptions/openrave_robot_description/robots/pr2full.robot.xml
===================================================================
--- pkg/trunk/robot_descriptions/openrave_robot_description/robots/pr2full.robot.xml 2008-11-25 18:46:24 UTC (rev 7284)
+++ pkg/trunk/robot_descriptions/openrave_robot_description/robots/pr2full.robot.xml 2008-11-25 18:53:40 UTC (rev 7285)
@@ -2,10 +2,6 @@
<Robot file="pr2.robot.xml">
<!-- left gripper -->
<Manipulator>
-<!-- <base>torso</base>
- <effector>left_gripper_palm</effector>
- <armjoints>left_shoulder_pan_joint left_shoulder_pitch_joint left_upper_arm_roll_joint left_elbow_flex_joint left_forearm_roll_joint left_wrist_flex_joint left_wrist_roll_joint</armjoints>
- <joints>left_gripper_l_finger_joint</joints> -->
<base>torso_lift_link</base>
<effector>l_gripper_palm_link</effector>
<armjoints>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</armjoints>
Modified: pkg/trunk/util/kinematics/libKinematics/CMakeLists.txt
===================================================================
--- pkg/trunk/util/kinematics/libKinematics/CMakeLists.txt 2008-11-25 18:46:24 UTC (rev 7284)
+++ pkg/trunk/util/kinematics/libKinematics/CMakeLists.txt 2008-11-25 18:53:40 UTC (rev 7285)
@@ -3,7 +3,7 @@
add_definitions(-Wall)
rospack(libKinematics)
rospack_add_library(libKinematics src/pr2_ik.cpp src/kinematics.cpp)
-set_target_properties(libKinematics PROPERTIES COMPILE_FLAGS "-O2")
+rospack_add_compile_flags(libKinematics "-O2")
rospack_add_executable(libKinematicsTest src/test/test_PR2ik.cpp)
target_link_libraries(libKinematicsTest libKinematics)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rdi...@us...> - 2008-11-26 00:00:35
|
Revision: 7313
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7313&view=rev
Author: rdiankov
Date: 2008-11-26 00:00:29 +0000 (Wed, 26 Nov 2008)
Log Message:
-----------
or_collision example is usable as a command-line tool now
Modified Paths:
--------------
pkg/trunk/3rdparty/openrave/Makefile
pkg/trunk/openrave_planning/openraveros/src/session.h
pkg/trunk/openrave_planning/or_collision/CMakeLists.txt
pkg/trunk/openrave_planning/or_collision/manifest.xml
Added Paths:
-----------
pkg/trunk/openrave_planning/or_collision/or_collision.cpp
Removed Paths:
-------------
pkg/trunk/openrave_planning/or_collision/orcollision.cpp
Modified: pkg/trunk/3rdparty/openrave/Makefile
===================================================================
--- pkg/trunk/3rdparty/openrave/Makefile 2008-11-25 23:18:26 UTC (rev 7312)
+++ pkg/trunk/3rdparty/openrave/Makefile 2008-11-26 00:00:29 UTC (rev 7313)
@@ -2,7 +2,7 @@
SVN_DIR = openrave_svn
# Should really specify a revision
-SVN_REVISION = -r 509
+SVN_REVISION = -r 513
SVN_URL = https://openrave.svn.sourceforge.net/svnroot/openrave
include $(shell rospack find mk)/svn_checkout.mk
Modified: pkg/trunk/openrave_planning/openraveros/src/session.h
===================================================================
--- pkg/trunk/openrave_planning/openraveros/src/session.h 2008-11-25 23:18:26 UTC (rev 7312)
+++ pkg/trunk/openrave_planning/openraveros/src/session.h 2008-11-26 00:00:29 UTC (rev 7313)
@@ -29,9 +29,6 @@
#include "ros/node.h"
#include "rosthread/member_thread.h"
-#includle "std_srvs/StaticMap.h"
-#includle "std_srvs/PolledImage.h"
-
using namespace std;
using namespace ros;
using namespace ros::thread;
@@ -72,21 +69,17 @@
return pnode;
}
- void startsession()
+ void advertise_session()
{
ros::node* pnode = startros();
if( pnode == NULL )
return;
- vector<string> vnames;
- vnames.push_back("orgetmap");
- vnames.push_back("orgetimage");
- sessionhandle = pnode->advertise_session("mysession"
+ sessionhandle = pnode->advertise_service("openrave_service",&OpenraveSession::startsession,this);
}
- bool terminate(int id) {
- cout << "terminate session: " << id << endl;
- }
+ bool startsession(roscpp_tutorials::simple_session::request& req, roscpp_tutorials::simple_session::response& res) {
+ if( req.sessionid ) {
bool getmap(StaticMap::request& req, StaticMap::response& res)
{
Modified: pkg/trunk/openrave_planning/or_collision/CMakeLists.txt
===================================================================
--- pkg/trunk/openrave_planning/or_collision/CMakeLists.txt 2008-11-25 23:18:26 UTC (rev 7312)
+++ pkg/trunk/openrave_planning/or_collision/CMakeLists.txt 2008-11-26 00:00:29 UTC (rev 7313)
@@ -2,5 +2,5 @@
include(rosbuild)
add_definitions(-Wall)
rospack(or_collision)
-add_executable(or_collision orcollision.cpp)
-target_link_libraries (or_collision pthread openrave-core)
+add_executable(or_collision or_collision.cpp)
+target_link_libraries (or_collision openrave-core)
Modified: pkg/trunk/openrave_planning/or_collision/manifest.xml
===================================================================
--- pkg/trunk/openrave_planning/or_collision/manifest.xml 2008-11-25 23:18:26 UTC (rev 7312)
+++ pkg/trunk/openrave_planning/or_collision/manifest.xml 2008-11-26 00:00:29 UTC (rev 7313)
@@ -1,11 +1,9 @@
<package>
- <description brief="OpenRAVE Session for ROS">
- Main openrave server that provides a session interface.
+ <description brief="OpenRAVE Collision Checking">
+ Small test program that loads up the OpenRAVE run-time engine, loads a robot model, and checks for self-collisions. The program will return the contact points of the self-collisions. Various openrave checkers can be set to be tested.
</description>
<author>Rosen Diankov (rdi...@cs...)</author>
<license>BSD</license>
<depend package="roscpp"/>
<depend package="openrave"/>
- <sysdepend os="ubuntu" version="7.04-feisty" package="libboost-dev"/>
- <sysdepend os="ubuntu" version="8.04-hardy" package="libboost-dev"/>
</package>
Copied: pkg/trunk/openrave_planning/or_collision/or_collision.cpp (from rev 7284, pkg/trunk/openrave_planning/or_collision/orcollision.cpp)
===================================================================
--- pkg/trunk/openrave_planning/or_collision/or_collision.cpp (rev 0)
+++ pkg/trunk/openrave_planning/or_collision/or_collision.cpp 2008-11-26 00:00:29 UTC (rev 7313)
@@ -0,0 +1,173 @@
+#include <openrave-core.h>
+#include <vector>
+#include <cstring>
+#include <sstream>
+
+using namespace OpenRAVE;
+using namespace std;
+
+void printhelp();
+void printinterfaces(EnvironmentBase*);
+
+int main(int argc, char ** argv)
+{
+ if( argc < 2 ) {
+ printhelp();
+ return -1; // no robots to load
+ }
+
+ // create the main environment
+ EnvironmentBase* penv = CreateEnvironment();
+ vector<dReal> vsetvalues;
+
+ // parse the command line options
+ int i = 1;
+ while(i < argc) {
+ if( strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-?") == 0 || strcmp(argv[i], "/?") == 0 || strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-help") == 0 ) {
+ printhelp();
+ return 0;
+ }
+ else if( strcmp(argv[i], "--checker") == 0 ) {
+ // create requested collision checker
+ CollisionCheckerBase* pchecker = penv->CreateCollisionChecker(argv[i+1]);
+ if( pchecker == NULL ) {
+ RAVEPRINT(L"failed to create checker %s\n", argv[i+1]);
+ return -3;
+ }
+ penv->SetCollisionChecker(pchecker);
+ i += 2;
+ }
+ else if( strcmp(argv[i], "--list") == 0 ) {
+ printinterfaces(penv);
+ return 0;
+ }
+ else if( strcmp(argv[i], "--joints") == 0 ) {
+ vsetvalues.resize(atoi(argv[i+1]));
+ for(int j = 0; j < (int)vsetvalues.size(); ++j)
+ vsetvalues[j] = atoi(argv[i+j+2]);
+
+ i += 2+vsetvalues.size();
+ }
+ else
+ break;
+ }
+
+
+ if( i >= argc ) {
+ RAVEPRINT(L"not enough parameters\n");
+ printhelp();
+ return -1;
+ }
+
+ // load the scene
+ if( !penv->Load(argv[i]) ) {
+ printhelp();
+ return -2;
+ }
+
+ // get the first robot
+ if( penv->GetRobots().size() == 0 )
+ return -3;
+
+ RobotBase* probot = penv->GetRobots().front();
+
+ vector<dReal> values; probot->GetJointValues(values);
+
+ // set new values
+ for(int i = 0; i < (int)vsetvalues.size() && i < (int)values.size(); ++i)
+ values[i] = vsetvalues[i];
+
+ probot->SetJointValues(NULL,NULL,&values[0],true);
+
+ int contactpoints = 0;
+ COLLISIONREPORT report;
+ penv->SetCollisionOptions(CO_Contacts);
+ if( probot->CheckSelfCollision(&report) ) {
+ contactpoints = (int)report.contacts.size();
+ wstringstream ss;
+ ss << "robot in self-collision "
+ << (report.plink1 != NULL ? report.plink1->GetName() : L"") << ":"
+ << (report.plink2 != NULL ? report.plink2->GetName() : L"") << " at "
+ << contactpoints << "contacts" << endl;
+ for(int i = 0; i < contactpoints; ++i) {
+ COLLISIONREPORT::CONTACT& c = report.contacts[i];
+ ss << "contact" << i << ": pos=("
+ << c.pos.x << ", " << c.pos.y << ", " << c.pos.z << "), norm=("
+ << c.norm.x << ", " << c.norm.y << ", " << c.norm.z << ")" << endl;
+ }
+
+ RAVEPRINT(ss.str().c_str());
+ }
+ else RAVEPRINT(L"robot not in collision\n");
+
+ // get the transformations of all the links
+ vector<Transform> vlinktransforms;
+ probot->GetBodyTransformations(vlinktransforms);
+
+ return contactpoints;
+}
+
+void printhelp()
+{
+ printf("or_collision [--list] [--checker checker_name] [--joints #values [values]] robot_model\n"
+ " Load a robot into the openrave environment, set it at [joint values] and\n"
+ " check for self collisions. Returns number of contact points.\n"
+ "-listplugins Will list all the loadable interfaces (ie, collision checkers).\n"
+ "-checker name Load a different collision checker instead of the default one\n"
+ "-joints #values [values] Set the robot to specific joint values\n");
+}
+
+void printinterfaces(EnvironmentBase* penv)
+{
+ PLUGININFO info;
+ penv->GetLoadedInterfaces(info);
+
+ vector<wstring>::const_iterator itnames;
+ vector<string> names;
+ vector<string>::iterator itname;
+ wstringstream ss;
+
+ ss << endl << L"Loadable interfaces: " << endl;
+
+ ss << L"Collision Checkers (" << info.collisioncheckers.size() << "):" << endl;
+ for(itnames = info.collisioncheckers.begin(); itnames != info.collisioncheckers.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ ss << L"Controllers (" << info.controllers.size() << "):" << endl;
+ for(itnames = info.controllers.begin(); itnames != info.controllers.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ ss << L"Inverse Kinematics Solvers (" << info.iksolvers.size() << "):" << endl;
+ for(itnames = info.iksolvers.begin(); itnames != info.iksolvers.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ ss << L"Physics Engines (" << info.physicsengines.size() << "):" << endl;
+ for(itnames = info.physicsengines.begin(); itnames != info.physicsengines.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ ss << L"Planners (" << info.planners.size() << "):" << endl;
+ for(itnames = info.planners.begin(); itnames != info.planners.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ ss << L"Problems (" << info.problems.size() << "):" << endl;
+ for(itnames = info.problems.begin(); itnames != info.problems.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ ss << L"Robots (" << info.robots.size() << "):" << endl;
+ for(itnames = info.robots.begin(); itnames != info.robots.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ ss << L"Sensors (" << info.sensors.size() << "):" << endl;
+ for(itnames = info.sensors.begin(); itnames != info.sensors.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ ss << L"Sensor Systems (" << info.sensorsystems.size() << "):" << endl;
+ for(itnames = info.sensorsystems.begin(); itnames != info.sensorsystems.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ ss << L"Trajectories (" << info.trajectories.size() << "):" << endl;
+ for(itnames = info.trajectories.begin(); itnames != info.trajectories.end(); ++itnames)
+ ss << " " << itnames->c_str() << endl;
+
+ RAVEPRINT(ss.str().c_str());
+}
Deleted: pkg/trunk/openrave_planning/or_collision/orcollision.cpp
===================================================================
--- pkg/trunk/openrave_planning/or_collision/orcollision.cpp 2008-11-25 23:18:26 UTC (rev 7312)
+++ pkg/trunk/openrave_planning/or_collision/orcollision.cpp 2008-11-26 00:00:29 UTC (rev 7313)
@@ -1,50 +0,0 @@
-#include <openrave-core.h>
-#include <vector>
-using namespace OpenRAVE;
-using namespace std;
-
-int main(int argc, char ** argv)
-{
- if( argc < 2 )
- return -1; // no robots to load
-
- EnvironmentBase* penv = CreateEnvironment();
- // load the scene
- if( !penv->Load(argv[1]) )
- return -2;
-
- // choose collision checker
- if( argc > 2 ) {
- CollisionCheckerBase* pchecker = penv->CreateCollisionChecker(argv[2]);
- if( pchecker == NULL ) {
- RAVEPRINT(L"failed to create checker %s\n", argv[2]);
- return -3;
- }
- penv->SetCollisionChecker(pchecker);
- }
-
- // get the first robot
- if( penv->GetRobots().size() == 0 )
- return -3;
-
- RobotBase* probot = penv->GetRobots().front();
-
- vector<dReal> values;
- probot->GetJointValues(values);
-
- values[1] = 1;
- probot->SetJointValues(NULL,NULL,&values[0]);
-
- COLLISIONREPORT report;
- if( probot->CheckSelfCollision(&report) ) {
- RAVEPRINT(L"robot in self-collision %S:%S at %d contacts\n",
- report.plink1 != NULL ? report.plink1->GetName() : L"",
- report.plink2 != NULL ? report.plink2->GetName() : L"", report.contacts.size());
- }
-
- // get the transformations of all the links
- vector<Transform> vlinktransforms;
- probot->GetBodyTransformations(vlinktransforms);
-
- return 0;
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hsu...@us...> - 2008-11-26 01:54:58
|
Revision: 7321
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7321&view=rev
Author: hsujohnhsu
Date: 2008-11-26 01:50:52 +0000 (Wed, 26 Nov 2008)
Log Message:
-----------
* Clean up gazebo world files, separated robots models from worlds:
* All world-only file moved to gazebo_worlds
* All test worlds moved to gazebo_worlds/test
* Updated tests
* Pendulum test (dual_link.xml) had a P3D bug fix.
* Update slide, scan, cameras, base.
* Increase damping for multi_link example. Fix controller kdl_chain_name for multi_link example.
Modified Paths:
--------------
pkg/trunk/drivers/simulator/gazebo_plugin/test/testcameras.xml
pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.py
pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.xml
pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.xml
pkg/trunk/drivers/simulator/gazebo_plugin/test/testslide.xml
pkg/trunk/robot_descriptions/wg_robot_description/dual_link_test/dual_link.xml
pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/controllers_multi_link.xml
pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/multi_link.xml
Added Paths:
-----------
pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/tablegrasp.world
pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/
pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testcameras.world
pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testscan.world
pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testslide.world
pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/teststereo.world
Removed Paths:
-------------
pkg/trunk/robot_descriptions/gazebo_robot_description/world/desk1.model
pkg/trunk/robot_descriptions/gazebo_robot_description/world/desk2.model
pkg/trunk/robot_descriptions/gazebo_robot_description/world/desk3.model
pkg/trunk/robot_descriptions/gazebo_robot_description/world/desk4.model
pkg/trunk/robot_descriptions/gazebo_robot_description/world/desk5.model
pkg/trunk/robot_descriptions/gazebo_robot_description/world/desk6.model
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_arm_test.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_dual_link.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_floorobj.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_multi_link.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_obstacle.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_pr2d2.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_prototype1.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_simple.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_single_link.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_tablegrasp.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_wg.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/sicklms200.model
pkg/trunk/robot_descriptions/gazebo_robot_description/world/testcameras.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/testscan.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/testslide.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/teststereo.world
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testcameras.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testcameras.xml 2008-11-26 01:43:02 UTC (rev 7320)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testcameras.xml 2008-11-26 01:50:52 UTC (rev 7321)
@@ -1,16 +1,22 @@
<launch>
<master auto="start" />
- <!-- send single_link.xml to param server -->
- <include file="$(find wg_robot_description)/pr2/send_description.launch" />
-
- <node pkg="gazebo" type="gazebo" args="-g -n $(find gazebo_robot_description)/world/testcameras.world" respawn="false" output="screen">
+ <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/test/testcameras.world" respawn="false" output="screen">
<env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/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" />
<env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
</node>
+ <!-- send single_link.xml to param server -->
+ <include file="$(find wg_robot_description)/pr2/send_description.launch" />
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2 -3 0 0" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!-- load controllers -->
+ <include file="$(find pr2_gazebo)/pr2_default_controllers.launch" />
+
<!--<node pkg="gazebo_plugin" type="groundtruthtransform" args="" respawn="true" />-->
<test test-name="gazebo_plugin_testcameras" pkg="gazebo_plugin" type="testcameras.py" />
</launch>
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.py
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.py 2008-11-26 01:43:02 UTC (rev 7320)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.py 2008-11-26 01:50:52 UTC (rev 7321)
@@ -125,36 +125,24 @@
#print "link1 pose ground truth received"
#self.printPendulum(p3d)
tmpx = p3d.pos.position.x
+ tmpy = p3d.pos.position.y
tmpz = p3d.pos.position.z - 2.0
- #print "link1 origin (" + str(tmpx) + " , " + str(tmpz) + ")"
- self.error1_total += math.sqrt(tmpx*tmpx+tmpz*tmpz)
+
+ self.error1_total += math.sqrt(tmpx*tmpx+tmpy*tmpy+tmpz*tmpz)
self.error1_count += 1
- if math.sqrt(tmpx*tmpx+tmpz*tmpz) > self.error1_max:
- self.error1_max = math.sqrt(tmpx*tmpx+tmpz*tmpz)
+ if math.sqrt(tmpx*tmpx+tmpy*tmpy+tmpz*tmpz) > self.error1_max:
+ self.error1_max = math.sqrt(tmpx*tmpx+tmpy*tmpy+tmpz*tmpz)
def p3dInput2(self, p3d):
- #print "link2 pose ground truth received"
- #self.printPendulum(p3d)
- q = Q(p3d.pos.orientation.x , p3d.pos.orientation.y , p3d.pos.orientation.z , p3d.pos.orientation.w)
- q.normalize()
- v = q.getEuler()
+ tmpx = p3d.pos.position.x
+ tmpy = p3d.pos.position.y
+ tmpz = p3d.pos.position.z - 2.0
- #FIXME: something wrong with the pos, need to fix it. abs masks the problem for now.
- #FIXME: something wrong with the pos, need to fix it. abs masks the problem for now.
- #FIXME: something wrong with the pos, need to fix it. abs masks the problem for now.
- #FIXME: something wrong with the pos, need to fix it. abs masks the problem for now.
- tmpx = abs(p3d.pos.position.x) +0.0 - abs(math.cos(v.z)*math.cos(v.y))
- tmpz = abs(p3d.pos.position.z) -2.0 + abs(math.sin(v.y))
- #math.cos(v.x)*math.cos(v.z)-math.cos(v.x)*math.sin(v.y)*math.cos(v.z))
- #print "link2 origin (" + str(tmpx) + " , " + str(tmpz) + ")"
- #print "link2 raw (" + str(p3d.pos.position.x) + " , " + str(p3d.pos.position.z) + ") total: " + str(self.error2_total)
- #print "link2 correc (" + str(math.cos(v.y)) + " , " + str(math.sin(v.y)) + ") angle: " + str(v.x) +","+str(v.y)+","+str(v.z)
-
- self.error2_total += math.sqrt(tmpx*tmpx+tmpz*tmpz)
+ self.error2_total += math.sqrt(tmpx*tmpx+tmpy*tmpy+tmpz*tmpz)
self.error2_count += 1
- if math.sqrt(tmpx*tmpx+tmpz*tmpz) > self.error2_max:
- self.error2_max = math.sqrt(tmpx*tmpx+tmpz*tmpz)
-
+ if math.sqrt(tmpx*tmpx+tmpy*tmpy+tmpz*tmpz) > self.error2_max:
+ self.error2_max = math.sqrt(tmpx*tmpx+tmpy*tmpy+tmpz*tmpz)
+
def test_pendulum(self):
print "LNK\n"
rospy.Subscriber("link1_pose", PoseWithRatesStamped, self.p3dInput1)
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.xml 2008-11-26 01:43:02 UTC (rev 7320)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.xml 2008-11-26 01:50:52 UTC (rev 7321)
@@ -1,20 +1,10 @@
<launch>
<group name="wg">
-
<!-- send single_link.xml to param server -->
- <include file="$(find wg_robot_description)/dual_link_test/send_description.launch" />
+ <include file="$(find examples_gazebo)/dual_link.xml" />
- <node pkg="gazebo" type="gazebo" args="-g -n $(find gazebo_robot_description)/world/robot_dual_link.world" respawn="false" output="screen">
- <env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/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" />
- <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
- </node>
+ <!--<node pkg="gazebo_plugin" type="groundtruthtransform" args="" respawn="true" />-->
+ <test test-name="gazebo_plugin_testpendulum" pkg="gazebo_plugin" type="testpendulum.py" />
</group>
- <!--node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/dual_link_test/controllers_dual_link.xml" respawn="false" output="screen" /--> <!-- load default arm controller -->
- <!--node pkg="robot_mechanism_controllers" type="control.py" args="set test_controller 0.5" respawn="false" output="screen" /--> <!-- open gripper .5 radians -->
-
- <!--<node pkg="gazebo_plugin" type="groundtruthtransform" args="" respawn="true" />-->
- <test test-name="gazebo_plugin_testpendulum" pkg="gazebo_plugin" type="testpendulum.py" />
</launch>
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.xml 2008-11-26 01:43:02 UTC (rev 7320)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testscan.xml 2008-11-26 01:50:52 UTC (rev 7321)
@@ -1,47 +1,22 @@
<launch>
<master auto="start" />
- <!-- send single_link.xml to param server -->
- <include file="$(find wg_robot_description)/pr2/send_description.launch" />
-
- <node pkg="gazebo" type="gazebo" args="-g -n $(find gazebo_robot_description)/world/testscan.world" respawn="false" output="screen">
+ <node pkg="gazebo" type="gazebo" args="-n $(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:$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" />
<env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
</node>
- <node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/pr2/controllers.xml" respawn="false" output="screen" />
- <node pkg="robot_mechanism_controllers" type="control.py" args="set tilt_laser_controller 46" respawn="false" output="screen" />
+ <!-- send single_link.xml to param server -->
+ <include file="$(find wg_robot_description)/pr2/send_description.launch" />
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!-- load controllers -->
+ <include file="$(find pr2_gazebo)/pr2_default_controllers.launch" />
+
<!--<node pkg="gazebo_plugin" type="groundtruthtransform" args="" respawn="true" />-->
<test test-name="gazebo_plugin_testpointclouds1" pkg="gazebo_plugin" type="testscan.py" />
- <!--test test-name="gazebo_plugin_testpointclouds2" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds3" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds4" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds5" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds6" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds7" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds8" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds9" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds10" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds11" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds12" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds13" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds14" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds15" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds16" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds17" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds18" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds19" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds20" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds21" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds22" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds23" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds24" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds25" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds26" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds27" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds28" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds29" pkg="gazebo_plugin" type="testscan.py" />
- <test test-name="gazebo_plugin_testpointclouds30" pkg="gazebo_plugin" type="testscan.py" /-->
</launch>
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testslide.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testslide.xml 2008-11-26 01:43:02 UTC (rev 7320)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testslide.xml 2008-11-26 01:50:52 UTC (rev 7321)
@@ -1,17 +1,22 @@
<launch>
<master auto="start" />
- <!-- send single_link.xml to param server -->
- <include file="$(find wg_robot_description)/pr2/send_description.launch" />
-
- <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/world/testslide.world" respawn="false" output="screen">
+ <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/test/testslide.world" respawn="false" output="screen">
<env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/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" />
<env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
</node>
- <node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/pr2/controllers.xml" respawn="false" output="screen" />
- <node pkg="pr2_mechanism_controllers" type="control_laser.py" args="tilt_laser_controller sine 20 0.872 0.3475" respawn="false" output="screen" />
- <!--<node pkg="gazebo_plugin" type="groundtruthtransform" args="" respawn="true" />-->
+ <!-- send single_link.xml to param server -->
+ <include file="$(find wg_robot_description)/pr2/send_description.launch" />
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2 0 8 110 0 0 90" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!-- load controllers -->
+ <include file="$(find pr2_gazebo)/pr2_default_controllers.launch" />
+
+ <!-- test -->
+ <test test-name="gazebo_plugin_testslide" pkg="gazebo_plugin" type="testslide.py" />
</launch>
Copied: pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/tablegrasp.world (from rev 7310, pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_tablegrasp.world)
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/tablegrasp.world (rev 0)
+++ pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/tablegrasp.world 2008-11-26 01:50:52 UTC (rev 7321)
@@ -0,0 +1,321 @@
+<?xml version="1.0"?>
+
+<gazebo:world
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz"
+ xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
+ xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
+ xmlns:window="http://playerstage.sourceforge.net/gazebo/xmlschema/#window"
+ xmlns:param="http://playerstage.sourceforge.net/gazebo/xmlschema/#param"
+ xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
+ xmlns:geo="http://willowgarage.com/xmlschema/#geo"
+ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
+ xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
+ xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+ xmlns:ui="http://playerstage.sourceforge.net/gazebo/xmlschema/#ui"
+ xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
+ xmlns:renderable="http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable"
+ xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+ xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics" >
+
+ <verbosity>5</verbosity>
+
+<!-- cfm is 1e-5 for single precision -->
+<!-- erp is typically .1-.8 -->
+<!-- here's the global contact cfm/erp -->
+ <physics:ode>
+ <stepTime>0.01</stepTime>
+ <gravity>0 0 -9.8</gravity>
+ <cfm>0.0000000001</cfm>
+ <erp>0.2</erp>
+ </physics:ode>
+
+ <geo:origin>
+ <lat>37.4270909558</lat><lon>-122.077919338</lon>
+ </geo:origin>
+
+ <rendering:gui>
+ <type>fltk</type>
+ <size>1024 800</size>
+ <pos>0 0</pos>
+ </rendering:gui>
+
+
+ <rendering:ogre>
+ <ambient>1.0 1.0 1.0 1.0</ambient>
+ <sky>
+ <material>Gazebo/CloudySky</material>
+ </sky>
+ <gazeboPath>media</gazeboPath>
+ <shadowTechnique>none</shadowTechnique>
+ <grid>false</grid>
+ <maxUpdateRate>10.</maxUpdateRate>
+ </rendering:ogre>
+
+
+ <model:physical name="gplane">
+ <xyz>0 0 0</xyz>
+ <rpy>0 0 0</rpy>
+ <static>true</static>
+
+ <body:plane name="plane">
+ <geom:plane name="plane">
+ <kp>1000000.0</kp>
+ <kd>1.0</kd>
+ <normal>0 0 1</normal>
+ <size>51.3 51.3</size>
+ <!-- map3.png -->
+ <material>PR2/floor_texture</material>
+ </geom:plane>
+ </body:plane>
+ </model:physical>
+
+ <!--
+ <model:empty name="ros_model">
+ <body:empty name="ros_body">
+ <controller:ros_node name="ros_node" plugin="libRos_Node.so">
+ <nodeName>simulator_ros_node</nodeName>
+ </controller:ros_node>
+ </body:empty>
+ </model:empty>
+ -->
+
+ <!-- The "desk"-->
+ <model:physical name="desk1_model">
+ <xyz> 0.80 -0.21 -0.35</xyz>
+ <rpy> 0.0 0.0 0.00</rpy>
+ <body:box name="desk1_legs_body">
+ <geom:box name="desk1_legs_geom">
+ <kp>10000000000.0</kp>
+ <kd>1.0</kd>
+ <xyz> 0.0 0.0 0.60</xyz>
+ <mesh>default</mesh>
+ <size>0.5 1.0 0.4</size>
+ <mass> 10.0</mass>
+ <visual>
+ <size> 0.5 1.0 0.40</size>
+ <material>Gazebo/Rocky</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ <geom:box name="desk1_top_geom">
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <xyz> 0.0 0.0 0.88</xyz>
+ <mesh>default</mesh>
+ <size>0.75 1.5 0.05</size>
+ <mass> 10.0</mass>
+ <visual>
+ <size> 0.75 1.5 0.05</size>
+ <material>Gazebo/Rocky</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <!-- The second "desk"-->
+ <model:physical name="desk2_model">
+ <xyz> 2.25 -3.0 -0.10</xyz>
+ <rpy> 0.0 0.0 0.00</rpy>
+ <body:box name="desk2_legs_body">
+ <geom:box name="desk2_legs_geom">
+ <kp>1000000.0</kp>
+ <kd>1.0</kd>
+ <xyz> 0.0 0.0 0.50</xyz>
+ <mesh>default</mesh>
+ <size>0.5 1.0 0.75</size>
+ <mass> 10.0</mass>
+ <visual>
+ <size> 0.5 1.0 0.75</size>
+ <material>Gazebo/Rocky</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ <geom:box name="desk2_top_geom">
+ <kp>1000000.0</kp>
+ <kd>1.0</kd>
+ <xyz> 0.0 0.0 0.90</xyz>
+ <mesh>default</mesh>
+ <size>0.75 1.5 0.05</size>
+ <mass> 10.0</mass>
+ <visual>
+ <size> 0.75 1.5 0.05</size>
+ <material>Gazebo/Rocky</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <!-- The small box "cup" -->
+ <model:physical name="object1_model">
+ <xyz> 0.620 -0.45 0.65</xyz>
+ <rpy> 0.0 0.0 -30.0</rpy>
+ <body:box name="object1_body">
+ <geom:box name="object1_geom">
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mesh>default</mesh>
+ <size>0.1 0.03 0.06</size>
+ <mass> 0.05</mass>
+ <mu1> 500.0 </mu1>
+ <mu2> 500.0 </mu2>
+ <visual>
+ <size> 0.1 0.030 0.06</size>
+ <material>Gazebo/PioneerBody</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+
+ <controller:P3D name="p3d_object_controller" plugin="libP3D.so">
+ <updateRate>100.0</updateRate>
+ <bodyName>object1_body</bodyName>
+ <topicName>object1_body_ground_truth</topicName>
+ <frameName>map</frameName>
+ <interface:position name="p3d_object_position"/>
+ </controller:P3D>
+
+ </model:physical>
+
+
+
+ <!--
+ <model:physical name="object1_model">
+ <xyz> 1.035 -0.15 0.55</xyz>
+ <rpy> 0.0 0.0 0.0</rpy>
+ <body:box name="object1_body">
+ <geom:box name="object1_geom">
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mesh>default</mesh>
+ <size>0.01 0.01 0.01</size>
+ <mass> 0.05</mass>
+ <visual>
+ <size> 0.01 0.010 0.01</size>
+ <material>Gazebo/PioneerBody</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+ -->
+
+ <!-- The small ball -->
+ <model:physical name="sphere1_model">
+ <xyz> 2.5 -2.8 1.0</xyz>
+ <rpy> 0.0 0.0 0.0</rpy>
+ <body:sphere name="sphere1_body">
+ <geom:sphere name="sphere1_geom">
+ <kp>1000000.0</kp>
+ <kd>1.0</kd>
+ <mesh>default</mesh>
+ <size> 0.15</size>
+ <mass> 1.0</mass>
+ <visual>
+ <size> 0.3 0.3 0.3</size>
+ <material>Gazebo/PioneerBody</material>
+ <mesh>unit_sphere</mesh>
+ </visual>
+ </geom:sphere>
+ </body:sphere>
+ </model:physical>
+
+ <!-- The large ball map3.png -->
+ <model:physical name="sphere2_model">
+ <xyz> 5.85 4.35 1.55</xyz>
+ <rpy> 0.0 0.0 0.0</rpy>
+ <body:sphere name="sphere2_body">
+ <geom:sphere name="sphere2_geom">
+ <kp>1000000.0</kp>
+ <kd>1.0</kd>
+ <mesh>default</mesh>
+ <size> 1.0</size>
+ <mass> 1.0</mass>
+ <visual>
+ <size> 2.0 2.0 2.0</size>
+ <material>Gazebo/Rocky</material>
+ <mesh>unit_sphere</mesh>
+ </visual>
+ </geom:sphere>
+ </body:sphere>
+ </model:physical>
+
+ <!-- The wall in front map3.png -->
+ <model:physical name="wall_2_model">
+ <xyz> 11.6 -1.55 1.0</xyz>
+ <rpy> 0.0 0.0 0.0</rpy>
+ <static>true</static>
+ <body:box name="wall_2_body">
+ <geom:box name="wall_2_geom">
+ <mesh>default</mesh>
+ <size>2.1 32.8 2.0</size>
+ <visual>
+ <size>2.1 32.8 2.0</size>
+ <material>Gazebo/PioneerBody</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <!-- The wall behind -->
+ <model:physical name="wall_1_model">
+ <xyz> -11.3 -1.45 1.0</xyz>
+ <rpy> 0.0 0.0 0.0</rpy>
+ <static>true</static>
+ <body:box name="wall_1_body">
+ <geom:box name="wall_1_geom">
+ <mesh>default</mesh>
+ <size>0.4 24.0 2.0</size>
+ <visual>
+ <size>0.4 24.0 2.0</size>
+ <material>Gazebo/PioneerBody</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <!-- The wall 3 -->
+ <model:physical name="wall_3_model">
+ <xyz> 6.7 8.05 1.0</xyz>
+ <rpy> 0.0 0.0 0.0</rpy>
+ <static>true</static>
+ <body:box name="wall_3_body">
+ <geom:box name="wall_3_geom">
+ <mesh>default</mesh>
+ <size>7.5 1.2 2.0</size>
+ <visual>
+ <size>7.5 1.2 2.0</size>
+ <material>Gazebo/Chrome</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <model:empty name="factory_model">
+ <controller:factory name="factory_controller">
+ <alwaysOn>true</alwaysOn>
+ <updateRate>1000.0</updateRate>
+ <interface:factory name="factory_iface"/>
+ </controller:factory>
+ </model:empty>
+
+ <!-- White Directional light -->
+ <!--
+ <model:renderable name="directional_white">
+ <light>
+ <type>directional</type>
+ <direction>0 0.0 -1.0</direction>
+ <diffuseColor>0.4 0.4 0.4</diffuseColor>
+ <specularColor>0.0 0.0 0.0</specularColor>
+ <attenuation>1 0.0 1.0 0.4</attenuation>
+ </light>
+ </model:renderable>
+ -->
+
+</gazebo:world>
+
Copied: pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testcameras.world (from rev 7310, pkg/trunk/robot_descriptions/gazebo_robot_description/world/testcameras.world)
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testcameras.world (rev 0)
+++ pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/test/testcameras.world 2008-11-26 01:50:52 UTC (rev 7321)
@@ -0,0 +1,200 @@
+<?xml version="1.0"?>
+
+<gazebo:world
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz"
+ xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
+ xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
+ xmlns:window="http://playerstage.sourceforge.net/gazebo/xmlschema/#window"
+ xmlns:param="http://playerstage.sourceforge.net/gazebo/xmlschema/#param"
+ xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
+ xmlns:geo="http://willowgarage.com/xmlschema/#geo"
+ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
+ xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
+ xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+ xmlns:ui="http://playerstage.sourceforge.net/gazebo/xmlschema/#ui"
+ xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
+ xmlns:renderable="http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable"
+ xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+ xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics" >
+
+ <verbosity>5</verbosity>
+
+ <!-- FIXME: pr2 mimic joints Kp setting is unstable at 0.01 -->
+ <!-- cfm is 1e-5 for single precision -->
+ <!-- erp is typically .1-.8 -->
+ <!-- here's the global contact cfm/erp -->
+ <physics:ode>
+ <stepTime>0.001</stepTime>
+ <gravity>0 0 -9.8</gravity>
+ <cfm>0.000000000001</cfm>
+ <erp>0.2</erp>
+ <quickStep>true</quickStep>
+ <quickStepIters>3</quickStepIters>
+ <quickStepW>1.3</quickStepW>
+ <quickStepIters>3</quickStepIters>
+ <quickStepW>1.3</quickStepW>
+ </physics:ode>
+
+
+ <rendering:gui>
+ <type>fltk</type>
+ <size>1024 800</size>
+ <pos>0 0</pos>
+ <frames>
+ <row height="100%">
+ <camera width="100%">
+ <xyz>-8 0 3</xyz>
+ <rpy>0 25 0</rpy>
+ <saveFrames>false</saveFrames>
+ <startSaveFrames>true</startSaveFrames>
+ <saveFramePath>testgui...
[truncated message content] |
|
From: <jfa...@us...> - 2008-11-26 02:32:01
|
Revision: 7325
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7325&view=rev
Author: jfaustwg
Date: 2008-11-26 02:31:51 +0000 (Wed, 26 Nov 2008)
Log Message:
-----------
Remove 3rdparty boost from personalrobots, switch all first-party packages to use the ROS 3rdparty boost
Modified Paths:
--------------
pkg/trunk/3rdparty/bfl_latest/Makefile
pkg/trunk/3rdparty/gazebo/Makefile
pkg/trunk/3rdparty/kdl/Makefile
pkg/trunk/3rdparty/ogre/Makefile
pkg/trunk/drivers/motor/ethercat_hardware/manifest.xml
pkg/trunk/drivers/robot/pr2/pr2_power_board/manifest.xml
pkg/trunk/drivers/robot/pr2/pr2_power_board/src/power_node/CMakeLists.txt
pkg/trunk/openrave_planning/or_rosplanning/manifest.xml
pkg/trunk/util/resource_locator/CMakeLists.txt
pkg/trunk/util/resource_locator/manifest.xml
pkg/trunk/util/tf/CMakeLists.txt
pkg/trunk/util/tf/include/tf/message_notifier.h
pkg/trunk/util/tf/manifest.xml
pkg/trunk/util/tf/test/test_notifier.cpp
pkg/trunk/visualization/ogre_tools/manifest.xml
pkg/trunk/visualization/ogre_visualizer/manifest.xml
pkg/trunk/visualization/wx_rosout/CMakeLists.txt
pkg/trunk/visualization/wx_rosout/manifest.xml
pkg/trunk/visualization/wx_rosout/src/test/send_test.cpp
pkg/trunk/world_models/topological_map/manifest.xml
Added Paths:
-----------
pkg/trunk/3rdparty/ogre/changelist.txt
Removed Paths:
-------------
pkg/trunk/3rdparty/boost/
Modified: pkg/trunk/3rdparty/bfl_latest/Makefile
===================================================================
--- pkg/trunk/3rdparty/bfl_latest/Makefile 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/3rdparty/bfl_latest/Makefile 2008-11-26 02:31:51 UTC (rev 7325)
@@ -4,8 +4,11 @@
SVN_DIR = bfl-svn
INSTALL_DIR = bfl-boost
-CMAKE = `rospack find cmake`/cmake/bin/cmake
+CMAKE = `rospack find cmake`/cmake/bin/cmake
+BOOST_ROOT =$(shell rospack find boost)/boost
CMAKE_ARGS = -DCMAKE_INSTALL_PREFIX=$(PWD)/$(INSTALL_DIR)/ \
+ -DBOOST_INCLUDEDIR:STRING=$(BOOST_ROOT)/include \
+ -DBOOST_LIBRARYDIR:STRING=$(BOOST_ROOT)/lib \
-DMATRIX_LIB=boost \
-DRNG_LIB=boost
PATCH = bfl_patch.diff
Modified: pkg/trunk/3rdparty/gazebo/Makefile
===================================================================
--- pkg/trunk/3rdparty/gazebo/Makefile 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/3rdparty/gazebo/Makefile 2008-11-26 02:31:51 UTC (rev 7325)
@@ -18,12 +18,14 @@
ROOT = $(shell rospack find gazebo)/gazebo
TESTROOT = $(shell rospack find gazebo)/test-gazebo
+BOOST_ROOT = $(shell rospack find boost)/boost
+
build: SVN_UP_REVERT_PATCH gazebo
.PHONY: gazebo
gazebo: $(SVN_DIR)
if [ ! -d gazebo ]; then mkdir -p gazebo; mkdir -p gazebo/share; mkdir -p gazebo/share/gazebo; mkdir -p gazebo/share/gazebo/worlds; mkdir -p gazebo/share/gazebo/Media; fi
- cd $(SVN_DIR) && PKG_CONFIG_PATH=${ODE_PKG}:${FI_PKG}:${PLAYER_PKG}:${OGRE_PKG}:${PKG_CONFIG_PATH} PATH=${ODE_PATH}:${PATH} \
+ cd $(SVN_DIR) && PKG_CONFIG_PATH=${ODE_PKG}:${FI_PKG}:${PLAYER_PKG}:${OGRE_PKG}:${PKG_CONFIG_PATH} PATH=${ODE_PATH}:${PATH} CCFLAGS=-I${BOOST_ROOT}/include \
scons mode=optimized prefix=$(ROOT)
-cd $(SVN_DIR) && PKG_CONFIG_PATH=${ODE_PKG}:${FI_PKG}:${PLAYER_PKG}:${OGRE_PKG}:${PKG_CONFIG_PATH} PATH=${ODE_PATH}:${PATH} \
scons mode=optimized prefix=$(ROOT) install
Modified: pkg/trunk/3rdparty/kdl/Makefile
===================================================================
--- pkg/trunk/3rdparty/kdl/Makefile 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/3rdparty/kdl/Makefile 2008-11-26 02:31:51 UTC (rev 7325)
@@ -17,9 +17,12 @@
include $(shell rospack find mk)/svn_checkout.mk
CMAKE = `rospack find cmake`/cmake/bin/cmake
+BOOST_ROOT =$(shell rospack find boost)/boost
CMAKE_ARGS = -DCMAKE_INSTALL_PREFIX=$(PWD)/kdl/ \
-DPYTHON_BINDINGS=ON \
- -DKDL_PYTHON_INSTALL_PATH=$(PWD)/kdl/lib/
+ -DKDL_PYTHON_INSTALL_PATH=$(PWD)/kdl/lib/ \
+ -DBOOST_INCLUDEDIR:STRING=$(BOOST_ROOT)/include \
+ -DBOOST_LIBRARYDIR:STRING=$(BOOST_ROOT)/lib
build: wiped kdl
Modified: pkg/trunk/3rdparty/ogre/Makefile
===================================================================
--- pkg/trunk/3rdparty/ogre/Makefile 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/3rdparty/ogre/Makefile 2008-11-26 02:31:51 UTC (rev 7325)
@@ -12,30 +12,28 @@
ROOT = $(shell rospack find ogre)
OGREROOT = $(shell rospack find ogre)/ogre
-FIROOT = $(shell rospack find freeimage)/freeimage
-CGROOT = $(shell rospack find Cg)/Cg
-
-CFLAGS = -g \
+CFLAGS = -g -O3 \
$(shell rospack --lang=cpp --attrib=cflags export freeimage) \
- $(shell rospack --lang=cpp --attrib=cflags export player) \
$(shell rospack --lang=cpp --attrib=cflags export opende) \
- $(shell rospack --lang=cpp --attrib=cflags export Cg)
+ $(shell rospack --lang=cpp --attrib=cflags export Cg) \
+ $(shell rospack --lang=cpp --attrib=cflags export boost)
LFLAGS = $(shell rospack --lang=cpp --attrib=lflags export freeimage) \
- $(shell rospack --lang=cpp --attrib=lflags export player) \
$(shell rospack --lang=cpp --attrib=lflags export opende) \
- $(shell rospack --lang=cpp --attrib=lflags export Cg)
+ $(shell rospack --lang=cpp --attrib=lflags export Cg) \
+ $(shell rospack --lang=cpp --attrib=lflags export boost)
-CONFIGURE_FLAGS = --with-arch=nocona --enable-release CXXFLAGS='-g -O3 -I$(FIROOT)/include -I$(CGROOT)/include' LDFLAGS='-Wl,-rpath,$(FIROOT)/lib,-rpath,$(CGROOT)/lib -L$(FIROOT)/lib -L$(CGROOT)/lib' CFLAGS='-g -O3 -I$(FIROOT)/include -I$(OISROOT)/include -I$(CGROOT)/include'
+CONFIGURE_FLAGS = --prefix=$(OGREROOT) --enable-threading --with-pic --with-platform=GLX --with-gui=gtk --disable-ogre-demos --with-arch=nocona --enable-release
-$(SOURCE_DIR)/Makefile: $(SOURCE_DIR)
+$(SOURCE_DIR)/Makefile: $(SOURCE_DIR) changelist.txt
if test `uname` = Darwin ; then \
touch $(SOURCE_DIR)/Makefile; \
else \
cd $(SOURCE_DIR) && \
- export LIB="$(LFLAGS)" && \
+ export LDFLAGS="$(LFLAGS)" && \
export CFLAGS="$(CFLAGS)" && \
- ./configure --prefix=$(OGREROOT) --enable-threading --with-pic --with-platform=GLX --with-gui=gtk --disable-ogre-demos $(CONFIGURE_FLAGS) && \
+ export CXXFLAGS="$(CFLAGS)" && \
+ ./configure $(CONFIGURE_FLAGS) && \
touch $(ROOT)/$(SOURCE_DIR)/Makefile && \
mkdir -p $(ROOT)/ogre && \
mkdir -p $(ROOT)/ogre/lib && \
Added: pkg/trunk/3rdparty/ogre/changelist.txt
===================================================================
--- pkg/trunk/3rdparty/ogre/changelist.txt (rev 0)
+++ pkg/trunk/3rdparty/ogre/changelist.txt 2008-11-26 02:31:51 UTC (rev 7325)
@@ -0,0 +1 @@
+* Added to force reconfig/rebuild
Modified: pkg/trunk/drivers/motor/ethercat_hardware/manifest.xml
===================================================================
--- pkg/trunk/drivers/motor/ethercat_hardware/manifest.xml 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/drivers/motor/ethercat_hardware/manifest.xml 2008-11-26 02:31:51 UTC (rev 7325)
@@ -14,11 +14,9 @@
<depend package='misc_utils' />
<depend package='robot_msgs' />
<depend package='xenomai' />
+<depend package='boost' />
<export>
<cpp cflags="-I${prefix}/include" lflags="-L${prefix}/lib -lethercat_hardware -Wl,-rpath,${prefix}/lib"/>
</export>
<repository>http://pr.willowgarage.com/repos</repository>
-<sysdepend os="ubuntu" version="7.04-feisty" package="libboost-dev"/>
-<sysdepend os="ubuntu" version="7.10-gutsy" package="libboost-dev=1.34.1-2ubuntu1"/>
-<sysdepend os="ubuntu" version="8.04-hardy" package="libboost-dev"/>
</package>
Modified: pkg/trunk/drivers/robot/pr2/pr2_power_board/manifest.xml
===================================================================
--- pkg/trunk/drivers/robot/pr2/pr2_power_board/manifest.xml 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/drivers/robot/pr2/pr2_power_board/manifest.xml 2008-11-26 02:31:51 UTC (rev 7325)
@@ -7,7 +7,5 @@
<depend package="rospy" />
<depend package="rosthread" />
<depend package="robot_msgs" />
- <!--<depend package="boost" />-->
- <sysdepend os="ubuntu" version="8.04-hardy" package="libboost-thread1.34.1"/>
- <sysdepend os="ubuntu" version="8.04-hardy" package="libboost-thread-dev"/>
+ <depend package="boost" />
</package>
Modified: pkg/trunk/drivers/robot/pr2/pr2_power_board/src/power_node/CMakeLists.txt
===================================================================
--- pkg/trunk/drivers/robot/pr2/pr2_power_board/src/power_node/CMakeLists.txt 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/drivers/robot/pr2/pr2_power_board/src/power_node/CMakeLists.txt 2008-11-26 02:31:51 UTC (rev 7325)
@@ -1,6 +1,2 @@
-FIND_PACKAGE(Boost REQUIRED thread)
-
-
-
rospack_add_executable(power_node power_node.cpp)
-target_link_libraries(power_node ${Boost_LIBRARIES} )
+target_link_libraries(power_node boost_thread-mt)
Modified: pkg/trunk/openrave_planning/or_rosplanning/manifest.xml
===================================================================
--- pkg/trunk/openrave_planning/or_rosplanning/manifest.xml 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/openrave_planning/or_rosplanning/manifest.xml 2008-11-26 02:31:51 UTC (rev 7325)
@@ -8,6 +8,5 @@
<depend package="openrave"/>
<depend package="openrave_robot_description"/>
<depend package="libKinematics"/>
- <sysdepend os="ubuntu" version="7.04-feisty" package="libboost-dev"/>
- <sysdepend os="ubuntu" version="8.04-hardy" package="libboost-dev"/>
+ <depend package="boost"/>
</package>
Modified: pkg/trunk/util/resource_locator/CMakeLists.txt
===================================================================
--- pkg/trunk/util/resource_locator/CMakeLists.txt 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/util/resource_locator/CMakeLists.txt 2008-11-26 02:31:51 UTC (rev 7325)
@@ -4,11 +4,4 @@
rospack_add_library(resource_locator src/reslocator.cpp)
set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )
-find_package( Boost COMPONENTS regex )
-if( NOT ${Boost_regex_FOUND} )
- message(SEND_ERROR "could not find boost-regex")
-endif()
-
-include_directories(${Boost_INCLUDE_DIRS})
-link_directories(${Boost_LIBRARY_DIRS})
-target_link_libraries(resource_locator ${Boost_LIBRARIES})
+target_link_libraries(resource_locator -lboost_regex-mt)
Modified: pkg/trunk/util/resource_locator/manifest.xml
===================================================================
--- pkg/trunk/util/resource_locator/manifest.xml 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/util/resource_locator/manifest.xml 2008-11-26 02:31:51 UTC (rev 7325)
@@ -10,12 +10,9 @@
<review status="unreviewed" notes=""/>
<depend package="rosconsole" />
+ <depend package="boost"/>
<export>
<cpp cflags="-I${prefix}/include" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lresource_locator"/>
</export>
-
- <sysdepend os="ubuntu" version="7.10-gutsy" package="libboost-regex-dev"/>
- <sysdepend os="ubuntu" version="8.04-hardy" package="libboost-regex-dev"/>
- <sysdepend os="ubuntu" version="8.10-intrepid" package="libboost-regex-dev"/>
</package>
Modified: pkg/trunk/util/tf/CMakeLists.txt
===================================================================
--- pkg/trunk/util/tf/CMakeLists.txt 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/util/tf/CMakeLists.txt 2008-11-26 02:31:51 UTC (rev 7325)
@@ -4,12 +4,8 @@
genmsg()
-find_package(Boost 0 REQUIRED COMPONENTS thread)
-include_directories(${Boost_INCLUDE_DIRS})
-link_directories(${Boost_LIBRARY_DIRS})
-
rospack_add_library(tf src/tf.cpp src/transform_listener.cpp src/cache.cpp src/message_notifier.cpp)
-target_link_libraries(tf ${Boost_LIBRARIES})
+target_link_libraries(tf boost_thread-mt)
rospack_add_executable(simpletest simpletest.cpp)
target_link_libraries(simpletest tf)
Modified: pkg/trunk/util/tf/include/tf/message_notifier.h
===================================================================
--- pkg/trunk/util/tf/include/tf/message_notifier.h 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/util/tf/include/tf/message_notifier.h 2008-11-26 02:31:51 UTC (rev 7325)
@@ -450,7 +450,7 @@
bool destructing_; ///< Used to notify the worker thread that it needs to shutdown
boost::thread* thread_handle_; ///< Thread handle for the worker thread
- boost::condition new_data_; ///< Condition variable used for waking the worker thread
+ boost::condition_variable new_data_; ///< Condition variable used for waking the worker thread
bool new_messages_; ///< Used to skip waiting on new_data_ if new messages have come in while calling back
volatile bool new_transforms_; ///< Used to skip waiting on new_data_ if new transforms have come in while calling back or transforming data
V_Message new_message_queue_; ///< Queues messages to later be processed by the worker thread
Modified: pkg/trunk/util/tf/manifest.xml
===================================================================
--- pkg/trunk/util/tf/manifest.xml 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/util/tf/manifest.xml 2008-11-26 02:31:51 UTC (rev 7325)
@@ -17,13 +17,8 @@
<depend package="bullet"/>
<depend package="laser_scan_utils"/>
<depend package="rosTF"/> <!-- For backwards compatibility only Fixme remove /-->
-<sysdepend os="ubuntu" version="7.04-feisty" package="libboost-dev"/>
-<sysdepend os="ubuntu" version="7.10-gutsy" package="libboost-dev=1.34.1-2ubuntu1"/>
-<sysdepend os="ubuntu" version="8.04-hardy" package="libboost-dev"/>
-<sysdepend os="ubuntu" version="7.04-feisty" package="libboost-thread-dev"/>
-<sysdepend os="ubuntu" version="7.10-gutsy" package="libboost-thread-dev"/>
-<sysdepend os="ubuntu" version="8.04-hardy" package="libboost-thread-dev"/>
+<depend package="boost"/>
<export>
-<cpp cflags="-I${prefix}/include -I${prefix}/msg/cpp" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -ltf"/>
+<cpp cflags="-I${prefix}/include -I${prefix}/msg/cpp" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -ltf -lboost_thread-mt"/>
</export>
</package>
Modified: pkg/trunk/util/tf/test/test_notifier.cpp
===================================================================
--- pkg/trunk/util/tf/test/test_notifier.cpp 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/util/tf/test/test_notifier.cpp 2008-11-26 02:31:51 UTC (rev 7325)
@@ -50,14 +50,14 @@
: count_(0)
, expected_count_(expected_count)
{
- boost::detail::thread::lock_ops<boost::timed_mutex>::lock(mutex_);
+ lock_ = new boost::timed_mutex::scoped_lock(mutex_);
}
~Notification()
{
if (count_ < expected_count_)
{
- boost::detail::thread::lock_ops<boost::timed_mutex>::unlock(mutex_);
+ delete lock_;
}
}
@@ -69,13 +69,14 @@
if (count_ == expected_count_)
{
- boost::detail::thread::lock_ops<boost::timed_mutex>::unlock(mutex_);
+ delete lock_;
}
}
int count_;
int expected_count_;
+ boost::timed_mutex::scoped_lock* lock_;
boost::timed_mutex mutex_;
};
@@ -88,7 +89,7 @@
, expected_count_(expected_count)
, topic_(topic)
{
- boost::detail::thread::lock_ops<boost::timed_mutex>::lock(mutex_);
+ lock_ = new boost::timed_mutex::scoped_lock(mutex_);
g_node->subscribe(topic_, message_, &Counter::callback, this, 0);
}
@@ -99,7 +100,7 @@
if (count_ < expected_count_)
{
- boost::detail::thread::lock_ops<boost::timed_mutex>::unlock(mutex_);
+ delete lock_;
}
}
@@ -111,7 +112,7 @@
if (count_ == expected_count_)
{
- boost::detail::thread::lock_ops<boost::timed_mutex>::unlock(mutex_);
+ delete lock_;
}
}
@@ -121,6 +122,7 @@
int expected_count_;
std::string topic_;
+ boost::timed_mutex::scoped_lock* lock_;
boost::timed_mutex mutex_;
};
@@ -164,7 +166,7 @@
boost::timed_mutex::scoped_timed_lock lock(c.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
std_msgs::PointStamped msg;
@@ -179,7 +181,7 @@
boost::timed_mutex::scoped_timed_lock lock(n.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
EXPECT_EQ(1, n.count_);
@@ -209,7 +211,7 @@
boost::timed_mutex::scoped_timed_lock lock(c.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
g_broadcaster->sendTransform(btTransform(btQuaternion(0,0,0), btVector3(1,2,3)), stamp, "frame3", "frame4");
@@ -221,7 +223,7 @@
boost::timed_mutex::scoped_timed_lock lock(n.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
EXPECT_EQ(1, n.count_);
@@ -256,7 +258,7 @@
boost::timed_mutex::scoped_timed_lock lock(c.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
ros::Duration(0.1).sleep();
@@ -270,7 +272,7 @@
boost::timed_mutex::scoped_timed_lock lock(n.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
EXPECT_EQ(10, n.count_);
@@ -297,7 +299,7 @@
boost::timed_mutex::scoped_timed_lock lock(c.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
std_msgs::PointStamped msg;
@@ -312,7 +314,7 @@
boost::timed_mutex::scoped_timed_lock lock(n.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
EXPECT_EQ(1, n.count_);
@@ -339,7 +341,7 @@
boost::timed_mutex::scoped_timed_lock lock(c.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
std_msgs::PointStamped msg;
@@ -354,7 +356,7 @@
boost::timed_mutex::scoped_timed_lock lock(n.mutex_, xt);
- EXPECT_EQ(true, lock.locked());
+ EXPECT_EQ(true, lock.owns_lock());
}
EXPECT_EQ(1, n.count_);
Modified: pkg/trunk/visualization/ogre_tools/manifest.xml
===================================================================
--- pkg/trunk/visualization/ogre_tools/manifest.xml 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/visualization/ogre_tools/manifest.xml 2008-11-26 02:31:51 UTC (rev 7325)
@@ -11,15 +11,13 @@
<depend package="wxswig"/>
<depend package="ogre"/>
<depend package="rosconsole"/>
+ <depend package="boost"/>
<export>
<cpp cflags="-I${prefix}/src/" lflags="-Wl,-rpath,${prefix}/lib ${prefix}/lib/_ogre_tools.so"/>
<python path="${prefix}/lib/"/>
</export>
<sysdepend os="ubuntu" version="7.04-feisty" package="libwxgtk2.8-dev"/>
<sysdepend os="ubuntu" version="8.04-hardy" package="libwxgtk2.8-dev"/>
- <sysdepend os="ubuntu" version="7.04-feisty" package="libboost-dev"/>
- <sysdepend os="ubuntu" version="7.10-gutsy" package="libboost-dev=1.34.1-2ubuntu1"/>
- <sysdepend os="ubuntu" version="8.04-hardy" package="libboost-dev"/>
<sysdepend os="ubuntu" version="8.10-intrepid" package="libwxgtk2.8-dev"/>
</package>
Modified: pkg/trunk/visualization/ogre_visualizer/manifest.xml
===================================================================
--- pkg/trunk/visualization/ogre_visualizer/manifest.xml 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/visualization/ogre_visualizer/manifest.xml 2008-11-26 02:31:51 UTC (rev 7325)
@@ -16,6 +16,7 @@
<depend package="rosthread"/>
<depend package="tf"/>
<depend package="wg_robot_description"/>
+ <depend package="gazebo_robot_description"/>
<depend package="wg_robot_description_parser"/>
<depend package="scan_utils" />
<depend package="wxpropgrid"/>
@@ -25,6 +26,7 @@
<depend package="wxswig"/>
<depend package="wxPython_swig_interface"/>
<depend package="std_srvs"/>
+ <depend package="boost"/>
<export>
<cpp cflags="-I${prefix}/src/" lflags="-Wl,-rpath,${prefix}/lib ${prefix}/lib/_ogre_visualizer.so"/>
<python path="${prefix}/lib/"/>
@@ -32,10 +34,6 @@
<sysdepend os="ubuntu" version="7.04-feisty" package="libwxgtk2.8-dev"/>
<sysdepend os="ubuntu" version="8.04-hardy" package="libwxgtk2.8-dev"/>
- <sysdepend os="ubuntu" version="7.04-feisty" package="libboost-dev"/>
- <sysdepend os="ubuntu" version="7.10-gutsy" package="libboost-dev=1.34.1-2ubuntu1"/>
- <sysdepend os="ubuntu" version="8.04-hardy" package="libboost-dev"/>
- <sysdepend os="ubuntu" version="8.04-hardy" package="libboost-signals-dev"/>
<!-- Note that the presence of python-wxgtk2.6 will cause a
mysterious segfault -->
<sysdepend os="ubuntu" version="8.04-hardy" package="python-wxgtk2.8"/>
Modified: pkg/trunk/visualization/wx_rosout/CMakeLists.txt
===================================================================
--- pkg/trunk/visualization/wx_rosout/CMakeLists.txt 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/visualization/wx_rosout/CMakeLists.txt 2008-11-26 02:31:51 UTC (rev 7325)
@@ -12,10 +12,6 @@
include(${wxWidgets_USE_FILE})
include_directories(${wxWidgets_INCLUDE_DIRS})
-find_package(Boost 0 REQUIRED COMPONENTS regex)
-include_directories(${Boost_INCLUDE_DIRS})
-link_directories(${Boost_LIBRARY_DIRS})
-
# Find the combined swig flags for this project
_rospack_invoke(${PROJECT_NAME} ${PROJECT_NAME} SWIG_FLAGS "--lang=swig" "--attrib=flags" "export")
set(SWIG_FLAGS ${${PROJECT_NAME}_SWIG_FLAGS})
@@ -41,7 +37,7 @@
src/wx_rosout/rosout_list_control.cpp
src/wx_rosout/rosout_setup_dialog.cpp
${SWIG_OUTPUT_CPP_FILE})
-target_link_libraries(${PROJECT_NAME} ${wxWidgets_LIBRARIES} ${Boost_LIBRARIES})
+target_link_libraries(${PROJECT_NAME} ${wxWidgets_LIBRARIES} -lboost_regex)
# swig python needs a shared library named _<modulename>.[so|dll|...]
# this renames the output file to conform to that by prepending an underscore and removing the "lib" prefix
set_target_properties(${PROJECT_NAME}
Modified: pkg/trunk/visualization/wx_rosout/manifest.xml
===================================================================
--- pkg/trunk/visualization/wx_rosout/manifest.xml 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/visualization/wx_rosout/manifest.xml 2008-11-26 02:31:51 UTC (rev 7325)
@@ -13,16 +13,12 @@
<depend package="rosthread"/>
<depend package="wxswig"/>
<depend package="wxPython_swig_interface"/>
+ <depend package="boost"/>
<export>
<cpp cflags="-I${prefix}/src/" lflags="-Wl,-rpath,${prefix}/lib ${prefix}/lib/_wx_rosout.so"/>
<python path="${prefix}/lib/"/>
</export>
<sysdepend os="ubuntu" version="7.04-feisty" package="libwxgtk2.8-dev"/>
<sysdepend os="ubuntu" version="8.04-hardy" package="libwxgtk2.8-dev"/>
-<sysdepend os="ubuntu" version="7.04-feisty" package="libboost-dev"/>
-<sysdepend os="ubuntu" version="7.10-gutsy" package="libboost-dev=1.34.1-2ubuntu1"/>
-<sysdepend os="ubuntu" version="8.04-hardy" package="libboost-dev"/>
-<sysdepend os="ubuntu" version="7.04-feisty" package="libboost-regex-dev"/>
-<sysdepend os="ubuntu" version="8.04-hardy" package="libboost-regex-dev"/>
</package>
Modified: pkg/trunk/visualization/wx_rosout/src/test/send_test.cpp
===================================================================
--- pkg/trunk/visualization/wx_rosout/src/test/send_test.cpp 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/visualization/wx_rosout/src/test/send_test.cpp 2008-11-26 02:31:51 UTC (rev 7325)
@@ -21,7 +21,7 @@
ROS_FATAL("Fatal%d", count);
ROS_INFO("Newline\nTest\nblah\nblah\nblah\nblah\nblah\n");
- usleep( 10000 );
+ //usleep( 10000 );
++count;
}
Modified: pkg/trunk/world_models/topological_map/manifest.xml
===================================================================
--- pkg/trunk/world_models/topological_map/manifest.xml 2008-11-26 02:31:01 UTC (rev 7324)
+++ pkg/trunk/world_models/topological_map/manifest.xml 2008-11-26 02:31:51 UTC (rev 7325)
@@ -7,9 +7,8 @@
<depend package="std_msgs" />
<depend package="std_srvs" />
<depend package="rosconsole" />
+<depend package="boost" />
<export>
<cpp cflags="-I${prefix}/include" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -ltf" />
</export>
-<sysdepend os="ubuntu" version="7.04-hardy" package="libboost-graph-dev"/>
-<sysdepend os="ubuntu" version="8.04-hardy" package="libboost-graph-dev"/>
</package>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pof...@us...> - 2008-11-26 18:17:50
|
Revision: 7351
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7351&view=rev
Author: poftwaresatent
Date: 2008-11-26 18:17:44 +0000 (Wed, 26 Nov 2008)
Log Message:
-----------
fix mem problems, thanks Brian. (resolves #652)
Modified Paths:
--------------
pkg/trunk/highlevel/highlevel_controllers/src/move_base_sbpl.cpp
pkg/trunk/motion_planning/mp_benchmarks/src/mpbench-incremental.cpp
pkg/trunk/motion_planning/mp_benchmarks/src/mpbench.cpp
pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.cpp
pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.hh
Modified: pkg/trunk/highlevel/highlevel_controllers/src/move_base_sbpl.cpp
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/src/move_base_sbpl.cpp 2008-11-26 17:17:45 UTC (rev 7350)
+++ pkg/trunk/highlevel/highlevel_controllers/src/move_base_sbpl.cpp 2008-11-26 18:17:44 UTC (rev 7351)
@@ -116,13 +116,14 @@
virtual void updateGoalMsg();
private:
+ typedef list<ompl::SBPLPlannerStatsEntry> plannerStats_t;
bool isMapDataOK();
MDPConfig mdpCfg_;
ompl::EnvironmentWrapper * env_;
ompl::SBPLPlannerManager * pMgr_;
- ompl::SBPLPlannerStatistics pStat_;
+ plannerStats_t pStat_;
double plannerTimeLimit_; /* The amount of time given to the planner to find a plan */
std::string planStatsFile_;
size_t goalCount_;
@@ -231,7 +232,6 @@
ROS_ERROR("in MoveBaseSBPL ctor: pMgr_->select(%s) failed", plannerType.c_str());
throw int(5);
}
- pStat_.pushBack(plannerType, environmentType);
}
catch (int ii) {
delete env_;
@@ -270,8 +270,7 @@
bool MoveBaseSBPL::makePlan(){
ROS_DEBUG("Planning for new goal...\n");
- ompl::SBPLPlannerStatistics::entry & statsEntry(pStat_.top());
-
+ ompl::SBPLPlannerStatsEntry statsEntry(pMgr_->getName(), env_->getName());
try {
// Update costs
lock();
@@ -374,7 +373,7 @@
statsEntry.logFile(planStatsFile_.c_str(), title, prefix_os.str().c_str());
}
//// statsEntry.logInfo("move_base_sbpl: ");
- pStat_.pushBack(pMgr_->getName(), env_->getName());
+ pStat_.push_back(statsEntry);
updatePlan(plan);
return true;
Modified: pkg/trunk/motion_planning/mp_benchmarks/src/mpbench-incremental.cpp
===================================================================
--- pkg/trunk/motion_planning/mp_benchmarks/src/mpbench-incremental.cpp 2008-11-26 17:17:45 UTC (rev 7350)
+++ pkg/trunk/motion_planning/mp_benchmarks/src/mpbench-incremental.cpp 2008-11-26 18:17:44 UTC (rev 7351)
@@ -74,14 +74,16 @@
static shared_ptr<SBPLBenchmarkSetup> setup;
static shared_ptr<EnvironmentWrapper> environment;
static shared_ptr<SBPLPlannerManager> plannerMgr;
-static shared_ptr<SBPLPlannerStatistics> plannerStats;
static shared_ptr<ostream> logos;
static shared_ptr<footprint_t> footprint;
static planList_t planList;
+typedef vector<SBPLPlannerStatsEntry> plannerStats_t;
+static plannerStats_t plannerStats;
+
int main(int argc, char ** argv)
{
if (0 != atexit(cleanup))
@@ -115,7 +117,6 @@
setup.reset();
environment.reset();
plannerMgr.reset();
- plannerStats.reset();
logos.reset();
planList.clear();
}
@@ -503,9 +504,6 @@
if ( ! plannerMgr->select(plannerType, false, logos.get()))
errx(EXIT_FAILURE, "plannerMgr->select(%s) failed", plannerType.c_str());
*logos << " planner name: " << plannerMgr->getName() << "\n" << flush;
-
- *logos << "creating planner stats\n" << flush;
- plannerStats.reset(new SBPLPlannerStatistics());
}
@@ -516,10 +514,9 @@
IndexTransformWrap const & it(*setup->getIndexTransform());
SBPLBenchmarkSetup::tasklist_t const & tasklist(setup->getTasks());
for (size_t ii(0); ii < tasklist.size(); ++ii) {
- plannerStats->pushBack(plannerMgr->getName(), environment->getName());
- SBPLPlannerStatistics::entry & statsEntry(plannerStats->top());
+ SBPLPlannerStatsEntry statsEntry(plannerMgr->getName(), environment->getName());
SBPLBenchmarkSetup::task const & task(tasklist[ii]);
-
+
*logos << "\n task " << ii << ": " << task.description << "\n" << flush;
// set start
@@ -558,9 +555,10 @@
// - initially just the 1st path we come across
// - subsequently with some allocated timeslice
// - until there is no change in the returned path
-
+
+ statsEntry.plan_length_m = 0; // just in case the first replan() fails
+ statsEntry.plan_angle_change_rad = 0;
vector<int> prevSolution;
- SBPLPlannerStatistics::entry & prevStatsEntry(statsEntry);
for (size_t jj(0); true; ++jj) {
// Handle the first iteration specially.
@@ -583,16 +581,17 @@
&statsEntry.actual_time_system_sec,
&statsEntry.solution_cost,
&solution);
-
+
// forget about this task if we got a planning failure
if ((1 != statsEntry.status) // planners should provide status
|| (1 >= solution.size()) // but sometimes they do not
) {
statsEntry.logStream(*logos, " FAILURE", " ");
*logos << flush;
+ plannerStats.push_back(statsEntry);
break;
}
-
+
// detect whether we got the same result as before, in which
// case we're done
if (prevSolution.size() == solution.size()) {
@@ -605,7 +604,7 @@
if (same) {
statsEntry.logStream(*logos, " FINAL", " ");
*logos << flush;
- statsEntry = prevStatsEntry;
+ plannerStats.push_back(statsEntry);
break;
}
}
@@ -625,11 +624,8 @@
else
statsEntry.logStream(*logos, " IMPROVED", " ");
*logos << flush;
-
- plannerStats->pushBack(plannerMgr->getName(), environment->getName());
- prevStatsEntry = statsEntry;
- statsEntry = plannerStats->top();
-
+ plannerStats.push_back(statsEntry);
+
prevSolution.swap(solution);
}
}
@@ -638,16 +634,15 @@
void print_summary()
{
- SBPLPlannerStatistics::stats_t const & stats(plannerStats->getAll());
size_t n_success(0);
size_t n_fail(0);
double t_success(0);
double t_fail(0);
double lplan(0);
double rplan(0);
- for (SBPLPlannerStatistics::stats_t::const_iterator ie(stats.begin()); ie != stats.end(); ++ie) {
- // cannot use status, some planners say SUCCESS even they fail
- if (ie->plan_length_m < 1e-3) {
+ for (plannerStats_t::const_iterator ie(plannerStats.begin()); ie != plannerStats.end(); ++ie) {
+ // cannot always use status, some planners say SUCCESS even they fail
+ if ((1 != ie->status) || (ie->plan_length_m < 1e-3)) {
++n_fail;
t_fail += ie->actual_time_user_sec;
}
Modified: pkg/trunk/motion_planning/mp_benchmarks/src/mpbench.cpp
===================================================================
--- pkg/trunk/motion_planning/mp_benchmarks/src/mpbench.cpp 2008-11-26 17:17:45 UTC (rev 7350)
+++ pkg/trunk/motion_planning/mp_benchmarks/src/mpbench.cpp 2008-11-26 18:17:44 UTC (rev 7351)
@@ -75,14 +75,16 @@
static shared_ptr<SBPLBenchmarkSetup> setup;
static shared_ptr<EnvironmentWrapper> environment;
static shared_ptr<SBPLPlannerManager> plannerMgr;
-static shared_ptr<SBPLPlannerStatistics> plannerStats;
static shared_ptr<ostream> logos;
static shared_ptr<footprint_t> footprint;
static planList_t planList;
+typedef vector<SBPLPlannerStatsEntry> plannerStats_t;
+static plannerStats_t plannerStats;
+
int main(int argc, char ** argv)
{
if (0 != atexit(cleanup))
@@ -116,7 +118,6 @@
setup.reset();
environment.reset();
plannerMgr.reset();
- plannerStats.reset();
logos.reset();
planList.clear();
}
@@ -547,9 +548,6 @@
if ( ! plannerMgr->select(plannerType, false, logos.get()))
errx(EXIT_FAILURE, "plannerMgr->select(%s) failed", plannerType.c_str());
*logos << " planner name: " << plannerMgr->getName() << "\n" << flush;
-
- *logos << "creating planner stats\n" << flush;
- plannerStats.reset(new SBPLPlannerStatistics());
}
@@ -560,8 +558,7 @@
IndexTransformWrap const & it(*setup->getIndexTransform());
SBPLBenchmarkSetup::tasklist_t const & tasklist(setup->getTasks());
for (size_t ii(0); ii < tasklist.size(); ++ii) {
- plannerStats->pushBack(plannerMgr->getName(), environment->getName());
- SBPLPlannerStatistics::entry & statsEntry(plannerStats->top());
+ SBPLPlannerStatsEntry statsEntry(plannerMgr->getName(), environment->getName());
SBPLBenchmarkSetup::task const & task(tasklist[ii]);
*logos << "\n task " << ii << ": " << task.description << "\n" << flush;
@@ -599,8 +596,6 @@
statsEntry.goalState, statsEntry.goalIx, statsEntry.goalIy, status);
// plan it
- if (task.from_scratch)
- plannerMgr->force_planning_from_scratch();
vector<int> solutionStateIDs;
statsEntry.stop_at_first_solution = false;
statsEntry.plan_from_scratch = task.from_scratch;
@@ -632,6 +627,8 @@
title = " FAILURE";
statsEntry.logStream(*logos, title, " ");
*logos << flush;
+
+ plannerStats.push_back(statsEntry);
}
}
}
@@ -639,16 +636,15 @@
void print_summary()
{
- SBPLPlannerStatistics::stats_t const & stats(plannerStats->getAll());
size_t n_success(0);
size_t n_fail(0);
double t_success(0);
double t_fail(0);
double lplan(0);
double rplan(0);
- for (SBPLPlannerStatistics::stats_t::const_iterator ie(stats.begin()); ie != stats.end(); ++ie) {
- // cannot use status, some planners say SUCCESS even they fail
- if (ie->plan_length_m < 1e-3) {
+ for (plannerStats_t::const_iterator ie(plannerStats.begin()); ie != plannerStats.end(); ++ie) {
+ // cannot always use status, some planners say SUCCESS even they fail
+ if ((ie->status != 1) || (ie->plan_length_m < 1e-3)) {
++n_fail;
t_fail += ie->actual_time_user_sec;
}
Modified: pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.cpp
===================================================================
--- pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.cpp 2008-11-26 17:17:45 UTC (rev 7350)
+++ pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.cpp 2008-11-26 18:17:44 UTC (rev 7351)
@@ -239,8 +239,8 @@
}
- SBPLPlannerStatistics::entry::
- entry(std::string const & _plannerType, std::string const & _environmentType)
+ SBPLPlannerStatsEntry::
+ SBPLPlannerStatsEntry(std::string const & _plannerType, std::string const & _environmentType)
: plannerType(_plannerType),
environmentType(_environmentType),
goalState(-1),
@@ -250,28 +250,7 @@
}
- void SBPLPlannerStatistics::
- pushBack(std::string const & plannerType, std::string const & environmentType)
- {
- stats_.push_back(entry(plannerType, environmentType));
- }
-
-
- SBPLPlannerStatistics::entry & SBPLPlannerStatistics::
- top()
- {
- return stats_.back();
- }
-
-
- SBPLPlannerStatistics::stats_t const & SBPLPlannerStatistics::
- getAll() const
- {
- return stats_;
- }
-
-
- void SBPLPlannerStatistics::entry::
+ void SBPLPlannerStatsEntry::
logInfo(char const * prefix) const
{
ostringstream os;
@@ -280,12 +259,12 @@
}
- void SBPLPlannerStatistics::entry::
+ void SBPLPlannerStatsEntry::
logFile(char const * filename, char const * title, char const * prefix) const
{
FILE * ff(fopen(filename, "a"));
if (0 == ff) {
- ROS_WARN("SBPLPlannerStatistics::entry::logFile(): fopen(%s): %s",
+ ROS_WARN("SBPLPlannerStatsEntry::logFile(): fopen(%s): %s",
filename, strerror(errno));
return;
}
@@ -293,12 +272,12 @@
logStream(os, title, prefix);
fprintf(ff, "%s", os.str().c_str());
if (0 != fclose(ff))
- ROS_WARN("SBPLPlannerStatistics::entry::logFile(): fclose() on %s: %s",
+ ROS_WARN("SBPLPlannerStatsEntry::logFile(): fclose() on %s: %s",
filename, strerror(errno));
}
- void SBPLPlannerStatistics::entry::
+ void SBPLPlannerStatsEntry::
logStream(std::ostream & os, std::string const & title, std::string const & prefix) const
{
if ( ! title.empty())
Modified: pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.hh
===================================================================
--- pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.hh 2008-11-26 17:17:45 UTC (rev 7350)
+++ pkg/trunk/motion_planning/sbpl_util/src/sbpl_util.hh 2008-11-26 18:17:44 UTC (rev 7351)
@@ -92,65 +92,41 @@
std::ostream * opt_err_os);
- /**
- Collection of statistic for SBPL planner runs.
- */
- class SBPLPlannerStatistics
- {
- public:
- /** One element of the statistics. Represents one SBPLPlanner::replan() cycle. */
- struct entry {
- entry(std::string const & plannerType, std::string const & environmentType);
-
- std::string plannerType; /**< name of the planner (an SBPLPlanner subclass) */
- std::string environmentType; /**< name of the environment type (2D, 3DKIN, ...) */
- std_msgs::Pose2DFloat32 goal; /**< from the std_msgs::Planner2DGoal we received (map frame) */
- unsigned int goalIx; /**< x-index of the goal in the costmap */
- unsigned int goalIy; /**< y-index of the goal in the costmap */
- int goalState; /**< stateID of the goal (from costmap indices) */
- std_msgs::Pose2DFloat32 start; /**< global pose (map frame) "just before" before planning */
- unsigned int startIx; /**< x-index of the start in the costmap */
- unsigned int startIy; /**< y-index of the start in the costmap */
- int startState; /**< stateID of the start (from costmap indices) */
- bool stop_at_first_solution; /**< whether to just plan until any plan is found */
- bool plan_from_scratch; /**< whether to discard any previous solutions */
- double allocated_time_sec; /**< the amount of time we had available for planning */
- double actual_time_wall_sec; /**< the amount of time actually used for planning (wallclock) */
- double actual_time_user_sec; /**< the amount of time actually used for planning (user time) */
- double actual_time_system_sec; /**< the amount of time actually used for planning (system time) */
-
- int status; /**< return value of replan() (i.e. success == 1, or -42 if replan() never got called) */
- int solution_cost; /**< cost of the solution, as given by replan() */
- double plan_length_m; /**< cumulated Euclidean distance between planned waypoints */
- double plan_angle_change_rad; /**< cumulated abs(delta(angle)) along planned waypoints */
-
- /** Use ROS_INFO() to log this entry to rosconsole.
- \todo needs to be unified with the other logXXX() methods
- */
- void logInfo(char const * prefix = "") const;
-
- /** Append this entry to a logfile (which is opened and closed each time). */
- void logFile(char const * filename, char const * title, char const * prefix) const;
-
- /** Append this entry to a stream. */
- void logStream(std::ostream & os, std::string const & title, std::string const & prefix) const;
- };
+ struct SBPLPlannerStatsEntry {
+ SBPLPlannerStatsEntry(std::string const & plannerType, std::string const & environmentType);
- typedef std::vector<entry> stats_t;
+ std::string plannerType; /**< name of the planner (an SBPLPlanner subclass) */
+ std::string environmentType; /**< name of the environment type (2D, 3DKIN, ...) */
+ std_msgs::Pose2DFloat32 goal; /**< from the std_msgs::Planner2DGoal we received (map frame) */
+ unsigned int goalIx; /**< x-index of the goal in the costmap */
+ unsigned int goalIy; /**< y-index of the goal in the costmap */
+ int goalState; /**< stateID of the goal (from costmap indices) */
+ std_msgs::Pose2DFloat32 start; /**< global pose (map frame) "just before" before planning */
+ unsigned int startIx; /**< x-index of the start in the costmap */
+ unsigned int startIy; /**< y-index of the start in the costmap */
+ int startState; /**< stateID of the start (from costmap indices) */
+ bool stop_at_first_solution; /**< whether to just plan until any plan is found */
+ bool plan_from_scratch; /**< whether to discard any previous solutions */
+ double allocated_time_sec; /**< the amount of time we had available for planning */
+ double actual_time_wall_sec; /**< the amount of time actually used for planning (wallclock) */
+ double actual_time_user_sec; /**< the amount of time actually used for planning (user time) */
+ double actual_time_system_sec; /**< the amount of time actually used for planning (system time) */
- /** Create a fresh entry and append it to the end of the
- accumulated statistics. */
- void pushBack(std::string const & plannerType, std::string const & environmentType);
+ int status; /**< return value of replan() (i.e. success == 1, or -42 if replan() never got called) */
+ int solution_cost; /**< cost of the solution, as given by replan() */
+ double plan_length_m; /**< cumulated Euclidean distance between planned waypoints */
+ double plan_angle_change_rad; /**< cumulated abs(delta(angle)) along planned waypoints */
- /** \return The topmost (latest) element, which is only defined if
- you called pushBack() at least once. */
- entry & top();
+ /** Use ROS_INFO() to log this entry to rosconsole.
+ \todo needs to be unified with the other logXXX() methods
+ */
+ void logInfo(char const * prefix = "") const;
- /** Read-only access to the entire history. */
- stats_t const & getAll() const;
+ /** Append this entry to a logfile (which is opened and closed each time). */
+ void logFile(char const * filename, char const * title, char const * prefix) const;
- protected:
- stats_t stats_;
+ /** Append this entry to a stream. */
+ void logStream(std::ostream & os, std::string const & title, std::string const & prefix) const;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rdi...@us...> - 2008-11-26 20:16:09
|
Revision: 7365
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7365&view=rev
Author: rdiankov
Date: 2008-11-26 20:16:06 +0000 (Wed, 26 Nov 2008)
Log Message:
-----------
openrave session updates
Modified Paths:
--------------
pkg/trunk/3rdparty/openrave/manifest.xml
pkg/trunk/openrave_planning/openraveros/src/session.h
Modified: pkg/trunk/3rdparty/openrave/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/openrave/manifest.xml 2008-11-26 20:13:43 UTC (rev 7364)
+++ pkg/trunk/3rdparty/openrave/manifest.xml 2008-11-26 20:16:06 UTC (rev 7365)
@@ -11,6 +11,7 @@
</export>
<depend package="soqt"/>
<depend package="opende"/>
+ <depend package="std_msgs"/>
<versioncontrol type="svn" url="https://openrave.svn.sourceforge.net/svnroot/openrave"/>
<sysdepend os="ubuntu" version="7.04-feisty" package="libglew-dev"/>
<sysdepend os="ubuntu" version="8.04-hardy" package="libglew1.5-dev"/>
Modified: pkg/trunk/openrave_planning/openraveros/src/session.h
===================================================================
--- pkg/trunk/openrave_planning/openraveros/src/session.h 2008-11-26 20:13:43 UTC (rev 7364)
+++ pkg/trunk/openrave_planning/openraveros/src/session.h 2008-11-26 20:16:06 UTC (rev 7365)
@@ -23,6 +23,9 @@
// POSSIBILITY OF SUCH DAMAGE.
//
// author: Rosen Diankov
+
+#include <openraveros/openrave_session.h>
+
#include <openraveros/body_destroy.h>
#include <openraveros/body_enable.h>
#include <openraveros/body_getaabb.h>
@@ -48,7 +51,6 @@
#include <openraveros/env_set.h>
#include <openraveros/env_triangulate.h>
#include <openraveros/env_wait.h>
-#include <openraveros/openrave_session.h>
#include <openraveros/planner_init.h>
#include <openraveros/planner_plan.h>
#include <openraveros/problem_sendcommand.h>
@@ -83,5 +85,42 @@
virtual void SyncWithWorkerThread();
private:
- bool
+ bool session_callback(openrave_session::request& openrave_session::response& res);
+
+ bool body_destroy_srv(body_destroy::request& body_destroy::response& res);
+ bool body_enable_srv(body_enable::request& body_enable::response& res);
+ bool body_getaabb_srv(body_getaabb::request& body_getaabb::response& res);
+ bool body_getaabbs_srv(body_getaabbs::request& body_getaabbs::response& res);
+ bool body_getdof_srv(body_getdof::request& body_getdof::response& res);
+ bool body_getlinks_srv(body_getlinks::request& body_getlinks::response& res);
+ bool body_setjointvalues_srv(body_setjointvalues::request& body_setjointvalues::response& res);
+ bool body_settransform_srv(body_settransform::request& body_settransform::response& res);
+ bool env_checkcollision_srv(env_checkcollision::request& env_checkcollision::response& res);
+ bool env_closefigures_srv(env_closefigures::request& env_closefigures::response& res);
+ bool env_createbody_srv(env_createbody::request& env_createbody::response& res);
+ bool env_createplanner_srv(env_createplanner::request& env_createplanner::response& res);
+ bool env_createproblem_srv(env_createproblem::request& env_createproblem::response& res);
+ bool env_createrobot_srv(env_createrobot::request& env_createrobot::response& res);
+ bool env_destroyproblem_srv(env_destroyproblem::request& env_destroyproblem::response& res);
+ bool env_getbodies_srv(env_getbodies::request& env_getbodies::response& res);
+ bool env_getbody_srv(env_getbody::request& env_getbody::response& res);
+ bool env_getrobots_srv(env_getrobots::request& env_getrobots::response& res);
+ bool env_loadplugin_srv(env_loadplugin::request& env_loadplugin::response& res);
+ bool env_loadscene_srv(env_loadscene::request& env_loadscene::response& res);
+ bool env_plot_srv(env_plot::request& env_plot::response& res);
+ bool env_raycollision_srv(env_raycollision::request& env_raycollision::response& res);
+ bool env_set_srv(env_set::request& env_set::response& res);
+ bool env_triangulate_srv(env_triangulate::request& env_triangulate::response& res);
+ bool env_wait_srv(env_wait::request& env_wait::response& res);
+ bool planner_init_srv(planner_init::request& planner_init::response& res);
+ bool planner_plan_srv(planner_plan::request& planner_plan::response& res);
+ bool problem_sendcommand_srv(problem_sendcommand::request& problem_sendcommand::response& res);
+ bool robot_controllersend_srv(robot_controllersend::request& robot_controllersend::response& res);
+ bool robot_controllerset_srv(robot_controllerset::request& robot_controllerset::response& res);
+ bool robot_getactivedof_srv(robot_getactivedof::request& robot_getactivedof::response& res);
+ bool robot_getactivevalues_srv(robot_getactivevalues::request& robot_getactivevalues::response& res);
+ bool robot_sensorgetdata_srv(robot_sensorgetdata::request& robot_sensorgetdata::response& res);
+ bool robot_sensorsend_srv(robot_sensorsend::request& robot_sensorsend::response& res);
+ bool robot_setactivedofs_srv(robot_setactivedofs::request& robot_setactivedofs::response& res);
+ bool robot_setactivevalues_srv(robot_setactivevalues::request& robot_setactivevalues::response& res);
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mc...@us...> - 2008-11-26 22:31:49
|
Revision: 7373
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7373&view=rev
Author: mcgann
Date: 2008-11-26 22:31:45 +0000 (Wed, 26 Nov 2008)
Log Message:
-----------
Add log directory to path and source with path lookup for clock logging
Modified Paths:
--------------
pkg/trunk/demos/2dnav_pr2/trex/run_milestone_1.xml
pkg/trunk/demos/2dnav_pr2/trex/run_office_endurance_test.xml
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/CMakeLists.txt
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/src/LogClock.cc
Modified: pkg/trunk/demos/2dnav_pr2/trex/run_milestone_1.xml
===================================================================
--- pkg/trunk/demos/2dnav_pr2/trex/run_milestone_1.xml 2008-11-26 22:27:57 UTC (rev 7372)
+++ pkg/trunk/demos/2dnav_pr2/trex/run_milestone_1.xml 2008-11-26 22:31:45 UTC (rev 7373)
@@ -1,6 +1,6 @@
<launch>
<param name="/trex/input_file" value="pr2.cfg"/>
- <param name="/trex/path" value="$(find 2dnav_pr2)/trex:$(find executive_trex_pr2)/miles.3:$(find executive_trex_pr2)"/>
+ <param name="/trex/path" value="$(find 2dnav_pr2)/trex:$(find executive_trex_pr2)/miles.3:$(find 2dnav_pr2)/trex/logs:$(find executive_trex_pr2)"/>
<param name="/trex/log_dir" value="$(find 2dnav_pr2)/trex/logs"/>
<node pkg="executive_trex_pr2" type="trexfast"/>
</launch>
Modified: pkg/trunk/demos/2dnav_pr2/trex/run_office_endurance_test.xml
===================================================================
--- pkg/trunk/demos/2dnav_pr2/trex/run_office_endurance_test.xml 2008-11-26 22:27:57 UTC (rev 7372)
+++ pkg/trunk/demos/2dnav_pr2/trex/run_office_endurance_test.xml 2008-11-26 22:31:45 UTC (rev 7373)
@@ -1,6 +1,6 @@
<launch>
<param name="/trex/input_file" value="pr2.cfg"/>
- <param name="/trex/path" value="$(find 2dnav_pr2)/trex:$(find executive_trex_pr2)/miles.1:$(find executive_trex_pr2)"/>
+ <param name="/trex/path" value="$(find 2dnav_pr2)/trex:$(find executive_trex_pr2)/miles.1:$(find 2dnav_pr2)/trex/logs:$(find executive_trex_pr2)"/>
<param name="/trex/log_dir" value="$(find 2dnav_pr2)/trex/logs"/>
<node pkg="executive_trex_pr2" type="trexfast"/>
</launch>
Modified: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/CMakeLists.txt
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/CMakeLists.txt 2008-11-26 22:27:57 UTC (rev 7372)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/CMakeLists.txt 2008-11-26 22:31:45 UTC (rev 7373)
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.6)
include(rosbuild)
-set(ROS_BUILD_TYPE Release)
+#set(ROS_BUILD_TYPE Release)
rospack(executive_trex_pr2)
Modified: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/src/LogClock.cc
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/src/LogClock.cc 2008-11-26 22:27:57 UTC (rev 7372)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/src/LogClock.cc 2008-11-26 22:31:45 UTC (rev 7373)
@@ -1,12 +1,12 @@
#include "Clock.hh"
-#include <errno.h>
-#include <time.h>
-#include <signal.h>
#include "LogClock.hh"
#include "Agent.hh"
#include "LogManager.hh"
#include "Components.hh"
#include "Utilities.hh"
+#include <errno.h>
+#include <time.h>
+#include <signal.h>
namespace TREX {
/**
@@ -17,7 +17,7 @@
m_gets(0), m_tick(0),
m_secondsPerTick(secondsPerTick) {
pthread_mutex_init(&m_lock, NULL);
- m_file = fopen("./latest/clock.log", "w");
+ m_file = fopen(findFile("./latest/clock.log").c_str(), "w");
}
void LogClock::start(){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rdi...@us...> - 2008-11-28 11:04:56
|
Revision: 7400
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7400&view=rev
Author: rdiankov
Date: 2008-11-28 11:04:51 +0000 (Fri, 28 Nov 2008)
Log Message:
-----------
in progress openrave session server
Modified Paths:
--------------
pkg/trunk/3rdparty/openrave/Makefile
pkg/trunk/openrave_planning/openraveros/CMakeLists.txt
pkg/trunk/openrave_planning/openraveros/src/openraveros.cpp
pkg/trunk/openrave_planning/openraveros/src/openraveros.h
pkg/trunk/openrave_planning/openraveros/src/session.h
pkg/trunk/openrave_planning/openraveros/srv/env_set.srv
pkg/trunk/openrave_planning/openraveros/srv/openrave_session.srv
pkg/trunk/openrave_planning/orrosplanning/src/orrosplanningmain.cpp
pkg/trunk/openrave_planning/orrosplanning/src/plugindefs.h
pkg/trunk/openrave_planning/orrosplanning/src/rosarmik.cpp
pkg/trunk/openrave_planning/orrosplanning/src/rosarmik.h
Added Paths:
-----------
pkg/trunk/openrave_planning/openraveros/src/rosserver.h
Removed Paths:
-------------
pkg/trunk/openrave_planning/openraveros/src/session.cpp
Modified: pkg/trunk/3rdparty/openrave/Makefile
===================================================================
--- pkg/trunk/3rdparty/openrave/Makefile 2008-11-28 08:10:49 UTC (rev 7399)
+++ pkg/trunk/3rdparty/openrave/Makefile 2008-11-28 11:04:51 UTC (rev 7400)
@@ -2,7 +2,7 @@
SVN_DIR = openrave_svn
# Should really specify a revision
-SVN_REVISION = -r 513
+SVN_REVISION = -r 521
SVN_URL = https://openrave.svn.sourceforge.net/svnroot/openrave
include $(shell rospack find mk)/svn_checkout.mk
Modified: pkg/trunk/openrave_planning/openraveros/CMakeLists.txt
===================================================================
--- pkg/trunk/openrave_planning/openraveros/CMakeLists.txt 2008-11-28 08:10:49 UTC (rev 7399)
+++ pkg/trunk/openrave_planning/openraveros/CMakeLists.txt 2008-11-28 11:04:51 UTC (rev 7400)
@@ -4,5 +4,5 @@
rospack(openraveros)
genmsg()
gensrv()
-add_executable(openraveros src/openraveros.cpp)
-target_link_libraries (openraveros pthread openrave-core)
+rospack_add_executable(openraveros src/openraveros.cpp)
+target_link_libraries (openraveros openrave-core boost_thread)
Modified: pkg/trunk/openrave_planning/openraveros/src/openraveros.cpp
===================================================================
--- pkg/trunk/openrave_planning/openraveros/src/openraveros.cpp 2008-11-28 08:10:49 UTC (rev 7399)
+++ pkg/trunk/openrave_planning/openraveros/src/openraveros.cpp 2008-11-28 11:04:51 UTC (rev 7400)
@@ -24,126 +24,19 @@
//
// author: Rosen Diankov
#include "openraveros.h"
-#include <signal.h>
+#include "session.h"
-void sigint_handler(int);
-void* MainOpenRAVEThread(void*p);
-
-static EnvironmentBase* penv = NULL;
-static bool bDisplayGUI = false;
-static pthread_t s_mainThread;
-static boost::shared_ptr<RaveServerBase> s_server;
-static bool bThreadDestroyed = false;
-int g_argc;
-char** g_argv;
-
int main(int argc, char ** argv)
{
- g_argc = argc;
- g_argv = argv;
+ ros::init(argc,argv);
+ ros::node masternode("openraveserver");
- int nServPort = 4765;
- int nDebugLevel = 0;
-
- // Set up the output streams to support wide characters
- if (fwide(stdout,1) < 0) {
- printf("Unable to set stdout to wide characters\n");
- }
-
- // create environment and start a command-line controlled simulation
- penv = CreateEnvironment();
- if( penv == NULL )
+ if( !masternode.check_master() )
return -1;
- // parse command line arguments
- int i = 1;
- while(i < argc) {
- if( stricmp(argv[i], "-loadplugin") == 0 ) {
- penv->LoadPlugin(argv[i+1]);
- i += 2;
- }
- else if( stricmp(argv[i], "-gui") == 0 ) {
- bDisplayGUI = true;
- i++;
- }
- else if( stricmp(argv[i], "-d") == 0 ) {
- nDebugLevel = atoi(argv[i+1]);
- i += 2;
- }
- else if( stricmp(argv[i], "-server") == 0 ) {
- nServPort = atoi(argv[i+1]);
- i += 2;
- }
- else {
- RAVEPRINT(L"Error in input parameters at %s\ntype --help to see a list of command line options\n", argv[i]);
- return 0;
- }
- }
-
- // add a signal handler
- signal(SIGINT,sigint_handler); // control C
-
- penv->SetDebugLevel(nDebugLevel);
-
- if( nServPort > 0 ) {
- //penv->AttachServer(s_server.get());
- }
-
- bThreadDestroyed = false;
- if( pthread_create(&s_mainThread, NULL, MainOpenRAVEThread, NULL) ) {
- RAVEPRINT(L"failed to create main openrave thread\n");
- }
-
- while(!bThreadDestroyed) {
-#ifdef _WIN32
- Sleep(100);
-#else
- usleep(100000);
- //pthread_yield();
-#endif
- }
-
- if( penv != NULL ) {
- penv->GetViewer()->quitmainloop();
- penv->AttachViewer(NULL);
-
- RAVEPRINT(L"deleting the environment\n");
- delete penv; penv = NULL;
- }
-
- return 0;
-}
-
-// use to control openrave
-void* MainOpenRAVEThread(void*p)
-{
- penv->GetViewer()->main();
-
- if( !bThreadDestroyed ) {
- penv->GetViewer()->quitmainloop();
- penv->AttachViewer(NULL);
- //s_viewer.reset();
-
- if( penv != NULL ) {
- delete penv; penv = NULL;
- }
-
- bThreadDestroyed = true;
- }
+ boost::shared_ptr<SessionServer> sessionserver(new SessionServer());
+ masternode.spin();
- return NULL;
+ sessionserver.reset();
+ ros::fini();
}
-
-void sigint_handler(int)
-{
-
- if( !bThreadDestroyed ) {
-#ifndef _WIN32
- pthread_kill(s_mainThread, SIGINT);
-#else
- pthread_kill(s_mainThread, 0);
-#endif
- bThreadDestroyed = true;
- }
-
-}
Modified: pkg/trunk/openrave_planning/openraveros/src/openraveros.h
===================================================================
--- pkg/trunk/openrave_planning/openraveros/src/openraveros.h 2008-11-28 08:10:49 UTC (rev 7399)
+++ pkg/trunk/openrave_planning/openraveros/src/openraveros.h 2008-11-28 11:04:51 UTC (rev 7400)
@@ -72,14 +72,55 @@
#define stricmp strcasecmp
#endif
-#include <boost/shared_ptr.hpp>
-
#include <openrave-core.h>
#include <ros/node.h>
-#include <rosthread/member_thread.h>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/bind.hpp>
+
+// services
+#include <openraveros/body_destroy.h>
+#include <openraveros/body_enable.h>
+#include <openraveros/body_getaabb.h>
+#include <openraveros/body_getaabbs.h>
+#include <openraveros/body_getdof.h>
+#include <openraveros/body_getlinks.h>
+#include <openraveros/body_setjointvalues.h>
+#include <openraveros/body_settransform.h>
+#include <openraveros/env_checkcollision.h>
+#include <openraveros/env_closefigures.h>
+#include <openraveros/env_createbody.h>
+#include <openraveros/env_createplanner.h>
+#include <openraveros/env_createproblem.h>
+#include <openraveros/env_createrobot.h>
+#include <openraveros/env_destroyproblem.h>
+#include <openraveros/env_getbodies.h>
+#include <openraveros/env_getbody.h>
+#include <openraveros/env_getrobots.h>
+#include <openraveros/env_loadplugin.h>
+#include <openraveros/env_loadscene.h>
+#include <openraveros/env_plot.h>
+#include <openraveros/env_raycollision.h>
+#include <openraveros/env_set.h>
+#include <openraveros/env_triangulate.h>
+#include <openraveros/env_wait.h>
+#include <openraveros/planner_init.h>
+#include <openraveros/planner_plan.h>
+#include <openraveros/problem_sendcommand.h>
+#include <openraveros/robot_controllersend.h>
+#include <openraveros/robot_controllerset.h>
+#include <openraveros/robot_getactivedof.h>
+#include <openraveros/robot_getactivevalues.h>
+#include <openraveros/robot_sensorgetdata.h>
+#include <openraveros/robot_sensorsend.h>
+#include <openraveros/robot_setactivedofs.h>
+#include <openraveros/robot_setactivevalues.h>
+#include <openraveros/robot_starttrajectory.h>
+
using namespace OpenRAVE;
-using namespace ros;
using namespace std;
+using namespace openraveros;
#endif
Added: pkg/trunk/openrave_planning/openraveros/src/rosserver.h
===================================================================
--- pkg/trunk/openrave_planning/openraveros/src/rosserver.h (rev 0)
+++ pkg/trunk/openrave_planning/openraveros/src/rosserver.h 2008-11-28 11:04:51 UTC (rev 7400)
@@ -0,0 +1,208 @@
+// Software License Agreement (BSD License)
+// Copyright (c) 2008, Willow Garage, Inc.
+// 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.
+// * The name of the author may not 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: Rosen Diankov
+
+#include "openraveros.h"
+
+class ROSServer : public RaveServerBase
+{
+public:
+ ROSServer(boost::shared_ptr<EnvironmentBase> penv) : RaveServerBase(penv.get()), _nNextFigureId(1), _nNextPlannerId(1) {
+ _penv = penv;
+ _bThreadDestroyed = false;
+ _fSimulationTimestep = 0.01;
+ _vgravity = Vector(0,0,-9.8f);
+ }
+ virtual ~ROSServer() {
+ Destroy();
+ }
+
+ virtual void Destroy()
+ {
+ Reset();
+
+ _penv->SetCollisionChecker(NULL);
+ _penv->SetPhysicsEngine(NULL);
+ _penv->AttachViewer(NULL);
+
+ // have to maintain a certain destruction order
+ _pphysics.reset();
+ _pcolchecker.reset();
+
+ if( !!_pviewer ) {
+ _pviewer->quitmainloop();
+ _threadviewer.join();
+ _pviewer.reset();
+ }
+ }
+
+ virtual void Reset()
+ {
+
+// pthread_mutex_lock(&_mutexWorker);
+// listWorkers.clear();
+// pthread_mutex_unlock(&_mutexWorker);
+// pthread_cond_signal(&_condWorker);
+//
+// FOREACH(it, s_mapFigureIds)
+// g_Environ.closegraph(it->second);
+// s_mapFigureIds.clear();
+
+ // destroy environment specific state: problems, planners, figures
+ _mapplanners.clear();
+ _mapproblems.clear();
+ }
+
+ virtual bool Init(int port)
+ {
+ return true;
+ }
+
+ /// worker thread called from the main environment thread
+ virtual void Worker()
+ {
+ }
+
+ virtual bool IsInit()
+ {
+ return true;
+ }
+
+ virtual bool IsClosing()
+ {
+ return false;
+ }
+
+ // called from threads other than the main worker to wait until
+ virtual void SyncWithWorkerThread()
+ {
+ }
+
+ bool body_destroy_srv(body_destroy::request& req, body_destroy::response& res);
+ bool body_enable_srv(body_enable::request& req, body_enable::response& res);
+ bool body_getaabb_srv(body_getaabb::request& req, body_getaabb::response& res);
+ bool body_getaabbs_srv(body_getaabbs::request& req, body_getaabbs::response& res);
+ bool body_getdof_srv(body_getdof::request& req, body_getdof::response& res);
+ bool body_getlinks_srv(body_getlinks::request& req, body_getlinks::response& res);
+ bool body_setjointvalues_srv(body_setjointvalues::request& req, body_setjointvalues::response& res);
+ bool body_settransform_srv(body_settransform::request& req, body_settransform::response& res);
+ bool env_checkcollision_srv(env_checkcollision::request& req, env_checkcollision::response& res);
+ bool env_closefigures_srv(env_closefigures::request& req, env_closefigures::response& res);
+ bool env_createbody_srv(env_createbody::request& req, env_createbody::response& res);
+ bool env_createplanner_srv(env_createplanner::request& req, env_createplanner::response& res);
+ bool env_createproblem_srv(env_createproblem::request& req, env_createproblem::response& res);
+ bool env_createrobot_srv(env_createrobot::request& req, env_createrobot::response& res);
+ bool env_destroyproblem_srv(env_destroyproblem::request& req, env_destroyproblem::response& res);
+ bool env_getbodies_srv(env_getbodies::request& req, env_getbodies::response& res);
+ bool env_getbody_srv(env_getbody::request& req, env_getbody::response& res);
+ bool env_getrobots_srv(env_getrobots::request& req, env_getrobots::response& res);
+ bool env_loadplugin_srv(env_loadplugin::request& req, env_loadplugin::response& res);
+ bool env_loadscene_srv(env_loadscene::request& req, env_loadscene::response& res);
+ bool env_plot_srv(env_plot::request& req, env_plot::response& res);
+ bool env_raycollision_srv(env_raycollision::request& req, env_raycollision::response& res);
+ bool env_set_srv(env_set::request& req, env_set::response& res)
+ {
+ if( req.setmask & env_set::request::Set_Simulation ) {
+ switch(req.sim_action) {
+ case env_set::request::SimAction_Start:
+ _penv->StartSimulation(_fSimulationTimestep);
+ break;
+ case env_set::request::SimAction_Stop:
+ _penv->StopSimulation();
+ break;
+ case env_set::request::SimAction_Timestep:
+ _fSimulationTimestep = req.sim_timestep;
+ _penv->StartSimulation(_fSimulationTimestep);
+ break;
+ }
+ }
+ if( req.setmask & env_set::request::Set_PhysicsEngine ) {
+ _pphysics.reset(_penv->CreatePhysicsEngine(req.physicsengine.c_str()));
+ _penv->SetPhysicsEngine(_pphysics.get());
+ if( !!_pphysics )
+ _pphysics->SetGravity(_vgravity);
+ }
+ if( req.setmask & env_set::request::Set_CollisionChecker ) {
+ int options = _penv->GetCollisionOptions();
+ _pcolchecker.reset(_penv->CreateCollisionChecker(req.collisionchecker.c_str()));
+ _penv->SetCollisionChecker(_pcolchecker.get());
+ _penv->SetCollisionOptions(options);
+ }
+ if( req.setmask & env_set::request::Set_Gravity ) {
+ _vgravity = Vector(req.gravity[0],req.gravity[1],req.gravity[2]);
+ if( !!_pphysics )
+ _pphysics->SetGravity(_vgravity);
+ }
+ if( req.setmask & env_set::request::Set_PublishAnytime ) {
+ _penv->SetPublishBodiesAnytime(req.publishanytime>0);
+ }
+ if( req.setmask & env_set::request::Set_DebugLevel ) {
+ _penv->SetDebugLevel(req.debuglevel);
+ }
+ if( req.setmask & env_set::request::Set_Viewer ) {
+ if( !!_pviewer ) {
+ _pviewer->quitmainloop();
+ // no need to wait for joins
+ //_threadviewer.join();
+ }
+
+ _pviewer.reset(_penv->CreateViewer(req.viewer.c_str()));
+ _penv->AttachViewer(_pviewer.get());
+ if( !!_pviewer )
+ _threadviewer = boost::thread(boost::bind(&RaveViewerBase::main, _pviewer.get()));
+ }
+
+ return true;
+ }
+
+ bool env_triangulate_srv(env_triangulate::request& req, env_triangulate::response& res);
+ bool env_wait_srv(env_wait::request& req, env_wait::response& res);
+ bool planner_init_srv(planner_init::request& req, planner_init::response& res);
+ bool planner_plan_srv(planner_plan::request& req, planner_plan::response& res);
+ bool problem_sendcommand_srv(problem_sendcommand::request& req, problem_sendcommand::response& res);
+ bool robot_controllersend_srv(robot_controllersend::request& req, robot_controllersend::response& res);
+ bool robot_controllerset_srv(robot_controllerset::request& req, robot_controllerset::response& res);
+ bool robot_getactivedof_srv(robot_getactivedof::request& req, robot_getactivedof::response& res);
+ bool robot_getactivevalues_srv(robot_getactivevalues::request& req, robot_getactivevalues::response& res);
+ bool robot_sensorgetdata_srv(robot_sensorgetdata::request& req, robot_sensorgetdata::response& res);
+ bool robot_sensorsend_srv(robot_sensorsend::request& req, robot_sensorsend::response& res);
+ bool robot_setactivedofs_srv(robot_setactivedofs::request& req, robot_setactivedofs::response& res);
+ bool robot_setactivevalues_srv(robot_setactivevalues::request& req, robot_setactivevalues::response& res);
+ bool robot_starttrajectory_srv(robot_starttrajectory::request& req, robot_starttrajectory::response& res);
+
+private:
+ boost::shared_ptr<EnvironmentBase> _penv; ///< the environment this instance of this session
+ boost::shared_ptr<PhysicsEngineBase> _pphysics;
+ boost::shared_ptr<CollisionCheckerBase> _pcolchecker;
+ boost::shared_ptr<RaveViewerBase> _pviewer;
+ map<int, boost::shared_ptr<PlannerBase> > _mapplanners;
+ map<int, boost::shared_ptr<ProblemInstance> > _mapproblems;
+ map<int, void*> _mapFigureIds;
+ int _nNextFigureId, _nNextPlannerId;
+ boost::thread _threadviewer;
+ bool _bThreadDestroyed;
+ float _fSimulationTimestep;
+ Vector _vgravity;
+};
Deleted: pkg/trunk/openrave_planning/openraveros/src/session.cpp
===================================================================
--- pkg/trunk/openrave_planning/openraveros/src/session.cpp 2008-11-28 08:10:49 UTC (rev 7399)
+++ pkg/trunk/openrave_planning/openraveros/src/session.cpp 2008-11-28 11:04:51 UTC (rev 7400)
@@ -1,126 +0,0 @@
-// Software License Agreement (BSD License)
-// Copyright (c) 2008, Willow Garage, Inc.
-// 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.
-// * The name of the author may not 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: Rosen Diankov
-
-#include "openraveros.h"
-#include "session.h"
-
-// compile time assert RobotBase::DOF_X and CO_X
-class Session
-{
-public:
- Session() {
- }
- ~Session() {
- }
-
- void startros()
- {
- // check if thread launched
- ros::node* pnode = ros::node::instance();
-
- if( pnode && !pnode->check_master() ) {
- ros::fini();
- delete pnode;
- pnode = NULL;
- }
-
- if (!pnode) {
- int argc = 0;
- ros::init(argc,NULL);
- char strname[256] = "nohost";
- gethostname(strname, sizeof(strname));
- pnode = new ros::node(strname,);
- member_thread::startMemberFunctionThread<node>(pnode, &ros::node::spin);
- }
-
- if( !pnode->check_master() )
- return NULL;
-
- return pnode;
- }
-
- void advertise_session()
- {
- ros::node* pnode = startros();
- if( pnode == NULL )
- return;
-
- sessionhandle = pnode->advertise_service("openrave_session",&OpenraveSession::startsession,this);
- }
-
- bool startsession(roscpp_tutorials::simple_session::request& req, roscpp_tutorials::simple_session::response& res) {
- if( req.sessionid ) {
- }
- }
-
- bool getmap(StaticMap::request& req, StaticMap::response& res)
- {
- cout << "getmap!" << endl;
- return true;
- }
- bool getimage(PolledImage::request& req, PolledImage::response& res)
- {
- cout << "getimage!" << endl;
- return true;
- }
-};
-
-
-ROSServer::ROSServer()
-{
-}
-
-ROSServer::~ROSServer()
-{
-}
-
-void ROSServer::Destroy()
-{
-}
-
-void ROSServer::Reset()
-{
-}
-
-bool ROSServer::Init(int port)
-{
-}
-
-void ROSServer::Worker()
-{
-}
-
-bool ROSServer::IsInit()
-{
-}
-
-bool ROSServer::IsClosing()
-{
-}
-
-void ROSServer::SyncWithWorkerThread()
-{
-]
Modified: pkg/trunk/openrave_planning/openraveros/src/session.h
===================================================================
--- pkg/trunk/openrave_planning/openraveros/src/session.h 2008-11-28 08:10:49 UTC (rev 7399)
+++ pkg/trunk/openrave_planning/openraveros/src/session.h 2008-11-28 11:04:51 UTC (rev 7400)
@@ -24,103 +24,274 @@
//
// author: Rosen Diankov
+#include "openraveros.h"
+#include "rosserver.h"
+
#include <openraveros/openrave_session.h>
-#include <openraveros/body_destroy.h>
-#include <openraveros/body_enable.h>
-#include <openraveros/body_getaabb.h>
-#include <openraveros/body_getaabbs.h>
-#include <openraveros/body_getdof.h>
-#include <openraveros/body_getlinks.h>
-#include <openraveros/body_setjointvalues.h>
-#include <openraveros/body_settransform.h>
-#include <openraveros/env_checkcollision.h>
-#include <openraveros/env_closefigures.h>
-#include <openraveros/env_createbody.h>
-#include <openraveros/env_createplanner.h>
-#include <openraveros/env_createproblem.h>
-#include <openraveros/env_createrobot.h>
-#include <openraveros/env_destroyproblem.h>
-#include <openraveros/env_getbodies.h>
-#include <openraveros/env_getbody.h>
-#include <openraveros/env_getrobots.h>
-#include <openraveros/env_loadplugin.h>
-#include <openraveros/env_loadscene.h>
-#include <openraveros/env_plot.h>
-#include <openraveros/env_raycollision.h>
-#include <openraveros/env_set.h>
-#include <openraveros/env_triangulate.h>
-#include <openraveros/env_wait.h>
-#include <openraveros/planner_init.h>
-#include <openraveros/planner_plan.h>
-#include <openraveros/problem_sendcommand.h>
-#include <openraveros/robot_controllersend.h>
-#include <openraveros/robot_controllerset.h>
-#include <openraveros/robot_getactivedof.h>
-#include <openraveros/robot_getactivevalues.h>
-#include <openraveros/robot_sensorgetdata.h>
-#include <openraveros/robot_sensorsend.h>
-#include <openraveros/robot_setactivedofs.h>
-#include <openraveros/robot_setactivevalues.h>
-using namespace openraveros;
+using namespace ros;
-class ROSServer : public RaveServerBase
+#define REFLECT_SERVICE(srvname) \
+ bool srvname##_srv(srvname::request& req, srvname::response& res) \
+ { \
+ SessionState state = getstate(req.sessionid); \
+ if( !state._pserver ) \
+ return false; \
+ state._pserver->srvname##_srv(req,res); \
+ }
+
+class SessionServer
{
+ class SessionState
+ {
+ public:
+ virtual ~SessionState() {
+ _penv.reset();
+ _pserver.reset();
+ }
+
+ boost::shared_ptr<ROSServer> _pserver;
+ boost::shared_ptr<EnvironmentBase> _penv;
+ };
+
public:
- ROSServer();
- virtual ~ROSServer();
+ SessionServer() {
+ }
+ virtual ~SessionServer() {
+ Destroy();
+ }
- virtual void Destroy();
- virtual void Reset();
+ bool Init() {
+ node* pnode = node::instance();
+ if( pnode == NULL )
+ return false;
- virtual bool Init(int port);
+ if( !pnode->advertise_service("openrave_session",&SessionServer::session_callback,this) )
+ return false;
- /// worker thread called from the main environment thread
- virtual void Worker();
+ // advertise persistent services
+ if( !pnode->advertise_service("body_destroy",&SessionServer::body_destroy_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("body_enable",&SessionServer::body_enable_srv,this,1,true) )
+ return false;
- virtual bool IsInit();
- virtual bool IsClosing();
+ if( !pnode->advertise_service("body_getaabb",&SessionServer::body_getaabb_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("body_getaabbs",&SessionServer::body_getaabbs_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("body_getdof",&SessionServer::body_getdof_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("body_getlinks",&SessionServer::body_getlinks_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("body_setjointvalues",&SessionServer::body_setjointvalues_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("body_settransform",&SessionServer::body_settransform_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_checkcollision",&SessionServer::env_checkcollision_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_closefigures",&SessionServer::env_closefigures_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_createbody",&SessionServer::env_createbody_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_createplanner",&SessionServer::env_createplanner_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_createproblem",&SessionServer::env_createproblem_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_createrobot",&SessionServer::env_createrobot_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_destroyproblem",&SessionServer::env_destroyproblem_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_getbodies",&SessionServer::env_getbodies_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_getbody",&SessionServer::env_getbody_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_getrobots",&SessionServer::env_getrobots_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_loadplugin",&SessionServer::env_loadplugin_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_loadscene",&SessionServer::env_loadscene_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_plot",&SessionServer::env_plot_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_raycollision",&SessionServer::env_raycollision_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_set",&SessionServer::env_set_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_triangulate",&SessionServer::env_triangulate_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("env_wait",&SessionServer::env_wait_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("planner_init",&SessionServer::planner_init_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("planner_plan",&SessionServer::planner_plan_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("problem_sendcommand",&SessionServer::problem_sendcommand_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("robot_controllersend",&SessionServer::robot_controllersend_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("robot_controllerset",&SessionServer::robot_controllerset_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("robot_getactivedof",&SessionServer::robot_getactivedof_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("robot_getactivevalues",&SessionServer::robot_getactivevalues_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("robot_sensorgetdata",&SessionServer::robot_sensorgetdata_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("robot_sensorsend",&SessionServer::robot_sensorsend_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("robot_setactivedofs",&SessionServer::robot_setactivedofs_srv,this,1,true) )
+ return false;
+ if( !pnode->advertise_service("robot_setactivevalues",&SessionServer::robot_setactivevalues_srv,this,1,true) )
+ return false;
- // called from ...
[truncated message content] |
|
From: <tf...@us...> - 2008-12-01 19:24:32
|
Revision: 7413
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7413&view=rev
Author: tfoote
Date: 2008-12-01 19:24:24 +0000 (Mon, 01 Dec 2008)
Log Message:
-----------
deduplicating dependency
changing angles review status
changing 3rd party packages to review status 3rdparty
cleaning out unnecessary dependencies and switching rosout to rosconsole
adding first cut at test
fixing 4.3 compile
Modified Paths:
--------------
pkg/trunk/3rdparty/Cg/manifest.xml
pkg/trunk/3rdparty/bfl_latest/manifest.xml
pkg/trunk/3rdparty/bullet/manifest.xml
pkg/trunk/3rdparty/eml/manifest.xml
pkg/trunk/3rdparty/estar/manifest.xml
pkg/trunk/3rdparty/fast_detector/manifest.xml
pkg/trunk/3rdparty/ffmpeg/manifest.xml
pkg/trunk/3rdparty/freeimage/manifest.xml
pkg/trunk/3rdparty/gazebo/manifest.xml
pkg/trunk/3rdparty/glc/manifest.xml
pkg/trunk/3rdparty/gmapping/manifest.xml
pkg/trunk/3rdparty/kdl/manifest.xml
pkg/trunk/3rdparty/kni-3.9.2/manifest.xml
pkg/trunk/3rdparty/libbk_maxflow/manifest.xml
pkg/trunk/3rdparty/libdc1394v2/manifest.xml
pkg/trunk/3rdparty/libfz_ht_superpixels/manifest.xml
pkg/trunk/3rdparty/loki/manifest.xml
pkg/trunk/3rdparty/newmat10/manifest.xml
pkg/trunk/3rdparty/ogre/manifest.xml
pkg/trunk/3rdparty/opencv/manifest.xml
pkg/trunk/3rdparty/opencv_latest/manifest.xml
pkg/trunk/3rdparty/opende/manifest.xml
pkg/trunk/3rdparty/openrave/manifest.xml
pkg/trunk/3rdparty/player/manifest.xml
pkg/trunk/3rdparty/plplot/manifest.xml
pkg/trunk/3rdparty/rtnet/manifest.xml
pkg/trunk/3rdparty/scipy/manifest.xml
pkg/trunk/3rdparty/sicktoolbox/manifest.xml
pkg/trunk/3rdparty/soqt/manifest.xml
pkg/trunk/3rdparty/spacenav/manifest.xml
pkg/trunk/3rdparty/stage/manifest.xml
pkg/trunk/3rdparty/svl-1.0/manifest.xml
pkg/trunk/3rdparty/transformations/manifest.xml
pkg/trunk/3rdparty/trex/manifest.xml
pkg/trunk/3rdparty/velodyne-driver/manifest.xml
pkg/trunk/3rdparty/vop/manifest.xml
pkg/trunk/3rdparty/wxPython_swig_interface/manifest.xml
pkg/trunk/3rdparty/wxmpl/manifest.xml
pkg/trunk/3rdparty/wxpropgrid/manifest.xml
pkg/trunk/3rdparty/wxswig/manifest.xml
pkg/trunk/3rdparty/xenomai/manifest.xml
pkg/trunk/calibration/kinematic_calibration/manifest.xml
pkg/trunk/util/angles/manifest.xml
pkg/trunk/util/trajectory/include/trajectory/trajectory.h
pkg/trunk/util/trajectory/manifest.xml
pkg/trunk/vision/spacetime_stereo/manifest.xml
Added Paths:
-----------
pkg/trunk/hardware_test/runtime_monitor/scripts/test_high_level
Property Changed:
----------------
pkg/trunk/
Property changes on: pkg/trunk
___________________________________________________________________
Modified: svk:merge
- 920d6130-5740-4ec1-bb1a-45963d5fd813:/frameidpr:7015
920d6130-5740-4ec1-bb1a-45963d5fd813:/users/josh-pr:11755
920d6130-5740-4ec1-bb1a-45963d5fd813:/wgpkgtrunk:5865
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/josh:6549
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/rosbus:261
+ 637b03a7-42c1-4bbd-8d43-e365e379942c:/rosTF_to_tf:9746
920d6130-5740-4ec1-bb1a-45963d5fd813:/frameidpr:7015
920d6130-5740-4ec1-bb1a-45963d5fd813:/users/josh-pr:11755
920d6130-5740-4ec1-bb1a-45963d5fd813:/wgpkgtrunk:5865
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/josh:6549
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/rosbus:261
Modified: pkg/trunk/3rdparty/Cg/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/Cg/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/Cg/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -7,7 +7,7 @@
</description>
<author>See web page for a full credits llist.</author>
<license url="http://developer.nvidia.com/object/legal_info.html">NVIDIA</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://developer.nvidia.com/page/cg_main.html</url>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/Cg/lib -L${prefix}/Cg/lib -lCg" cflags="-I${prefix}/Cg/include"/>
Modified: pkg/trunk/3rdparty/bfl_latest/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/bfl_latest/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/bfl_latest/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -10,7 +10,7 @@
</description>
<author> Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.</author>
<license>LGPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://www.orocos.org/bfl</url>
<export>
<cpp cflags="-I${prefix}/bfl-boost/include/bfl" lflags="-Wl,-rpath,${prefix}/bfl-boost/lib -L${prefix}/bfl-boost/lib -lorocos-bfl"/>
Modified: pkg/trunk/3rdparty/bullet/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/bullet/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/bullet/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -6,7 +6,7 @@
</description>
<author>Erwin Coumans</author>
<license>ZLib</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://code.google.com/p/bullet/</url>
<sysdepend os="ubuntu" version="8.04-hardy" package="libXext-dev"/>
<sysdepend os="ubuntu" version="7.10-gutsy" package="libXext-dev"/>
Modified: pkg/trunk/3rdparty/eml/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/eml/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/eml/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -7,7 +7,7 @@
</description>
<author>Tom Panis</author>
<license>GPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://ethercatmaster.berlios.de/</url>
<depend package="rtnet"/>
<export>
Modified: pkg/trunk/3rdparty/estar/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/estar/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/estar/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -9,7 +9,7 @@
</description>
<author>Roland Philippsen</author>
<license>GPL</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<url>http://estar.sourceforge.net/</url>
<export>
<cpp cflags="-I${prefix}/local/include" lflags="-Wl,-rpath,${prefix}/local/lib -L${prefix}/local/lib -lestar" />
Modified: pkg/trunk/3rdparty/fast_detector/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/fast_detector/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/fast_detector/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -4,6 +4,6 @@
</description>
<author>Edward Rosten and Tom Drummond</author>
<license>LGPL</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
</package>
Modified: pkg/trunk/3rdparty/ffmpeg/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/ffmpeg/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/ffmpeg/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -8,7 +8,7 @@
</description>
<author>Many; see the web page.</author>
<license>LGPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://ffmpeg.mplayerhq.hu</url>
<export>
<cpp cflags="-I${prefix}/ffmpeg/include" lflags="-L${prefix}/ffmpeg/lib -Wl,-rpath,${prefix}/ffmpeg/lib -lavcodec -lavdevice -lavformat -lavutil" />
Modified: pkg/trunk/3rdparty/freeimage/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/freeimage/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/freeimage/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -8,7 +8,7 @@
</description>
<author>Hervé Drolon , Floris van den Berg</author>
<license>GPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://freeimage.sourceforge.net</url>
<export>
<cpp cflags="-I${prefix}/freeimage/include" lflags="-Wl,-rpath,${prefix}/freeimage/lib -L${prefix}/freeimage/lib -lfreeimage"/>
Modified: pkg/trunk/3rdparty/gazebo/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/gazebo/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/gazebo/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -5,7 +5,7 @@
</description>
<author>Nate Koenig, with contributions from many others. See web page for a full credits llist.</author>
<license>LGPL</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<depend package="opende" />
<depend package="ogre" />
<url>http://playerstage.sf.net</url>
Modified: pkg/trunk/3rdparty/glc/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/glc/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/glc/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -4,7 +4,7 @@
</description>
<author>Pyry Haulos</author>
<license url="http://nullkey.ath.cx/projects/glc/wiki/HowtoPackaging">zlib, GPL, CDDL</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<url>http://nullkey.ath.cx/projects/glc/</url>
<sysdepend os="ubuntu" version="8.04-hardy" package="libasound2-dev"/>
</package>
Modified: pkg/trunk/3rdparty/gmapping/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/gmapping/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/gmapping/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -8,7 +8,7 @@
</description>
<author>Giorgio Grisetti, Cyrill Stachniss, Wolfram Burgard</author>
<license>CreativeCommons-by-nc-sa-2.0</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://openslam.org/</url>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lgridfastslam -lsensor_odometry -lsensor_range -lutils -lscanmatcher" cflags="-I${prefix}/include -I${prefix}/include/gmapping"/>
Modified: pkg/trunk/3rdparty/kdl/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/kdl/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/kdl/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -3,7 +3,7 @@
</description>
<author>Advait Jain, Sachin Chitta</author>
<license>BSD</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://pr.willowgarage.net</url>
<export>
<cpp cflags="-I${prefix}/kdl/include" lflags="-Wl,-rpath,${prefix}/kdl/lib -L${prefix}/kdl/lib -lorocos-kdl"/>
Modified: pkg/trunk/3rdparty/kni-3.9.2/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/kni-3.9.2/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/kni-3.9.2/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -2,7 +2,7 @@
<author>Neuronics</author>
<description>Control library and demos for the Katana arm</description>
<license>GPL</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<depend package="boost"/>
<url>http://www.neuronics.ch</url>
<export>
Modified: pkg/trunk/3rdparty/libbk_maxflow/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/libbk_maxflow/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/libbk_maxflow/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -4,8 +4,8 @@
maximum flow/minimum cut of a graph. This is a header-only library.
</description>
<author>Yuri Boykov and Vladimir Kolmogorov</author>
- <license>"Research-only"</license>
- <review status="unreviewed" notes=""/>
+ <license>Research-only</license>
+ <review status="3rdparty" notes=""/>
<url>http://www.cs.adastral.ucl.ac.uk/~vnk/software.html</url>
<export>
<cpp cflags="-I${prefix}/src" lflags=""/>
Modified: pkg/trunk/3rdparty/libdc1394v2/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/libdc1394v2/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/libdc1394v2/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -7,7 +7,7 @@
</description>
<author>Damien Douxchamps</author>
<license>LGPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://damien.douxchamps.net/ieee1394/libdc1394/</url>
<export>
<cpp cflags="-I${prefix}/libdc1394v2/include" lflags="-Wl,-rpath,${prefix}/libdc1394v2/lib -L${prefix}/libdc1394v2/lib/ -ldc1394 -lraw1394" />
Modified: pkg/trunk/3rdparty/libfz_ht_superpixels/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/libfz_ht_superpixels/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/libfz_ht_superpixels/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -5,7 +5,7 @@
</description>
<author>Pedro Felzenszwalb</author>
<license>GPL</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<url>http://people.cs.uchicago.edu/~pff/segment/</url>
<export>
<cpp cflags="-I${prefix}/src"
Modified: pkg/trunk/3rdparty/loki/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/loki/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/loki/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -6,7 +6,7 @@
</description>
<author>Andrei Alexandrescu</author>
<license>MIT</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://loki-lib.sourceforge.net/</url>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/loki-svn/lib -L${prefix}/loki-svn/lib -lloki" cflags="-I${prefix}/loki-svn/include"/>
Modified: pkg/trunk/3rdparty/newmat10/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/newmat10/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/newmat10/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -9,8 +9,8 @@
</description>
<author>Robert Davies</author>
-<license url="http://www.robertnz.net/nm10.htm#use">Zlib-style</license>
-<review status="unreviewed" notes=""/>
+<license url="http://www.robertnz.net/nm10.htm#use">ZLIB</license>
+<review status="3rdparty" notes=""/>
<url>http://www.robertnz.net/nm_intro.htm</url>
<export>
<cpp cflags="-I${prefix}/newmat" lflags="-L${prefix}/newmat/newmat10 -lnewmat" />
Modified: pkg/trunk/3rdparty/ogre/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/ogre/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/ogre/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -6,7 +6,7 @@
</description>
<author> Steve 'sinbad' Streeting, Justin Walsh, Brian Johnstone and more.</author>
<license>LGPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://ogre3d.org</url>
<depend package="freeimage"/>
<depend package="Cg"/>
Modified: pkg/trunk/3rdparty/opencv/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/opencv/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/opencv/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -11,7 +11,7 @@
</description>
<author>Gary Bradski and many others. See web page for a full contributor list. ROS package maintained by Morgan Quigley.</author>
<license>BSD</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://opencvlibrary.sourceforge.net</url>
<depend package="ffmpeg"/>
<export>
Modified: pkg/trunk/3rdparty/opencv_latest/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/opencv_latest/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/opencv_latest/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -9,7 +9,7 @@
</description>
<author>Gary Bradski and many others. See web page for a full contributor list. ROS package maintained by JD Chen.</author>
<license>BSD</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://opencvlibrary.sourceforge.net</url>
<export>
<cpp cflags="-I${prefix}/opencv/include -I${prefix}/opencv/include/opencv" lflags="-L${prefix}/opencv/lib -Wl,-rpath,${prefix}/opencv/lib -lcvaux -lcv -lcxcore -lhighgui -lml"/>
Modified: pkg/trunk/3rdparty/opende/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/opende/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/opende/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -7,7 +7,7 @@
</description>
<author>Russel Smith</author>
<license>LGPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://opende.sf.net</url>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/opende/lib `${prefix}/opende/bin/ode-config --libs`" cflags="`${prefix}/opende/bin/ode-config --cflags`"/>
Modified: pkg/trunk/3rdparty/openrave/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/openrave/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/openrave/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -5,7 +5,7 @@
For successful compilation, remove Qt3 development tools (qt3-dev-tools,libqt3-headers) to prevent conflict with Qt4.
</description>
<license>LGPL</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/lib `${prefix}/bin/openrave-config --libs`" cflags="`${prefix}/bin/openrave-config --cflags`"/>
</export>
Modified: pkg/trunk/3rdparty/player/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/player/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/player/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -10,7 +10,7 @@
</description>
<author>Brian Gerkey, with contributions from many others. See web page for a full credits llist.</author>
<license>LGPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://playerstage.sf.net</url>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/player/lib -L${prefix}/player/lib -lplayercore -lplayerxdr -lplayerutils -lplayererror -lplayerdrivers -Wl,-rpath,${prefix}/build/player-svn/build/rtk2 -L${prefix}/build/player-svn/build/rtk2 -lrtk" cflags="-I${prefix}/player/include/player-2.2"/>
Modified: pkg/trunk/3rdparty/plplot/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/plplot/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/plplot/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -4,7 +4,7 @@
</description>
<author>Maurice J. LeBrun and Geoffrey Furnish</author>
<license>LGPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://plplot.sourceforge.net/index.html</url>
<export>
<cpp lflags="`PKG_CONFIG_PATH=${prefix}/plplot/lib/pkgconfig pkg-config plplotd-c++ --libs`" cflags="`PKG_CONFIG_PATH=${prefix}/plplot/lib/pkgconfig pkg-config plplotd-c++ --cflags`"/>
Modified: pkg/trunk/3rdparty/rtnet/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/rtnet/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/rtnet/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -6,7 +6,7 @@
</description>
<author>See http://www.rts.uni-hannover.de/rtnet/team.html</author>
<license>GPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://www.rtnet.org/</url>
<depend package="xenomai"/>
<export>
Modified: pkg/trunk/3rdparty/scipy/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/scipy/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/scipy/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -8,7 +8,7 @@
<author>The SciPy developers sci...@sc... </author>
<license>BSD</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://www.scipy.org/</url>
<depend package="numpy"/>
<sysdepend os="osx" version="10.5.4" package="g95"/>
Modified: pkg/trunk/3rdparty/sicktoolbox/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/sicktoolbox/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/sicktoolbox/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -6,7 +6,7 @@
</description>
<author>Jason Derenik</author>
<license>BSD</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://sicktoolbox.sourceforge.net</url>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/sicktoolbox/lib -L${prefix}/sicktoolbox/lib -lsicklms-1.0" cflags="-I${prefix}/sicktoolbox/include"/>
Modified: pkg/trunk/3rdparty/soqt/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/soqt/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/soqt/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -4,7 +4,7 @@
</description>
<author>See web page for a full credits llist.</author>
<license url="http://www.coin3d.org/licensing/index_html#free-edition-gpl">GPL</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<url>http://www.coin3d.org/</url>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/lib `${prefix}/bin/soqt-config --ldflags` `${prefix}/bin/soqt-config --libs`" cflags="`${prefix}/bin/soqt-config --cppflags`"/>
Modified: pkg/trunk/3rdparty/spacenav/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/spacenav/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/spacenav/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -6,7 +6,7 @@
</description>
<author>John Tsiombikas</author>
<license>ZLib</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<url>http://spacenav.sourceforge.net/</url>
<export>
<cpp cflags="-I${prefix}/libspnav/include/"
Modified: pkg/trunk/3rdparty/stage/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/stage/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/stage/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -10,7 +10,7 @@
</description>
<author>Richard Vaughan, with contributions from many others. See web page for a full credits list.</author>
<license>GPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://playerstage.sf.net</url>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/stage/lib `PKG_CONFIG_PATH=${prefix}/stage/lib/pkgconfig:$PKG_CONFIG_PATH pkg-config --libs stage`" cflags="`PKG_CONFIG_PATH=${prefix}/stage/lib/pkgconfig:$PKG_CONFIG_PATH pkg-config --cflags stage`"/>
Modified: pkg/trunk/3rdparty/svl-1.0/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/svl-1.0/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/svl-1.0/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -4,7 +4,7 @@
</description>
<author>Stephen Gould, with ROS wrapping by Morgan Quigley</author>
<license>BSD</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<depend package="opencv_latest"/>
<depend package="std_msgs"/>
<depend package="image_utils"/>
Modified: pkg/trunk/3rdparty/transformations/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/transformations/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/transformations/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -6,7 +6,7 @@
</description>
<author>Christoph Gohlke</author>
<license>BSD</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://lfd.uci.edu/~gohlke/code/transformations.py.html</url>
<sysdepend os="ubuntu" version="8.04-hardy" package="python-numpy"/>
<sysdepend os="ubuntu" version="7.10-gutsy" package="python-numpy"/>
Modified: pkg/trunk/3rdparty/trex/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/trex/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/trex/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -10,7 +10,7 @@
</description>
<author>Conor McGann, with contributions from many others. See respective projects.</author>
<license>NOSA</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>https://babelfish.arc.nasa.gov/trac/europa/wiki</url>
<export>
<cpp lflags="-Xlinker -rpath ${prefix}/PLASMA/build/lib -L${prefix}/PLASMA/build/lib"
Modified: pkg/trunk/3rdparty/velodyne-driver/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/velodyne-driver/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/velodyne-driver/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -4,7 +4,7 @@
</description>
<author>Tully Foote</author>
<license>BSD</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://velodyne-driver.sourceforge.net</url>
<export>
<cpp lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/velodyne-driver/lib -lvelodyne-driver" cflags="-I${prefix}/velodyne-driver/include"/>
Modified: pkg/trunk/3rdparty/vop/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/vop/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/vop/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -4,7 +4,7 @@
</description>
<author>James Bowman</author>
<license>BSD</license>
- <review status="unreviewed" notes=""/>
+ <review status="3rdparty" notes=""/>
<export>
</export>
<sysdepend os="ubuntu" version="7.04-fiesty" package="nasm"/>
Modified: pkg/trunk/3rdparty/wxPython_swig_interface/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/wxPython_swig_interface/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/wxPython_swig_interface/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -5,7 +5,7 @@
</description>
<author>Many</author>
<license url="http://www.opensource.org/licenses/wxwindows.php">wxWidgets</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://www.wxpython.org/</url>
<export>
<swig flags="-I${prefix}/src"/>
Modified: pkg/trunk/3rdparty/wxmpl/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/wxmpl/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/wxmpl/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -10,7 +10,7 @@
</description>
<author>Ken McIvor</author>
<license>MIT</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://agni.phys.iit.edu/~kmcivor/wxmpl/</url>
<export>
<doxymaker external="http://agni.phys.iit.edu/~kmcivor/wxmpl/documentation/reference/" />
Modified: pkg/trunk/3rdparty/wxpropgrid/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/wxpropgrid/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/wxpropgrid/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -4,7 +4,7 @@
</description>
<author>Jaakko Salli</author>
<license url="http://www.opensource.org/licenses/wxwindows.php">wxWindows</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://wxpropgrid.sourceforge.net</url>
<export>
<cpp lflags="-L${prefix}/propgrid_install/lib -lwxcode_gtk2u_propgrid-2.8" cflags="-I${prefix}/propgrid_install/include -D__NOTWXPYTHON__"/>
Modified: pkg/trunk/3rdparty/wxswig/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/wxswig/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/wxswig/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -8,7 +8,7 @@
</description>
<author>Many</author>
<license url="http://swig.sourceforge.net/copyright.html">SWIG</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://swig.sourceforge.net</url>
<export>
<cpp cflags="-DSWIG_TYPE_TABLE=_wxPython_table -DWXP_USE_THREAD=1 `python-config --includes`" lflags="`python-config --ldflags`" />
Modified: pkg/trunk/3rdparty/xenomai/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/xenomai/manifest.xml 2008-12-01 17:26:08 UTC (rev 7412)
+++ pkg/trunk/3rdparty/xenomai/manifest.xml 2008-12-01 19:24:24 UTC (rev 7413)
@@ -9,7 +9,7 @@
</description>
<author>Xenomai - Philippe Gerum et al, Linux - Linus Torvaalds et al</author>
<license>Xenomai: LGPL, Linux: GPL</license>
-<review status="unreviewed" notes=""/>
+<review status="3rdparty" notes=""/>
<url>http://www.xenomai.org/ http://www.kernel.org</url>
<export>
<cpp lflags="`${prefix}/xenomai/bin/xeno-config --posix-ldflags`" cflags="`${prefix}/xenomai/bin/xeno-config --posix-cflags`"/>
Modified: pkg/trunk/calibration/kinematic_calibration/manifest.xml
=============================...
[truncated message content] |
|
From: <hsu...@us...> - 2008-12-01 21:43:24
|
Revision: 7426
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7426&view=rev
Author: hsujohnhsu
Date: 2008-12-01 21:43:20 +0000 (Mon, 01 Dec 2008)
Log Message:
-----------
updates to multilink.
Modified Paths:
--------------
pkg/trunk/demos/2dnav_gazebo/manifest.xml
pkg/trunk/demos/examples_gazebo/multi_link.xml
pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/controllers_multi_link.xml
pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/multi_link.xml
Modified: pkg/trunk/demos/2dnav_gazebo/manifest.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/manifest.xml 2008-12-01 21:35:37 UTC (rev 7425)
+++ pkg/trunk/demos/2dnav_gazebo/manifest.xml 2008-12-01 21:43:20 UTC (rev 7426)
@@ -17,4 +17,5 @@
<depend package="pr2_gui"/>
<depend package="world_3d_map"/>
<depend package="highlevel_controllers"/>
+ <depend package="executive_trex_pr2"/>
</package>
Modified: pkg/trunk/demos/examples_gazebo/multi_link.xml
===================================================================
--- pkg/trunk/demos/examples_gazebo/multi_link.xml 2008-12-01 21:35:37 UTC (rev 7425)
+++ pkg/trunk/demos/examples_gazebo/multi_link.xml 2008-12-01 21:43:20 UTC (rev 7426)
@@ -14,7 +14,7 @@
<!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
<node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
- <!--node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/multi_link_test/controllers_multi_link.xml" respawn="false" output="screen" /--> <!-- load default arm controller -->
+ <node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/multi_link_test/controllers_multi_link.xml" respawn="false" output="screen" /> <!-- load default arm controller -->
<!--node pkg="robot_mechanism_controllers" type="control.py" args="set test_controller 0.5" respawn="false" output="screen" /--> <!-- open gripper .5 radians -->
</launch>
Modified: pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/controllers_multi_link.xml
===================================================================
--- pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/controllers_multi_link.xml 2008-12-01 21:35:37 UTC (rev 7425)
+++ pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/controllers_multi_link.xml 2008-12-01 21:43:20 UTC (rev 7426)
@@ -13,17 +13,17 @@
</map>
<controller name="link1_controller" topic="link1_controller" type="JointEffortController">
<joint name="link1_joint" >
- <pid p="100" d="2" i="0.1" iClamp="20" />
+ <pid p="500" d="2" i="0.1" iClamp="20" />
</joint>
</controller>
<controller name="link2_controller" topic="link2_controller" type="JointEffortController">
<joint name="link2_joint" >
- <pid p="100" d="2" i="0.1" iClamp="20" />
+ <pid p="300" d="2" i="0.1" iClamp="20" />
</joint>
</controller>
<controller name="link3_controller" topic="link3_controller" type="JointEffortController">
<joint name="link3_joint" >
- <pid p="100" d="2" i="0.1" iClamp="20" />
+ <pid p="200" d="2" i="0.1" iClamp="20" />
</joint>
</controller>
<controller name="link4_controller" topic="link4_controller" type="JointEffortController">
Modified: pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/multi_link.xml
===================================================================
--- pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/multi_link.xml 2008-12-01 21:35:37 UTC (rev 7425)
+++ pkg/trunk/robot_descriptions/wg_robot_description/multi_link_test/multi_link.xml 2008-12-01 21:43:20 UTC (rev 7426)
@@ -23,7 +23,7 @@
<anchor xyz="0 0 0" />
<limit k_position="10.0" k_velocity="10.0" min="-3.14159" max="3.14159" effort="10000" velocity="5" />
<calibration values="1.5 -1 " />
- <joint_properties damping="100.0" />
+ <joint_properties damping="200.0" />
</joint>
<!-- joint blocks -->
@@ -32,7 +32,7 @@
<anchor xyz="0.0 0 0" />
<limit k_position="10.0" k_velocity="10.0" min="-3.14159" max="3.14159" effort="10000" velocity="5" />
<calibration values="1.5 -1 " />
- <joint_properties damping="10.0" />
+ <joint_properties damping="100.0" />
</joint>
<!-- joint blocks -->
@@ -41,7 +41,7 @@
<anchor xyz="0.0 0 0" />
<limit k_position="10.0" k_velocity="10.0" min="-3.14159" max="3.14159" effort="5000" velocity="5" />
<calibration values="1.5 -1 " />
- <joint_properties damping="10.0" />
+ <joint_properties damping="100.0" />
</joint>
<!-- joint blocks -->
@@ -59,7 +59,7 @@
<anchor xyz="0.0 0 0" />
<limit k_position="10.0" k_velocity="10.0" min="-3.14159" max="3.14159" effort="500" velocity="5" />
<calibration values="1.5 -1 " />
- <joint_properties damping="50.0" />
+ <joint_properties damping="10.0" />
</joint>
<!-- joint blocks -->
@@ -68,7 +68,7 @@
<anchor xyz="0.0 0 0" />
<limit k_position="10.0" k_velocity="10.0" min="-3.14159" max="3.14159" effort="100" velocity="5" />
<calibration values="1.5 -1 " />
- <joint_properties damping="100.0" />
+ <joint_properties damping="10.0" />
</joint>
<!-- joint blocks -->
@@ -77,7 +77,7 @@
<anchor xyz="0.0 0 0" />
<limit k_position="10.0" k_velocity="10.0" min="-3.14159" max="3.14159" effort="100" velocity="5" />
<calibration values="1.5 -1 " />
- <joint_properties damping="100.0" />
+ <joint_properties damping="10.0" />
</joint>
<!-- link blocks -->
@@ -112,9 +112,9 @@
<origin xyz="0 0 10" rpy="0 0 0" />
<joint name="link1_joint" />
<inertial >
- <mass value="10" />
- <com xyz="0 0 0" />
- <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
+ <mass value="1" />
+ <com xyz="0 0 0.5" />
+ <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
</inertial>
<visual >
<origin xyz="0 0 -0.5" rpy="0 0 0" />
@@ -143,9 +143,9 @@
<origin xyz="0.0 0 0" rpy="0 0 0" />
<joint name="link2_joint" />
<inertial >
- <mass value="10" />
- <com xyz="1.0 0 0" />
- <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="100.0" iyz="0.0" izz="1.0" />
+ <mass value="1" />
+ <com xyz="0.5 0 0" />
+ <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
</inertial>
<visual >
<origin xyz="0.5 0 0" rpy="0 0 0" />
@@ -172,10 +172,10 @@
<origin xyz="1.0 0 0" rpy="0 0 0" />
<joint name="link3_joint" />
<inertial >
- <mass value="10" />
- <com xyz="0.1 0 0" />
+ <mass value="1" />
+ <com xyz="0.5 0 0" />
<!-- notably, if ixx and iyy and izz are simultaneously too large (i.e. 10*) compared to com length, this breaks down and links are totally wrong, try it if you like -->
- <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
+ <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
</inertial>
<visual >
<origin xyz="0.5 0 0" rpy="0 0 0" />
@@ -203,15 +203,15 @@
<origin xyz="1.0 0 0" rpy="0 0 0" />
<joint name="link4_joint" />
<inertial >
- <mass value="10" />
- <com xyz="0.1 0 0" />
+ <mass value="1" />
+ <com xyz="0.5 0 0" />
<!-- notably, if ixx and iyy and izz are simultaneously too large (i.e. 10*) compared to com length, this breaks down and links are totally wrong, try it if you like -->
- <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
+ <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
</inertial>
<visual >
<origin xyz="0.5 0 0" rpy="0 0 0" />
<map name="gazebo_material" flag="gazebo">
- <elem key="material">Gazebo/Green</elem>
+ <elem key="material">Gazebo/Red</elem>
</map>
<geometry name="sholder_roll_mesh_file">
<mesh scale="1.0 0.1 0.1" />
@@ -234,15 +234,15 @@
<origin xyz="1.0 0 0" rpy="0 0 0" />
<joint name="link5_joint" />
<inertial >
- <mass value="10" />
- <com xyz="0.1 0 0" />
+ <mass value="1" />
+ <com xyz="0.5 0 0" />
<!-- notably, if ixx and iyy and izz are simultaneously too large (i.e. 10*) compared to com length, this breaks down and links are totally wrong, try it if you like -->
- <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
+ <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
</inertial>
<visual >
<origin xyz="0.5 0 0" rpy="0 0 0" />
<map name="gazebo_material" flag="gazebo">
- <elem key="material">Gazebo/Green</elem>
+ <elem key="material">Gazebo/Blue</elem>
</map>
<geometry name="sholder_roll_mesh_file">
<mesh scale="1.0 0.1 0.1" />
@@ -265,10 +265,10 @@
<origin xyz="1.0 0 0" rpy="0 0 0" />
<joint name="link6_joint" />
<inertial >
- <mass value="10" />
- <com xyz="0.1 0 0" />
+ <mass value="1" />
+ <com xyz="0.5 0 0" />
<!-- notably, if ixx and iyy and izz are simultaneously too large (i.e. 10*) compared to com length, this breaks down and links are totally wrong, try it if you like -->
- <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
+ <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
</inertial>
<visual >
<origin xyz="0.5 0 0" rpy="0 0 0" />
@@ -296,15 +296,15 @@
<origin xyz="1.0 0 0" rpy="0 0 0" />
<joint name="link7_joint" />
<inertial >
- <mass value="10" />
- <com xyz="0.1 0 0" />
+ <mass value="1" />
+ <com xyz="0.5 0 0" />
<!-- notably, if ixx and iyy and izz are simultaneously too large (i.e. 10*) compared to com length, this breaks down and links are totally wrong, try it if you like -->
- <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
+ <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
</inertial>
<visual >
<origin xyz="0.5 0 0" rpy="0 0 0" />
<map name="gazebo_material" flag="gazebo">
- <elem key="material">Gazebo/Green</elem>
+ <elem key="material">Gazebo/Red</elem>
</map>
<geometry name="sholder_roll_mesh_file">
<mesh scale="1.0 0.1 0.1" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hsu...@us...> - 2008-12-02 01:27:24
|
Revision: 7434
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7434&view=rev
Author: hsujohnhsu
Date: 2008-12-02 01:27:21 +0000 (Tue, 02 Dec 2008)
Log Message:
-----------
* renamed pr2.launch to pr2_simple.launch in pr2_gazebo.
* renamed pr2_prototype1.launch to pr2_prototype1_wg.launch in pr2_prototype1_gazebo.
* update launc_gazebo.xml and launch_gazebo_obstacle.xml in executive_trex_pr2/cfg.
* added test_gazebo.xml executive_trex_pr2/wpc.0.
* added 2dnav-gazebo-prototype1-simple* in 2dnav_gazebo.
Modified Paths:
--------------
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-wg-fake_localization.xml
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-wg.xml
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-fake_localization.xml
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple.xml
pkg/trunk/demos/2dnav_gazebo/doc.dox
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo.xml
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo_obstacle.xml
Added Paths:
-----------
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-simple-fake_localization.xml
pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-simple.xml
pkg/trunk/demos/pr2_gazebo/pr2_simple.launch
pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_obs.launch
pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_wg.launch
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc.0/test_gazebo.xml
Removed Paths:
-------------
pkg/trunk/demos/pr2_gazebo/pr2.launch
pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1.launch
Added: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-simple-fake_localization.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-simple-fake_localization.xml (rev 0)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-simple-fake_localization.xml 2008-12-02 01:27:21 UTC (rev 7434)
@@ -0,0 +1,23 @@
+<launch>
+ <master auto="start"/>
+ <group name="wg">
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_simple.launch"/>
+ <include file="$(find 2dnav_gazebo)/2dnav-params.xml"/>
+
+ <node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map3.png 0.1" respawn="false" output="screen" />
+ <node pkg="fake_localization" type="fake_localization" respawn="false" output="screen" />
+ <node pkg="nav_view" type="nav_view" respawn="false" output="screen" />
+ <node pkg="world_3d_map" type="world_3d_map" args="/robotdesc/pr2 scan:=tilt_scan cloud:=full_cloud" respawn="false" />
+
+ <!--node pkg="wavefront_player" type="wavefront_player" args="scan:=base_scan" respawn="false" output="screen" /-->
+ <node pkg="highlevel_controllers" type="move_base_sbpl" args="cloud:=world_3d_map" respawn="false"/>
+
+ <!-- for visualization -->
+ <!--node pkg="pr2_gui" type="pr2_gui" respawn="false" output="screen" /-->
+
+ <!-- for manual control -->
+ <!--node pkg="teleop_base_keyboard" type="teleop_base_keyboard" respawn="false" output="screen" /-->
+ <!--node pkg="teleop_arm_keyboard" type="teleop_arm_keyboard" respawn="false" output="screen" /-->
+ </group>
+</launch>
+
Added: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-simple.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-simple.xml (rev 0)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-simple.xml 2008-12-02 01:27:21 UTC (rev 7434)
@@ -0,0 +1,23 @@
+<launch>
+ <master auto="start"/>
+ <group name="wg">
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_simple.launch"/>
+ <include file="$(find 2dnav_gazebo)/2dnav-params.xml"/>
+
+ <node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map3.png 0.1" respawn="false" output="screen" />
+ <node pkg="amcl_player" type="amcl_player" args="scan:=base_scan" respawn="false" />
+ <node pkg="nav_view" type="nav_view" respawn="false" output="screen" />
+ <node pkg="world_3d_map" type="world_3d_map" args="/robotdesc/pr2 scan:=tilt_scan cloud:=full_cloud" respawn="false" />
+
+ <!--node pkg="wavefront_player" type="wavefront_player" args="scan:=base_scan" respawn="false" output="screen" /-->
+ <node pkg="highlevel_controllers" type="move_base_sbpl" args="cloud:=world_3d_map" respawn="false"/>
+
+ <!-- for visualization -->
+ <!--node pkg="pr2_gui" type="pr2_gui" respawn="false" output="screen" /-->
+
+ <!-- for manual control -->
+ <!--node pkg="teleop_base_keyboard" type="teleop_base_keyboard" respawn="false" output="screen" /-->
+ <!--node pkg="teleop_arm_keyboard" type="teleop_arm_keyboard" respawn="false" output="screen" /-->
+ </group>
+</launch>
+
Modified: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-wg-fake_localization.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-wg-fake_localization.xml 2008-12-02 01:11:00 UTC (rev 7433)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-wg-fake_localization.xml 2008-12-02 01:27:21 UTC (rev 7434)
@@ -1,7 +1,7 @@
<launch>
<master auto="start"/>
<group name="wg">
- <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1.launch"/>
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_wg.launch"/>
<include file="$(find 2dnav_gazebo)/2dnav-params.xml"/>
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/willowMap.png 0.1" respawn="false" output="screen" />
Modified: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-wg.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-wg.xml 2008-12-02 01:11:00 UTC (rev 7433)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-prototype1-wg.xml 2008-12-02 01:27:21 UTC (rev 7434)
@@ -1,7 +1,7 @@
<launch>
<master auto="start"/>
<group name="wg">
- <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1.launch"/>
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_wg.launch"/>
<include file="$(find 2dnav_gazebo)/2dnav-params.xml"/>
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/willowMap.png 0.1" respawn="false" output="screen" />
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-02 01:11:00 UTC (rev 7433)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple-fake_localization.xml 2008-12-02 01:27:21 UTC (rev 7434)
@@ -1,7 +1,7 @@
<launch>
<master auto="start"/>
<group name="wg">
- <!--include file="$(find pr2_gazebo)/pr2.launch"/-->
+ <!--include file="$(find pr2_gazebo)/pr2_simple.launch"/-->
<include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_simple.launch"/>
<include file="$(find 2dnav_gazebo)/2dnav-params.xml"/>
Modified: pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple.xml
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple.xml 2008-12-02 01:11:00 UTC (rev 7433)
+++ pkg/trunk/demos/2dnav_gazebo/2dnav-gazebo-simple.xml 2008-12-02 01:27:21 UTC (rev 7434)
@@ -1,7 +1,7 @@
<launch>
<master auto="start"/>
<group name="wg">
- <!--include file="$(find pr2_gazebo)/pr2.launch"/-->
+ <!--include file="$(find pr2_gazebo)/pr2_simple.launch"/-->
<include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_simple.launch"/>
<include file="$(find 2dnav_gazebo)/2dnav-params.xml"/>
Modified: pkg/trunk/demos/2dnav_gazebo/doc.dox
===================================================================
--- pkg/trunk/demos/2dnav_gazebo/doc.dox 2008-12-02 01:11:00 UTC (rev 7433)
+++ pkg/trunk/demos/2dnav_gazebo/doc.dox 2008-12-02 01:27:21 UTC (rev 7434)
@@ -21,7 +21,7 @@
<master auto="start"/>
<group name="wg">
<!-- this is another script that starts up a simple world with PR2 in it -->
- <include file="$(find pr2_gazebo)/pr2.launch"/>
+ <include file="$(find pr2_gazebo)/pr2_simple.launch"/>
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map3.png 0.1" respawn="false" output="screen" />
<node pkg="amcl_player" type="amcl_player" args="scan:=base_scan" respawn="false" output="screen" />
<node pkg="wavefront_player" type="wavefront_player" args="scan:=base_scan" respawn="false" output="screen" />
Deleted: pkg/trunk/demos/pr2_gazebo/pr2.launch
===================================================================
--- pkg/trunk/demos/pr2_gazebo/pr2.launch 2008-12-02 01:11:00 UTC (rev 7433)
+++ pkg/trunk/demos/pr2_gazebo/pr2.launch 2008-12-02 01:27:21 UTC (rev 7434)
@@ -1,22 +0,0 @@
-<launch>
- <!-- this launch file corresponds to robot model in ros-pkg/robot_descriptions/wg_robot_description/pr2 -->
- <group name="wg">
- <!-- send pr2.xml to param server -->
- <include file="$(find wg_robot_description)/pr2/send_description.launch" />
-
- <!-- start gazebo -->
- <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/simple.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" />
- <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
- </node>
-
- <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
- <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
-
- <!-- load controllers -->
- <include file="$(find pr2_gazebo)/pr2_default_controllers.launch" />
- </group>
-</launch>
-
Copied: pkg/trunk/demos/pr2_gazebo/pr2_simple.launch (from rev 7426, pkg/trunk/demos/pr2_gazebo/pr2.launch)
===================================================================
--- pkg/trunk/demos/pr2_gazebo/pr2_simple.launch (rev 0)
+++ pkg/trunk/demos/pr2_gazebo/pr2_simple.launch 2008-12-02 01:27:21 UTC (rev 7434)
@@ -0,0 +1,22 @@
+<launch>
+ <!-- this launch file corresponds to robot model in ros-pkg/robot_descriptions/wg_robot_description/pr2 -->
+ <group name="wg">
+ <!-- send pr2.xml to param server -->
+ <include file="$(find wg_robot_description)/pr2/send_description.launch" />
+
+ <!-- start gazebo -->
+ <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/simple.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" />
+ <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
+ </node>
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!-- load controllers -->
+ <include file="$(find pr2_gazebo)/pr2_default_controllers.launch" />
+ </group>
+</launch>
+
Deleted: pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1.launch
===================================================================
--- pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1.launch 2008-12-02 01:11:00 UTC (rev 7433)
+++ pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1.launch 2008-12-02 01:27:21 UTC (rev 7434)
@@ -1,25 +0,0 @@
-<launch>
- <!-- this launch file corresponds to robot model in ros-pkg/robot_descriptions/wg_robot_description/pr2 -->
- <!-- if needed, group tag allows pushing components into namespace via ns="namespace" -->
- <group name="wg">
-
- <!-- send pr2.xml to parameter server as a string, allow retrieval by various components whe needs it
- (Mechanism Control, BaseControllerNode, etc...) -->
- <include file="$(find wg_robot_description)/pr2_prototype1/send_description.xml" />
-
- <!-- assign environment variables for gazebo and startup gazebo with argument containing the world file. -->
- <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/wg.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" />
- <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
- </node>
-
- <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
- <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
-
- <!-- use mech.py to spawn all controllers listed in controllers.xml -->
- <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_controllers.launch" />
- </group>
-</launch>
-
Added: pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_obs.launch
===================================================================
--- pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_obs.launch (rev 0)
+++ pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_obs.launch 2008-12-02 01:27:21 UTC (rev 7434)
@@ -0,0 +1,21 @@
+<launch>
+ <group name="wg">
+ <!-- send pr2.xml to param server -->
+ <include file="$(find wg_robot_description)/pr2_prototype1/send_description.xml" />
+
+ <!-- start gazebo -->
+ <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/obstacle.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" />
+ <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
+ </node>
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!-- load controllers -->
+ <include file="$(find pr2_gazebo)/pr2_default_controllers.launch" />
+ </group>
+</launch>
+
Copied: pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_wg.launch (from rev 7426, pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1.launch)
===================================================================
--- pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_wg.launch (rev 0)
+++ pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_wg.launch 2008-12-02 01:27:21 UTC (rev 7434)
@@ -0,0 +1,25 @@
+<launch>
+ <!-- this launch file corresponds to robot model in ros-pkg/robot_descriptions/wg_robot_description/pr2 -->
+ <!-- if needed, group tag allows pushing components into namespace via ns="namespace" -->
+ <group name="wg">
+
+ <!-- send pr2.xml to parameter server as a string, allow retrieval by various components whe needs it
+ (Mechanism Control, BaseControllerNode, etc...) -->
+ <include file="$(find wg_robot_description)/pr2_prototype1/send_description.xml" />
+
+ <!-- assign environment variables for gazebo and startup gazebo with argument containing the world file. -->
+ <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/wg.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" />
+ <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
+ </node>
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!-- use mech.py to spawn all controllers listed in controllers.xml -->
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_controllers.launch" />
+ </group>
+</launch>
+
Modified: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo.xml 2008-12-02 01:11:00 UTC (rev 7433)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo.xml 2008-12-02 01:27:21 UTC (rev 7434)
@@ -2,6 +2,8 @@
<master auto="start"/>
<group name="wg">
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_simple.launch"/>
+
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map3.png 0.1" respawn="false" />
<node pkg="fake_localization" type="fake_localization" respawn="false" output="screen" />
Modified: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo_obstacle.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo_obstacle.xml 2008-12-02 01:11:00 UTC (rev 7433)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/cfg/launch_gazebo_obstacle.xml 2008-12-02 01:27:21 UTC (rev 7434)
@@ -3,7 +3,7 @@
<group name="wg">
<!-- startup Gazebo with robot and default mechanism controllers -->
- <include file="$(find pr2_gazebo)/pr2_obs.launch"/>
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_obs.launch"/>
<node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map3.png 0.1" respawn="false" />
Added: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc.0/test_gazebo.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc.0/test_gazebo.xml (rev 0)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc.0/test_gazebo.xml 2008-12-02 01:27:21 UTC (rev 7434)
@@ -0,0 +1,10 @@
+<launch>
+ <master auto="start"/>
+ <include file="$(find executive_trex_pr2)/cfg/launch_gazebo.xml" />
+ <param name="/trex/input_file" value="nav.cfg"/>
+ <param name="/trex/path" value="$(find executive_trex_pr2)/cfg:$(find executive_trex_pr2)/wpc.0"/>
+ <param name="/trex/time_limit" value="20"/>
+ <param name="/trex/log_dir" value="$(find executive_trex_pr2)/wpc.0"/>
+ <param name="/trex/play_back" value="0"/>
+ <test test-name="executive_trex_wpc.0" pkg="executive_trex_pr2" type="trexdebug" time-limit="40"/>
+</launch>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tf...@us...> - 2008-12-02 07:54:48
|
Revision: 7452
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7452&view=rev
Author: tfoote
Date: 2008-12-02 07:54:46 +0000 (Tue, 02 Dec 2008)
Log Message:
-----------
a few more patches to clean things up in bullet, + testcode
Modified Paths:
--------------
pkg/trunk/3rdparty/bullet/quaternion.patch
pkg/trunk/util/tf/test/bullet_unittest.cpp
Modified: pkg/trunk/3rdparty/bullet/quaternion.patch
===================================================================
--- pkg/trunk/3rdparty/bullet/quaternion.patch 2008-12-02 06:53:45 UTC (rev 7451)
+++ pkg/trunk/3rdparty/bullet/quaternion.patch 2008-12-02 07:54:46 UTC (rev 7452)
@@ -1,3 +1,21 @@
+Index: src/LinearMath/btTransformUtil.h
+===================================================================
+--- src/LinearMath/btTransformUtil.h (revision 1497)
++++ src/LinearMath/btTransformUtil.h (working copy)
+@@ -115,12 +115,9 @@
+ }
+ }
+
+- static void calculateDiffAxisAngleQuaternion(const btQuaternion& orn0,const btQuaternion& orn1a,btVector3& axis,btScalar& angle)
++ static void calculateDiffAxisAngleQuaternion(const btQuaternion& orn0,const btQuaternion& orn1,btVector3& axis,btScalar& angle)
+ {
+- btQuaternion orn1 = orn0.farthest(orn1a);
+ btQuaternion dorn = orn1 * orn0.inverse();
+- ///floating point inaccuracy can lead to w component > 1..., which breaks
+- dorn.normalize();
+ angle = dorn.getAngle();
+ axis = btVector3(dorn.x(),dorn.y(),dorn.z());
+ axis[3] = btScalar(0.);
Index: src/LinearMath/btQuaternion.h
===================================================================
--- src/LinearMath/btQuaternion.h (revision 1497)
@@ -2,3 +20,3 @@
+++ src/LinearMath/btQuaternion.h (working copy)
-@@ -199,7 +199,12 @@
+@@ -199,15 +199,26 @@
{
@@ -16,7 +34,9 @@
}
/**@brief Return the angle of rotation represented by this quaternion */
btScalar getAngle() const
-@@ -208,6 +213,12 @@
+ {
+- btScalar s = btScalar(2.) * btAcos(m_floats[3]);
++ btScalar s = btScalar(2.) * btAcos(GEN_clamped(m_floats[3], (btScalar)-1.0, (btScalar)1.0));
return s;
}
Modified: pkg/trunk/util/tf/test/bullet_unittest.cpp
===================================================================
--- pkg/trunk/util/tf/test/bullet_unittest.cpp 2008-12-02 06:53:45 UTC (rev 7451)
+++ pkg/trunk/util/tf/test/bullet_unittest.cpp 2008-12-02 07:54:46 UTC (rev 7452)
@@ -30,6 +30,7 @@
#include <gtest/gtest.h>
#include <sys/time.h>
#include "LinearMath/btTransform.h"
+#include "LinearMath/btTransformUtil.h"
#include "LinearMath/btVector3.h"
void seed_rand()
@@ -353,6 +354,66 @@
}
+TEST(Bullet, SetEulerZYX)
+{
+ btMatrix3x3 mat;
+ mat.setEulerZYX(M_PI/2, 0, 0);
+ double yaw, pitch, roll;
+ mat.getEulerZYX(yaw, pitch, roll);
+ EXPECT_NEAR(yaw, M_PI/2, 0.1);
+ EXPECT_NEAR(pitch, 0, 0.1);
+ EXPECT_NEAR(roll, 0, 0.1);
+// printf("%f %f %f\n", yaw, pitch, roll);
+ btQuaternion q;
+ mat.getRotation(q);
+ EXPECT_NEAR(q.z(), sqrt(2)/2, 0.1);
+ EXPECT_NEAR(q.y(), 0, 0.1);
+ EXPECT_NEAR(q.x(), 0, 0.1);
+ EXPECT_NEAR(q.w(), sqrt(2)/2, 0.1);
+ // printf("%f %f %f %f\n", q.x(), q.y(), q.z(), q.w());
+}
+
+
+TEST(Bullet, calculateDiffAxisAngleQuaternion)
+{
+ btVector3 vec;
+ btScalar ang;
+ for (unsigned int i = 0 ; i < 1000 ; i++)
+ {
+ btQuaternion q1(M_PI*2 *(double) i / 1000, 0, 0);
+ btQuaternion q2(M_PI/2*0, 0,0);
+ btTransformUtil::calculateDiffAxisAngleQuaternion(q1, q2, vec, ang);
+ // printf("%f %f %f, ang %f\n", vec.x(), vec.y(), vec.z(), ang);
+ EXPECT_NEAR(M_PI*2 *(double) i / 1000, ang, 0.001);
+ btTransformUtil::calculateDiffAxisAngleQuaternion(q2, q1, vec, ang);
+ // printf("%f %f %f, ang %f\n", vec.x(), vec.y(), vec.z(), ang);
+ EXPECT_NEAR(M_PI*2 *(double) i / 1000, ang, 0.001);
+ }
+ for (unsigned int i = 0 ; i < 1000 ; i++)
+ {
+ btQuaternion q1(0, M_PI*2 *(double) i / 1000,1);
+ btQuaternion q2(0, 0, 1);
+ btTransformUtil::calculateDiffAxisAngleQuaternion(q1, q2, vec, ang);
+ // printf("%f %f %f, ang %f\n", vec.x(), vec.y(), vec.z(), ang);
+ EXPECT_NEAR(M_PI*2 *(double) i / 1000, ang, 0.001);
+ btTransformUtil::calculateDiffAxisAngleQuaternion(q2, q1, vec, ang);
+ // printf("%f %f %f, ang %f\n", vec.x(), vec.y(), vec.z(), ang);
+ EXPECT_NEAR(M_PI*2 *(double) i / 1000, ang, 0.001);
+ }
+ for (unsigned int i = 0 ; i < 1000 ; i++)
+ {
+ btQuaternion q1(0, 0, M_PI*2 *(double) i / 1000);
+ btQuaternion q2(0, 0,0);
+ btTransformUtil::calculateDiffAxisAngleQuaternion(q1, q2, vec, ang);
+ // printf("%f %f %f, ang %f\n", vec.x(), vec.y(), vec.z(), ang);
+ EXPECT_NEAR(M_PI*2 *(double) i / 1000, ang, 0.001);
+ btTransformUtil::calculateDiffAxisAngleQuaternion(q2, q1, vec, ang);
+ // printf("%f %f %f, ang %f\n", vec.x(), vec.y(), vec.z(), ang);
+ EXPECT_NEAR(M_PI*2 *(double) i / 1000, ang, 0.001);
+ }
+}
+
+
int main(int argc, char **argv){
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hsu...@us...> - 2008-12-03 01:10:36
|
Revision: 7485
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7485&view=rev
Author: hsujohnhsu
Date: 2008-12-03 01:10:34 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
* remove deprecated math expression file.
* added pr2_empty_no_x.launch for tests. updated testbase and testslide to run without x.
Modified Paths:
--------------
pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase.xml
pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase_odomw_gt.py
pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase_odomxyw_gt.py
pkg/trunk/drivers/simulator/gazebo_plugin/test/testslide.xml
Added Paths:
-----------
pkg/trunk/demos/pr2_gazebo/pr2_empty_no_x.launch
Removed Paths:
-------------
pkg/trunk/util/angles/src/MathExpression.cpp
Added: pkg/trunk/demos/pr2_gazebo/pr2_empty_no_x.launch
===================================================================
--- pkg/trunk/demos/pr2_gazebo/pr2_empty_no_x.launch (rev 0)
+++ pkg/trunk/demos/pr2_gazebo/pr2_empty_no_x.launch 2008-12-03 01:10:34 UTC (rev 7485)
@@ -0,0 +1,22 @@
+<launch>
+ <!-- this launch file corresponds to robot model in ros-pkg/robot_descriptions/wg_robot_description/pr2 -->
+ <group name="wg">
+ <!-- send pr2.xml to param server -->
+ <include file="$(find wg_robot_description)/pr2/send_description.launch" />
+
+ <!-- start gazebo -->
+ <node pkg="gazebo" type="gazebo" args="-r $(find gazebo_robot_description)/gazebo_worlds/empty.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" />
+ <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
+ </node>
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!-- load controllers -->
+ <include file="$(find pr2_gazebo)/pr2_default_controllers.launch" />
+ </group>
+</launch>
+
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase.xml 2008-12-03 01:09:41 UTC (rev 7484)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase.xml 2008-12-03 01:10:34 UTC (rev 7485)
@@ -2,7 +2,7 @@
<master auto="start" />
<!-- send single_link.xml to param server -->
- <include file="$(find pr2_gazebo)/pr2_empty.launch" />
+ <include file="$(find pr2_gazebo)/pr2_empty_no_x.launch" />
<!--<node pkg="gazebo_plugin" type="groundtruthtransform" args="" respawn="true" />-->
<test test-name="gazebo_plugin_testbase_vw1" pkg="gazebo_plugin" type="testbase_vw_gt.py" />
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase_odomw_gt.py
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase_odomw_gt.py 2008-12-03 01:09:41 UTC (rev 7484)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase_odomw_gt.py 2008-12-03 01:10:34 UTC (rev 7485)
@@ -65,18 +65,39 @@
self.y = y
self.z = z
+ def shortest_euler_distance(self, e_from, e_to):
+ # takes two sets of euler angles, finds minimum transform between the two, FIXME: return some hacked norm for now
+ # start from the euler-from, and apply reverse euler-to transform, see how far we are from 0,0,0
+ r0 = e_from.x
+ p0 = e_from.y
+ y0 = e_from.z
+
+ r1 = math.cos(e_to.z)*r0 + math.sin(e_to.z)*p0
+ p1 = -math.sin(e_to.z)*r0 + math.cos(e_to.z)*p0
+ y1 = y0
+
+ r2 = math.cos(e_to.y)*r1 - math.sin(e_to.y)*y1
+ p2 = p1
+ y2 = math.sin(e_to.y)*r1 + math.cos(e_to.y)*y1
+
+ self.x = r2
+ self.y = math.cos(e_to.x)*p1 + math.sin(e_to.x)*y1
+ self.z = -math.sin(e_to.x)*p1 + math.cos(e_to.x)*y1
+
class Q:
def __init__(self,x,y,z,u):
self.x = x
self.y = y
self.z = z
self.u = u
+
def normalize(self):
s = math.sqrt(self.u * self.u + self.x * self.x + self.y * self.y + self.z * self.z)
self.u /= s
self.x /= s
self.y /= s
self.z /= s
+
def getEuler(self):
self.normalize()
squ = self.u
@@ -104,23 +125,37 @@
self.odom_xi = 0;
self.odom_yi = 0;
- self.odom_ti = 0;
+ self.odom_ei = E(0,0,0)
self.odom_initialized = False;
self.odom_x = 0;
self.odom_y = 0;
- self.odom_t = 0;
+ self.odom_e = E(0,0,0)
self.p3d_xi = 0;
self.p3d_yi = 0;
- self.p3d_ti = 0;
+ self.p3d_ei = E(0,0,0)
self.p3d_initialized = False;
self.p3d_x = 0;
self.p3d_y = 0;
- self.p3d_t = 0;
+ self.p3d_e = E(0,0,0)
+ def normalize_angle_positive(self, angle):
+ return math.fmod(math.fmod(angle, 2*math.pi) + 2*math.pi, 2*math.pi)
+ def normalize_angle(self, angle):
+ anorm = self.normalize_angle_positive(angle)
+ if anorm > math.pi:
+ anorm -= 2*math.pi
+ return anorm
+
+ def shortest_angular_distance(self, angle_from, angle_to):
+ angle_diff = self.normalize_angle_positive(angle_to) - self.normalize_angle_positive(angle_from)
+ if angle_diff > math.pi:
+ angle_diff = -(2*math.pi - angle_diff)
+ return self.normalize_angle(angle_diff)
+
def printBaseOdom(self, odom):
print "odom received"
print "odom pos " + "x: " + str(odom.pos.x)
@@ -146,16 +181,18 @@
print " " + "y: " + str(p3d.vel.ang_vel.vy)
print " " + "z: " + str(p3d.vel.ang_vel.vz)
+
+
def odomInput(self, odom):
#self.printBaseOdom(odom)
if self.odom_initialized == False:
self.odom_initialized = True
self.odom_xi = odom.pos.x
self.odom_yi = odom.pos.y
- self.odom_ti = odom.pos.th
+ self.odom_ei = E(0,0,odom.pos.th)
self.odom_x = odom.pos.x - self.odom_xi
self.odom_y = odom.pos.y - self.odom_yi
- self.odom_t = odom.pos.th - self.odom_ti
+ self.odom_e.shortest_euler_distance(self.odom_ei, E(0,0,odom.pos.th))
def p3dInput(self, p3d):
@@ -167,11 +204,13 @@
self.p3d_initialized = True
self.p3d_xi = p3d.pos.position.x
self.p3d_yi = p3d.pos.position.y
- self.p3d_ti = v.z
+ self.p3d_ei = E(v.x,v.y,v.z)
self.p3d_x = p3d.pos.position.x - self.p3d_xi
self.p3d_y = p3d.pos.position.y - self.p3d_yi
- self.p3d_t = v.z - self.p3d_ti
+ self.p3d_e.shortest_euler_distance(self.p3d_ei,E(v.x,v.y,v.z))
+ #print "p3d initial:" + str(self.p3d_ei.x) + "," + str(self.p3d_ei.y) + "," + str(self.p3d_ei.z) \
+ # + " p3d final:" + str(v.x) + "," + str(v.y) + "," + str(v.z)
def test_base(self):
@@ -185,14 +224,20 @@
pub.publish(BaseVel(TARGET_VX,TARGET_VY,TARGET_VW))
time.sleep(0.1)
# display what odom thinks
- #print " odom " + " x: " + str(self.odom_x) + " y: " + str(self.odom_y) + " t: " + str(self.odom_t)
+ #print " odom " + " x: " + str(self.odom_e.x) + " y: " + str(self.odom_e.y) + " t: " + str(self.odom_e.t)
# display what ground truth is
- #print " p3d " + " x: " + str(self.p3d_x) + " y: " + str(self.p3d_y) + " t: " + str(self.p3d_t)
+ #print " p3d " + " x: " + str(self.p3d_e.x) + " y: " + str(self.p3d_e.y) + " t: " + str(self.p3d_e.t)
# display what the odom error is
- print " error " + " x: " + str(self.odom_x - self.p3d_x) + " y: " + str(self.odom_y - self.p3d_y) + " t: " + str(self.odom_t - self.p3d_t)
+ error = E(0,0,0)
+ error.shortest_euler_distance(self.p3d_e,self.odom_e)
+ print " error " + " x:" + str(self.odom_x - self.p3d_x) \
+ + " y:" + str(self.odom_y - self.p3d_y) \
+ + " e:" + str(error.x) + "," + str(error.y) + "," + str(error.z) \
+ + " t_odom:" + str(self.odom_e.z) + " t_p3d:" + str(self.p3d_e.z)
# check total error
- total_error = abs(self.odom_x - self.p3d_x) + abs(self.odom_y - self.p3d_y) + abs(self.odom_t - self.p3d_t)
+ total_error = abs(self.odom_x - self.p3d_x) + abs(self.odom_y - self.p3d_y) + abs(error.x) + abs(error.y) + abs(error.z)
+ print "total error:" + str(total_error) + " tol:" + str(TARGET_TOL)
if total_error < TARGET_TOL:
self.success = True
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase_odomxyw_gt.py
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase_odomxyw_gt.py 2008-12-03 01:09:41 UTC (rev 7484)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testbase_odomxyw_gt.py 2008-12-03 01:10:34 UTC (rev 7485)
@@ -35,7 +35,7 @@
## Gazebo test base controller vw
PKG = 'gazebo_plugin'
-NAME = 'testbase_odomxyw_gt'
+NAME = 'testbase_odomw_gt'
import math
import rostools
@@ -57,7 +57,7 @@
TARGET_VY = 0.5
TARGET_VW = 0.5
TARGET_DURATION = 2.0
-TARGET_TOL = 1.0 #empirical test result john - 20081124
+TARGET_TOL = 0.2 #empirical test result john - 20081124
class E:
def __init__(self,x,y,z):
@@ -65,18 +65,39 @@
self.y = y
self.z = z
+ def shortest_euler_distance(self, e_from, e_to):
+ # takes two sets of euler angles, finds minimum transform between the two, FIXME: return some hacked norm for now
+ # start from the euler-from, and apply reverse euler-to transform, see how far we are from 0,0,0
+ r0 = e_from.x
+ p0 = e_from.y
+ y0 = e_from.z
+
+ r1 = math.cos(e_to.z)*r0 + math.sin(e_to.z)*p0
+ p1 = -math.sin(e_to.z)*r0 + math.cos(e_to.z)*p0
+ y1 = y0
+
+ r2 = math.cos(e_to.y)*r1 - math.sin(e_to.y)*y1
+ p2 = p1
+ y2 = math.sin(e_to.y)*r1 + math.cos(e_to.y)*y1
+
+ self.x = r2
+ self.y = math.cos(e_to.x)*p1 + math.sin(e_to.x)*y1
+ self.z = -math.sin(e_to.x)*p1 + math.cos(e_to.x)*y1
+
class Q:
def __init__(self,x,y,z,u):
self.x = x
self.y = y
self.z = z
self.u = u
+
def normalize(self):
s = math.sqrt(self.u * self.u + self.x * self.x + self.y * self.y + self.z * self.z)
self.u /= s
self.x /= s
self.y /= s
self.z /= s
+
def getEuler(self):
self.normalize()
squ = self.u
@@ -104,23 +125,37 @@
self.odom_xi = 0;
self.odom_yi = 0;
- self.odom_ti = 0;
+ self.odom_ei = E(0,0,0)
self.odom_initialized = False;
self.odom_x = 0;
self.odom_y = 0;
- self.odom_t = 0;
+ self.odom_e = E(0,0,0)
self.p3d_xi = 0;
self.p3d_yi = 0;
- self.p3d_ti = 0;
+ self.p3d_ei = E(0,0,0)
self.p3d_initialized = False;
self.p3d_x = 0;
self.p3d_y = 0;
- self.p3d_t = 0;
+ self.p3d_e = E(0,0,0)
+ def normalize_angle_positive(self, angle):
+ return math.fmod(math.fmod(angle, 2*math.pi) + 2*math.pi, 2*math.pi)
+ def normalize_angle(self, angle):
+ anorm = self.normalize_angle_positive(angle)
+ if anorm > math.pi:
+ anorm -= 2*math.pi
+ return anorm
+
+ def shortest_angular_distance(self, angle_from, angle_to):
+ angle_diff = self.normalize_angle_positive(angle_to) - self.normalize_angle_positive(angle_from)
+ if angle_diff > math.pi:
+ angle_diff = -(2*math.pi - angle_diff)
+ return self.normalize_angle(angle_diff)
+
def printBaseOdom(self, odom):
print "odom received"
print "odom pos " + "x: " + str(odom.pos.x)
@@ -146,16 +181,18 @@
print " " + "y: " + str(p3d.vel.ang_vel.vy)
print " " + "z: " + str(p3d.vel.ang_vel.vz)
+
+
def odomInput(self, odom):
#self.printBaseOdom(odom)
if self.odom_initialized == False:
self.odom_initialized = True
self.odom_xi = odom.pos.x
self.odom_yi = odom.pos.y
- self.odom_ti = odom.pos.th
+ self.odom_ei = E(0,0,odom.pos.th)
self.odom_x = odom.pos.x - self.odom_xi
self.odom_y = odom.pos.y - self.odom_yi
- self.odom_t = odom.pos.th - self.odom_ti
+ self.odom_e.shortest_euler_distance(self.odom_ei, E(0,0,odom.pos.th))
def p3dInput(self, p3d):
@@ -167,11 +204,13 @@
self.p3d_initialized = True
self.p3d_xi = p3d.pos.position.x
self.p3d_yi = p3d.pos.position.y
- self.p3d_ti = v.z
+ self.p3d_ei = E(v.x,v.y,v.z)
self.p3d_x = p3d.pos.position.x - self.p3d_xi
self.p3d_y = p3d.pos.position.y - self.p3d_yi
- self.p3d_t = v.z - self.p3d_ti
+ self.p3d_e.shortest_euler_distance(self.p3d_ei,E(v.x,v.y,v.z))
+ #print "p3d initial:" + str(self.p3d_ei.x) + "," + str(self.p3d_ei.y) + "," + str(self.p3d_ei.z) \
+ # + " p3d final:" + str(v.x) + "," + str(v.y) + "," + str(v.z)
def test_base(self):
@@ -185,14 +224,20 @@
pub.publish(BaseVel(TARGET_VX,TARGET_VY,TARGET_VW))
time.sleep(0.1)
# display what odom thinks
- #print " odom " + " x: " + str(self.odom_x) + " y: " + str(self.odom_y) + " t: " + str(self.odom_t)
+ #print " odom " + " x: " + str(self.odom_e.x) + " y: " + str(self.odom_e.y) + " t: " + str(self.odom_e.t)
# display what ground truth is
- #print " p3d " + " x: " + str(self.p3d_x) + " y: " + str(self.p3d_y) + " t: " + str(self.p3d_t)
+ #print " p3d " + " x: " + str(self.p3d_e.x) + " y: " + str(self.p3d_e.y) + " t: " + str(self.p3d_e.t)
# display what the odom error is
- print " error " + " x: " + str(self.odom_x - self.p3d_x) + " y: " + str(self.odom_y - self.p3d_y) + " t: " + str(self.odom_t - self.p3d_t)
+ error = E(0,0,0)
+ error.shortest_euler_distance(self.p3d_e,self.odom_e)
+ print " error " + " x:" + str(self.odom_x - self.p3d_x) \
+ + " y:" + str(self.odom_y - self.p3d_y) \
+ + " e:" + str(error.x) + "," + str(error.y) + "," + str(error.z) \
+ + " t_odom:" + str(self.odom_e.z) + " t_p3d:" + str(self.p3d_e.z)
# check total error
- total_error = abs(self.odom_x - self.p3d_x) + abs(self.odom_y - self.p3d_y) + abs(self.odom_t - self.p3d_t)
+ total_error = abs(self.odom_x - self.p3d_x) + abs(self.odom_y - self.p3d_y) + abs(error.x) + abs(error.y) + abs(error.z)
+ print "total error:" + str(total_error) + " tol:" + str(TARGET_TOL)
if total_error < TARGET_TOL:
self.success = True
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testslide.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testslide.xml 2008-12-03 01:09:41 UTC (rev 7484)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testslide.xml 2008-12-03 01:10:34 UTC (rev 7485)
@@ -1,7 +1,7 @@
<launch>
<master auto="start" />
- <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/test/testslide.world" respawn="false" output="screen">
+ <node pkg="gazebo" type="gazebo" args="-r $(find gazebo_robot_description)/gazebo_worlds/test/testslide.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" />
Deleted: pkg/trunk/util/angles/src/MathExpression.cpp
===================================================================
--- pkg/trunk/util/angles/src/MathExpression.cpp 2008-12-03 01:09:41 UTC (rev 7484)
+++ pkg/trunk/util/angles/src/MathExpression.cpp 2008-12-03 01:10:34 UTC (rev 7485)
@@ -1,167 +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 "math_utils/MathExpression.h"
-#include <cstdlib>
-#include <cstring>
-#include <cmath>
-#include <deque>
-#include <cstdlib>
-
-bool meval::ContainsOperators(const char *expression)
-{
- return ContainsOperators(std::string(expression));
-}
-
-bool meval::ContainsOperators(const std::string &expression)
-{
- return expression.find_first_of("+-*/") != std::string::npos;
-}
-
-double meval::EvaluateMathExpression(const char *expression, ExpressionVariableFn var, void *data)
-{
- return EvaluateMathExpression(std::string(expression), var, data);
-}
-
-double meval::EvaluateMathExpression(const std::string &expression, ExpressionVariableFn var, void *data)
-{
- std::string exp = expression;
- while (!exp.empty())
- {
- std::string::size_type pos = exp.find_first_of("\n\t ");
- if (pos != std::string::npos)
- exp.erase(pos, 1);
- else
- break;
- }
-
- /* remove brackets, if needed */
- while (exp.size() > 0 && exp[0] == '(' && exp[exp.size() - 1] == ')')
- {
- int depth = 1;
- bool done = false;
- for (unsigned int i = 1 ; i < exp.size() - 1; ++i)
- {
- if (exp[i] == '(')
- depth++;
- if (exp[i] == ')')
- depth--;
- if (depth == 0)
- {
- done = true;
- break;
- }
- }
- if (done)
- break;
- else
- {
- exp.erase(exp.size() - 1);
- exp.erase(0, 1);
- }
- }
-
- /* find possible operations */
- int depth = 0;
- std::deque<unsigned int> ops;
- for (unsigned int i = 0 ; i < exp.size() ; ++i)
- {
- if (depth == 0 && (exp[i] == '+' || exp[i] == '-'))
- ops.push_front(i);
- if (depth == 0 && (exp[i] == '*' || exp[i] == '/'))
- ops.push_back(i);
- if (exp[i] == '(')
- depth++;
- if (exp[i] == ')')
- depth--;
- }
-
- if (ops.empty())
- {
- if (!exp.empty())
- {
- bool variable = false;
- for (unsigned int i = 0 ; i < exp.size() ; ++i)
- {
- if (!((exp[i] <= '9' && exp[i] >= '0') || exp[i] == '+' || exp[i] == '-' || exp[i] == '.'))
- {
- variable = true;
- break;
- }
- }
-
- if (variable)
- {
- if (var)
- return var(data, exp);
- return NAN;
- }
- else
- {
- return atof(exp.c_str());
- }
- }
- }
- else
- {
- unsigned int pos = ops[0];
- std::string exp1 = exp.substr(0, pos);
- std::string exp2 = exp.substr(pos + 1);
- double val1, val2;
- val1 = EvaluateMathExpression(exp1, var, data);
- val2 = EvaluateMathExpression(exp2, var, data);
-
- // Hack: handles unary minus
- if (exp1.size() == 0)
- val1 = 0.0;
-
- switch (exp[pos])
- {
- case '+':
- return val1 + val2;
- case '-':
- return val1 - val2;
- case '*':
- return val1 * val2;
- case '/':
- return val1 / val2;
- default:
- return NAN;
- }
- }
-
- return NAN;
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hsu...@us...> - 2008-12-03 01:41:53
|
Revision: 7490
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7490&view=rev
Author: hsujohnhsu
Date: 2008-12-03 01:37:19 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
arm test without x server.
Modified Paths:
--------------
pkg/trunk/drivers/simulator/gazebo_plugin/test/testarm.xml
Added Paths:
-----------
pkg/trunk/demos/arm_gazebo/arm_no_x.launch
Added: pkg/trunk/demos/arm_gazebo/arm_no_x.launch
===================================================================
--- pkg/trunk/demos/arm_gazebo/arm_no_x.launch (rev 0)
+++ pkg/trunk/demos/arm_gazebo/arm_no_x.launch 2008-12-03 01:37:19 UTC (rev 7490)
@@ -0,0 +1,27 @@
+<launch>
+ <group name="wg">
+ <!-- send pr2_arm.xml to param server -->
+ <include file="$(find wg_robot_description)/pr2_arm_test/send_description.launch" />
+
+ <!-- -g flag runs gazebo in gui-less mode -->
+ <node pkg="gazebo" type="gazebo" args="-r $(find gazebo_robot_description)/gazebo_worlds/empty.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" />
+ <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
+ </node>
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!-- start arm controller -->
+ <!--node pkg="mechanism_control" type="mech.py" args="sp $(find arm_gazebo)/controllers.xml" respawn="false" /--> <!-- load default arm controller -->
+
+ <!-- send arm a command -->
+ <!--node pkg="robot_mechanism_controllers" type="control.py" args="set l_gripper_controller 0.5" respawn="false" output="screen" /--> <!-- open gripper .5 radians -->
+
+ <!-- for visualization -->
+ <!-- node pkg="pr2_gui" type="pr2_gui" respawn="false" output="screen" / -->
+ </group>
+</launch>
+
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testarm.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testarm.xml 2008-12-03 01:26:39 UTC (rev 7489)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testarm.xml 2008-12-03 01:37:19 UTC (rev 7490)
@@ -2,7 +2,7 @@
<master auto="start" />
<!-- send single_link.xml to param server -->
- <include file="$(find arm_gazebo)/arm.launch" />
+ <include file="$(find arm_gazebo)/arm_no_x.launch" />
<!-- start arm controller -->
<node pkg="mechanism_control" type="mech.py" args="sp $(find arm_gazebo)/l_arm_default_controller.xml" respawn="false" /> <!-- load default arm controller -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hsu...@us...> - 2008-12-03 01:46:43
|
Revision: 7492
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7492&view=rev
Author: hsujohnhsu
Date: 2008-12-03 01:46:41 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
added pendulum test with no x and moved x-less tests to non_future.
Modified Paths:
--------------
pkg/trunk/drivers/simulator/gazebo_plugin/CMakeLists.txt
pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.xml
Added Paths:
-----------
pkg/trunk/demos/examples_gazebo/dual_link_no_x.xml
Added: pkg/trunk/demos/examples_gazebo/dual_link_no_x.xml
===================================================================
--- pkg/trunk/demos/examples_gazebo/dual_link_no_x.xml (rev 0)
+++ pkg/trunk/demos/examples_gazebo/dual_link_no_x.xml 2008-12-03 01:46:41 UTC (rev 7492)
@@ -0,0 +1,20 @@
+<launch>
+ <group name="wg">
+ <!-- send dual_link.xml to param server -->
+ <include file="$(find wg_robot_description)/dual_link_test/send_description.launch" />
+
+ <!-- start gazebo -->
+ <node pkg="gazebo" type="gazebo" args="-r $(find gazebo_robot_description)/gazebo_worlds/empty.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" />
+ <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
+ </node>
+ </group>
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!--node pkg="mechanism_control" type="mech.py" args="sp $(find wg_robot_description)/dual_link_test/controllers_dual_link.xml" respawn="false" output="screen" /--> <!-- load default arm controller -->
+ <!--node pkg="robot_mechanism_controllers" type="control.py" args="set test_controller 0.5" respawn="false" output="screen" /--> <!-- open gripper .5 radians -->
+</launch>
+
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/CMakeLists.txt
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/CMakeLists.txt 2008-12-03 01:42:33 UTC (rev 7491)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/CMakeLists.txt 2008-12-03 01:46:41 UTC (rev 7492)
@@ -8,6 +8,7 @@
#add_definitions(-Wall -DNDEBUG -O3)
set(ROS_BUILD_TYPE Release)
+#set(ROS_BUILD_TYPE Debug)
rospack_add_library(Ros_Stereo_Camera src/Ros_Stereo_Camera.cc)
rospack_add_library(Ros_Camera src/Ros_Camera.cc)
@@ -24,12 +25,13 @@
#rospack_add_executable(player_pr2 src/player/Pr2_Player.cc)
#target_link_libraries(player_pr2 playerc++)
-rospack_add_rostest_future(test/testslide.xml)
+rospack_add_rostest(test/testslide.xml)
+rospack_add_rostest(test/testbase.xml)
+rospack_add_rostest(test/testarm.xml)
+rospack_add_rostest(test/testpendulum.xml)
+
rospack_add_rostest_future(test/testcameras.xml)
rospack_add_rostest_future(test/testscan.xml)
-rospack_add_rostest_future(test/testbase.xml)
-rospack_add_rostest_future(test/testarm.xml)
-rospack_add_rostest_future(test/testpendulum.xml)
rospack_add_rostest_future(test/hztest.xml)
rospack_add_rostest_future(test/odom_hztest.xml)
rospack_add_rostest_future(test/rostime_hztest.xml)
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.xml
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.xml 2008-12-03 01:42:33 UTC (rev 7491)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/test/testpendulum.xml 2008-12-03 01:46:41 UTC (rev 7492)
@@ -2,7 +2,7 @@
<launch>
<group name="wg">
<!-- send single_link.xml to param server -->
- <include file="$(find examples_gazebo)/dual_link.xml" />
+ <include file="$(find examples_gazebo)/dual_link_no_x.xml" />
<!--<node pkg="gazebo_plugin" type="groundtruthtransform" args="" respawn="true" />-->
<test test-name="gazebo_plugin_testpendulum" pkg="gazebo_plugin" type="testpendulum.py" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <hsu...@us...> - 2008-12-03 23:00:41
|
Revision: 7532
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7532&view=rev
Author: hsujohnhsu
Date: 2008-12-03 23:00:36 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
* added test wpc_gazebo.0, similar to wpc.0 but in 3D.
* updated initial position of robot in gazebo prototype1 wg.
Modified Paths:
--------------
pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_wg.launch
Added Paths:
-----------
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_wg.xml
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/nav_gazebo.cfg
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/pr2.exec.nddl
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/run_gazebo.xml
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/test_gazebo.xml
Removed Paths:
-------------
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc.0/test_gazebo.xml
Modified: pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_wg.launch
===================================================================
--- pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_wg.launch 2008-12-03 22:50:05 UTC (rev 7531)
+++ pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_wg.launch 2008-12-03 23:00:36 UTC (rev 7532)
@@ -16,7 +16,7 @@
</node>
<!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
- <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2" respawn="false" output="screen" /> <!-- load default arm controller -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2 -5 -15 0 0 0 90" respawn="false" output="screen" /> <!-- load default arm controller -->
<!-- use mech.py to spawn all controllers listed in controllers.xml -->
<include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_controllers.launch" />
Deleted: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc.0/test_gazebo.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc.0/test_gazebo.xml 2008-12-03 22:50:05 UTC (rev 7531)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc.0/test_gazebo.xml 2008-12-03 23:00:36 UTC (rev 7532)
@@ -1,10 +0,0 @@
-<launch>
- <master auto="start"/>
- <include file="$(find executive_trex_pr2)/cfg/launch_gazebo_prototype1.xml" />
- <param name="/trex/input_file" value="nav.cfg"/>
- <param name="/trex/path" value="$(find executive_trex_pr2)/cfg:$(find executive_trex_pr2)/wpc.0"/>
- <param name="/trex/time_limit" value="20"/>
- <param name="/trex/log_dir" value="$(find executive_trex_pr2)/wpc.0"/>
- <param name="/trex/play_back" value="0"/>
- <test test-name="executive_trex_wpc.0" pkg="executive_trex_pr2" type="trexdebug" time-limit="40"/>
-</launch>
Added: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_wg.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_wg.xml (rev 0)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_wg.xml 2008-12-03 23:00:36 UTC (rev 7532)
@@ -0,0 +1,28 @@
+<launch>
+ <master auto="start"/>
+ <group name="wg">
+
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_wg.launch"/>
+
+ <!-- Common parameter settings /-->
+ <param name="/trex/ping_frequency" value="1"/>
+
+ <node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/willowMap.png 0.1" respawn="false" />
+
+ <node pkg="fake_localization" type="fake_localization" respawn="false" output="screen" />
+
+ <node pkg="highlevel_controllers" type="move_base_sbpl" args="" respawn="false" />
+ <node pkg="highlevel_controllers" type="recharge_controller" args="" respawn="false" />
+
+ <!--
+ <node pkg="kinematic_planning" type="kinematic_planning" args="robotdesc/pr2"/>
+ <include file="$(find world_3d_map)/run.xml"/>
+ <node pkg="highlevel_controllers" type="move_arm" args="right" respawn="false"/>
+ <node pkg="highlevel_controllers" type="move_arm" args="left" respawn="false" />
+ <node pkg="highlevel_controllers" type="move_end_effector" args="right" respawn="false"/>
+ -->
+
+ <node pkg="nav_view" type="nav_view" respawn="false" />
+
+ </group>
+</launch>
Added: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/nav_gazebo.cfg
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/nav_gazebo.cfg (rev 0)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/nav_gazebo.cfg 2008-12-03 23:00:36 UTC (rev 7532)
@@ -0,0 +1,12 @@
+<!-- This is a TREX configuration file for a TREX Agent running with base control only. Use for navigation test cases. -->
+<Agent name="pr2" finalTick="forever">
+ <!-- The executive handles top-level planning and execution. Should have the lookead scope of the entire mission. -->
+ <TeleoReactor name="exec" component="DeliberativeReactor" lookAhead="300" latency="10" solverConfig="exec.solver.cfg"/>
+
+ <!-- ROS Adapters -->
+ <TeleoReactor name="baseStateAdapter" component="BaseStateAdapter" timelineName="baseState" timelineType="BaseState" stateTopic="localizedpose" />
+ <TeleoReactor name="baseControllerAdapter" component="BaseControllerAdapter" timelineName="moveBase" timelineType="MoveBase" stateTopic="state" goalTopic="goal" />
+ <TeleoReactor name="rechargeControllerAdapter" component="RechargeControllerAdapter"
+ timelineName="rechargeController" timelineType="RechargeController" stateTopic="recharge_state" goalTopic="recharge_goal" />
+ <TeleoReactor name="batteryStateAdapter" component="BatteryStateAdapter" timelineName="batteryState" timelineType="BatteryState" stateTopic="battery_state"/>
+</Agent>
Added: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/pr2.exec.nddl
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/pr2.exec.nddl (rev 0)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/pr2.exec.nddl 2008-12-03 23:00:36 UTC (rev 7532)
@@ -0,0 +1,5 @@
+#include "nav.init.nddl"
+
+rejectable(moveBase.Active g0);
+g0.x = 25.00;
+g0.y = 16.00;
Added: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/run_gazebo.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/run_gazebo.xml (rev 0)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/run_gazebo.xml 2008-12-03 23:00:36 UTC (rev 7532)
@@ -0,0 +1,11 @@
+<launch>
+ <master auto="start"/>
+ <include file="$(find executive_trex_pr2)/wpc_gazebo.0/launch_gazebo_prototype1_wg.xml" />
+ <param name="/trex/input_file" value="nav_gazebo.cfg"/>
+ <param name="/trex/path" value="$(find executive_trex_pr2)/wpc_gazebo.0:$(find executive_trex_pr2)/cfg"/>
+ <param name="/trex/time_limit" value="20"/>
+ <param name="/trex/log_dir" value="$(find executive_trex_pr2)/wpc.0"/>
+ <param name="/trex/play_back" value="0"/>
+ <node pkg="executive_trex_pr2" type="trexfast" />
+ <test test-name="executive_trex_wpc.0" pkg="executive_trex_pr2" type="trexdebug" time-limit="40"/>
+</launch>
Added: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/test_gazebo.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/test_gazebo.xml (rev 0)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/test_gazebo.xml 2008-12-03 23:00:36 UTC (rev 7532)
@@ -0,0 +1,10 @@
+<launch>
+ <master auto="start"/>
+ <include file="$(find executive_trex_pr2)/wpc_gazebo.0/launch_gazebo_prototype1_wg.xml" />
+ <param name="/trex/input_file" value="nav_gazebo.cfg"/>
+ <param name="/trex/path" value="$(find executive_trex_pr2)/wpc_gazebo.0:$(find executive_trex_pr2)/cfg"/>
+ <param name="/trex/time_limit" value="20"/>
+ <param name="/trex/log_dir" value="$(find executive_trex_pr2)/wpc.0"/>
+ <param name="/trex/play_back" value="0"/>
+ <test test-name="executive_trex_wpc.0" pkg="executive_trex_pr2" type="trexdebug" time-limit="40"/>
+</launch>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hsu...@us...> - 2008-12-03 23:20:39
|
Revision: 7537
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=7537&view=rev
Author: hsujohnhsu
Date: 2008-12-03 23:20:36 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
added a testcase with nothing but a few tables for 2dnav-stack testing.
Added Paths:
-----------
pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_tables.launch
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_tables.xml
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_tables_no_x.xml
pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/run_tables_gazebo.xml
pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/tables.world
Added: pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_tables.launch
===================================================================
--- pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_tables.launch (rev 0)
+++ pkg/trunk/demos/pr2_prototype1_gazebo/pr2_prototype1_tables.launch 2008-12-03 23:20:36 UTC (rev 7537)
@@ -0,0 +1,25 @@
+<launch>
+ <!-- this launch file corresponds to robot model in ros-pkg/robot_descriptions/wg_robot_description/pr2 -->
+ <!-- if needed, group tag allows pushing components into namespace via ns="namespace" -->
+ <group name="wg">
+
+ <!-- send pr2.xml to parameter server as a string, allow retrieval by various components whe needs it
+ (Mechanism Control, BaseControllerNode, etc...) -->
+ <include file="$(find wg_robot_description)/pr2_prototype1/send_description.xml" />
+
+ <!-- assign environment variables for gazebo and startup gazebo with argument containing the world file. -->
+ <node pkg="gazebo" type="gazebo" args="-n $(find gazebo_robot_description)/gazebo_worlds/tables.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" />
+ <env name="MC_RESOURCE_PATH" value="$(find gazebo_robot_description)/world" />
+ </node>
+
+ <!-- push robotdesc/pr2 to factory and spawn robot in gazebo -->
+ <node pkg="gazebo_plugin" type="urdf2factory" args="robotdesc/pr2 -5 -15 0 0 0 90" respawn="false" output="screen" /> <!-- load default arm controller -->
+
+ <!-- use mech.py to spawn all controllers listed in controllers.xml -->
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_controllers.launch" />
+ </group>
+</launch>
+
Added: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_tables.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_tables.xml (rev 0)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_tables.xml 2008-12-03 23:20:36 UTC (rev 7537)
@@ -0,0 +1,28 @@
+<launch>
+ <master auto="start"/>
+ <group name="wg">
+
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_tables.launch"/>
+
+ <!-- Common parameter settings /-->
+ <param name="/trex/ping_frequency" value="1"/>
+
+ <node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map_blank.png 0.1" respawn="false" />
+
+ <node pkg="fake_localization" type="fake_localization" respawn="false" output="screen" />
+
+ <node pkg="highlevel_controllers" type="move_base_sbpl" args="" respawn="false" />
+ <node pkg="highlevel_controllers" type="recharge_controller" args="" respawn="false" />
+
+ <!--
+ <node pkg="kinematic_planning" type="kinematic_planning" args="robotdesc/pr2"/>
+ <include file="$(find world_3d_map)/run.xml"/>
+ <node pkg="highlevel_controllers" type="move_arm" args="right" respawn="false"/>
+ <node pkg="highlevel_controllers" type="move_arm" args="left" respawn="false" />
+ <node pkg="highlevel_controllers" type="move_end_effector" args="right" respawn="false"/>
+ -->
+
+ <node pkg="nav_view" type="nav_view" respawn="false" />
+
+ </group>
+</launch>
Added: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_tables_no_x.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_tables_no_x.xml (rev 0)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/launch_gazebo_prototype1_tables_no_x.xml 2008-12-03 23:20:36 UTC (rev 7537)
@@ -0,0 +1,28 @@
+<launch>
+ <master auto="start"/>
+ <group name="wg">
+
+ <include file="$(find pr2_prototype1_gazebo)/pr2_prototype1_tables_no_x.launch"/>
+
+ <!-- Common parameter settings /-->
+ <param name="/trex/ping_frequency" value="1"/>
+
+ <node pkg="map_server" type="map_server" args="$(find gazebo_robot_description)/world/Media/materials/textures/map_blank.png 0.1" respawn="false" />
+
+ <node pkg="fake_localization" type="fake_localization" respawn="false" output="screen" />
+
+ <node pkg="highlevel_controllers" type="move_base_sbpl" args="" respawn="false" />
+ <node pkg="highlevel_controllers" type="recharge_controller" args="" respawn="false" />
+
+ <!--
+ <node pkg="kinematic_planning" type="kinematic_planning" args="robotdesc/pr2"/>
+ <include file="$(find world_3d_map)/run.xml"/>
+ <node pkg="highlevel_controllers" type="move_arm" args="right" respawn="false"/>
+ <node pkg="highlevel_controllers" type="move_arm" args="left" respawn="false" />
+ <node pkg="highlevel_controllers" type="move_end_effector" args="right" respawn="false"/>
+ -->
+
+ <node pkg="nav_view" type="nav_view" respawn="false" />
+
+ </group>
+</launch>
Added: pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/run_tables_gazebo.xml
===================================================================
--- pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/run_tables_gazebo.xml (rev 0)
+++ pkg/trunk/highlevel/executive_trex/executive_trex_pr2/wpc_gazebo.0/run_tables_gazebo.xml 2008-12-03 23:20:36 UTC (rev 7537)
@@ -0,0 +1,11 @@
+<launch>
+ <master auto="start"/>
+ <include file="$(find executive_trex_pr2)/wpc_gazebo.0/launch_gazebo_prototype1_tables_no_x.xml" />
+ <param name="/trex/input_file" value="nav_gazebo.cfg"/>
+ <param name="/trex/path" value="$(find executive_trex_pr2)/wpc_gazebo.0:$(find executive_trex_pr2)/cfg"/>
+ <param name="/trex/time_limit" value="20"/>
+ <param name="/trex/log_dir" value="$(find executive_trex_pr2)/wpc.0"/>
+ <param name="/trex/play_back" value="0"/>
+ <node pkg="executive_trex_pr2" type="trexfast" />
+ <test test-name="executive_trex_wpc.0" pkg="executive_trex_pr2" type="trexdebug" time-limit="40"/>
+</launch>
Added: pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/tables.world
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/tables.world (rev 0)
+++ pkg/trunk/robot_descriptions/gazebo_robot_description/gazebo_worlds/tables.world 2008-12-03 23:20:36 UTC (rev 7537)
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+
+<gazebo:world
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz"
+ xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
+ xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
+ xmlns:window="http://playerstage.sourceforge.net/gazebo/xmlschema/#window"
+ xmlns:param="http://playerstage.sourceforge.net/gazebo/xmlschema/#param"
+ xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
+ xmlns:geo="http://willowgarage.com/xmlschema/#geo"
+ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
+ xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
+ xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+ xmlns:ui="http://playerstage.sourceforge.net/gazebo/xmlschema/#ui"
+ xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
+ xmlns:renderable="http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable"
+ xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+ xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics" >
+
+ <verbosity>5</verbosity>
+
+<!-- cfm is 1e-5 for single precision -->
+<!-- erp is typically .1-.8 -->
+<!-- here's the global contact cfm/erp -->
+ <physics:ode>
+ <stepTime>0.001</stepTime>
+ <gravity>0 0 -9.8</gravity>
+ <cfm>0.0000000001</cfm>
+ <erp>0.2</erp>
+ <quickStep>true</quickStep>
+ <quickStepIters>3</quickStepIters>
+ <quickStepW>1.3</quickStepW>
+ </physics:ode>
+
+ <geo:origin>
+ <lat>37.4270909558</lat><lon>-122.077919338</lon>
+ </geo:origin>
+
+ <rendering:gui>
+ <type>fltk</type>
+ <size>1024 800</size>
+ <pos>0 0</pos>
+ <frames>
+ <row height="100%">
+ <camera width="100%">
+ <xyz>0 0 20</xyz>
+ <rpy>0 90 90</rpy>
+ </camera>
+ </row>
+ </frames>
+ </rendering:gui>
+
+
+ <rendering:ogre>
+ <ambient>1.0 1.0 1.0 1.0</ambient>
+ <sky>
+ <material>Gazebo/CloudySky</material>
+ </sky>
+ <gazeboPath>media</gazeboPath>
+ <grid>false</grid>
+ <maxUpdateRate>10.</maxUpdateRate>
+ </rendering:ogre>
+
+ <model:physical name="gplane">
+ <xyz>0 0 0</xyz>
+ <rpy>0 0 0</rpy>
+ <static>true</static>
+
+ <body:plane name="plane">
+ <geom:plane name="plane">
+ <kp>1000000.0</kp>
+ <kd>1.0</kd>
+ <normal>0 0 1</normal>
+ <size>51.3 51.3</size>
+ <material>Gazebo/White</material>
+ </geom:plane>
+ </body:plane>
+ </model:physical>
+
+<!--
+ <model:physical name="walls">
+ <include embedded="false">
+ <xi:include href="../gazebo_objects/willow-walls.model" />
+ </include>
+ </model:physical>
+ <model:physical name="willow_map">
+ <xyz>-25.65 25.65 1.0</xyz>
+ <rpy>180 0 0</rpy>
+ <static>true</static>
+ <body:map name="willow_map_body">
+ <geom:map name="willow_map_geom">
+ <image>willowMap.png</image>
+ <threshold>200</threshold>
+ <granularity>1</granularity>
+ <negative>false</negative>
+ <scale>0.1</scale>
+ <offset>0 0 0</offset>
+ <material>Gazebo/Rocky</material>
+ </geom:map>
+ </body:map>
+ </model:physical>
+-->
+
+ <!-- large desk in green room -->
+ <model:physical name="obstacles_model1">
+ <xyz>-2 -12 0</xyz>
+ <rpy>0.0 0.0 0.0 </rpy>
+ <include embedded="true">
+ <xi:include href="../gazebo_objects/desk1.model" />
+ </include>
+ </model:physical>
+
+ <!-- small desks -->
+ <model:physical name="obstacles_model2">
+ <xyz>-11 2.5 0</xyz>
+ <rpy>0.0 0.0 0.0 </rpy>
+ <include embedded="true">
+ <xi:include href="../gazebo_objects/desk2.model" />
+ </include>
+ </model:physical>
+
+ <!-- small desks -->
+ <model:physical name="obstacles_model3">
+ <xyz>-4 -12 0</xyz>
+ <rpy>0.0 0.0 0.0 </rpy>
+ <include embedded="true">
+ <xi:include href="../gazebo_objects/desk3.model" />
+ </include>
+ </model:physical>
+
+ <model:empty name="factory_model">
+ <controller:factory name="factory_controller">
+ <alwaysOn>true</alwaysOn>
+ <updateRate>1000.0</updateRate>
+ <interface:factory name="factory_iface"/>
+ </controller:factory>
+ </model:empty>
+
+ <!-- White Directional light -->
+ <!--
+ <model:renderable name="directional_white">
+ <light>
+ <type>directional</type>
+ <direction>0 -0.5 -0.5</direction>
+ <diffuseColor>0.4 0.4 0.4</diffuseColor>
+ <specularColor>0.0 0.0 0.0</specularColor>
+ <attenuation>1 0.0 1.0 0.4</attenuation>
+ </light>
+ </model:renderable>
+ -->
+
+
+</gazebo:world>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|