|
From: <wa...@us...> - 2009-08-05 17:45:15
|
Revision: 20792
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20792&view=rev
Author: wattsk
Date: 2009-08-05 17:45:00 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
Changed RT service call, ported joint_qual controllers to controllers API, updated control_toolbox for new API
Modified Paths:
--------------
pkg/trunk/controllers/control_toolbox/include/control_toolbox/dither.h
pkg/trunk/controllers/control_toolbox/include/control_toolbox/sine_sweep.h
pkg/trunk/controllers/control_toolbox/src/dither.cpp
pkg/trunk/controllers/control_toolbox/src/sine_sweep.cpp
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/HoldPositionData.msg
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/JointPositionData.msg
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/src/checkout_controller.cpp
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/src/hold_set_controller.cpp
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/src/hysteresis_controller.cpp
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/src/sine_sweep_controller.cpp
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/srv/HoldSetData.srv
pkg/trunk/stacks/hardware_test/diagnostic_test/scripts/diagnostic_test.py
pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_srv_call.h
Added Paths:
-----------
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/HoldRunData.msg
Modified: pkg/trunk/controllers/control_toolbox/include/control_toolbox/dither.h
===================================================================
--- pkg/trunk/controllers/control_toolbox/include/control_toolbox/dither.h 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/control_toolbox/include/control_toolbox/dither.h 2009-08-05 17:45:00 UTC (rev 20792)
@@ -35,6 +35,8 @@
#include <cstdlib>
#include <ctime>
+#include <math.h>
+#include <ros/ros.h>
namespace control_toolbox {
/***************************************************/
@@ -69,7 +71,7 @@
*
* \param amplitude The amplitude of the dither, \f$A\f$.
*/
- void init(double amplitude);
+ bool init(const ros::NodeHandle &n);
private:
double amplitude_; /**< Amplitude of the sweep. */
Modified: pkg/trunk/controllers/control_toolbox/include/control_toolbox/sine_sweep.h
===================================================================
--- pkg/trunk/controllers/control_toolbox/include/control_toolbox/sine_sweep.h 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/control_toolbox/include/control_toolbox/sine_sweep.h 2009-08-05 17:45:00 UTC (rev 20792)
@@ -81,7 +81,7 @@
* \param duration The duration of the sweep, \f$T\f$.
* \param amplitude The amplitude of the sweep, \f$A\f$.
*/
- void init(double start_freq, double end_freq, double duration, double amplitude);
+ bool init(double start_freq, double end_freq, double duration, double amplitude);
private:
double amplitude_; /**< Amplitude of the sweep. */
Modified: pkg/trunk/controllers/control_toolbox/src/dither.cpp
===================================================================
--- pkg/trunk/controllers/control_toolbox/src/dither.cpp 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/control_toolbox/src/dither.cpp 2009-08-05 17:45:00 UTC (rev 20792)
@@ -34,7 +34,6 @@
// Original version: Kevin Watts <wa...@wi...>
-#include <math.h>
#include <control_toolbox/dither.h>
@@ -62,10 +61,15 @@
{
}
-void Dither::init(double amplitude)
+bool Dither::init(const ros::NodeHandle &n)
{
- //keep the amplitude around
- amplitude_ = amplitude;
+ if (!n.getParam("amplitude", amplitude_) || amplitude_ < 0.0)
+ {
+ ROS_ERROR("Dither amplitude not set properly.");
+ return false;
+ }
+
+ return true;
}
double Dither::update()
Modified: pkg/trunk/controllers/control_toolbox/src/sine_sweep.cpp
===================================================================
--- pkg/trunk/controllers/control_toolbox/src/sine_sweep.cpp 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/control_toolbox/src/sine_sweep.cpp 2009-08-05 17:45:00 UTC (rev 20792)
@@ -52,9 +52,13 @@
{
}
-void SineSweep::init(double start_freq, double end_freq, double duration, double amplitude)
+bool SineSweep::init(double start_freq, double end_freq, double duration, double amplitude)
{
- //keep the amplitude around
+ if (start_freq > end_freq)
+ return false;
+ if (duration < 0 || amplitude < 0)
+ return false;
+
amplitude_ = amplitude;
duration_ = duration;
//calculate the angular fequencies
@@ -67,6 +71,8 @@
//zero out the command
cmd_ = 0.0;
+
+ return true;
}
double SineSweep::update( double dt)
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h 2009-08-05 17:45:00 UTC (rev 20792)
@@ -47,20 +47,25 @@
*/
/***************************************************/
-
-#include <ros/node.h>
+#include <ros/ros.h>
#include <string>
#include <math.h>
#include <joint_qualification_controllers/RobotData.h>
-#include <realtime_tools/realtime_publisher.h>
#include <realtime_tools/realtime_srv_call.h>
#include <mechanism_control/controller.h>
+#include <boost/scoped_ptr.hpp>
-
-
namespace controller
{
+
+/***************************************************/
+/*! \class controller::CheckoutControllerNode
+ \brief Checkout Controller
+
+ */
+/***************************************************/
+
class CheckoutController : public Controller
{
@@ -73,66 +78,56 @@
/*!
* \brief Functional way to initialize.
* \param *robot The robot that is being controlled.
+ * \param &n NodeHandle of mechanism control
*/
- void init( double timeout, mechanism::RobotState *robot);
- bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
+ bool init( mechanism::RobotState *robot, const ros::NodeHandle &n);
-
/*!
- * \brief Perform the test analysis
+ * \brief Called when controller is started or restarted
*/
- void analysis(double time);
-
+ bool starting();
+
/*!
* \brief Checks joint, actuator status for calibrated and enabled.
*/
- virtual void update();
-
- bool done() { return state_ == DONE; }
+ void update();
- int joint_count_;
- int actuator_count_;
-
- joint_qualification_controllers::RobotData::Request robot_data_;
+ /*!
+ * \brief Sends data, returns true if sent
+ */
+ bool sendData();
-private:
+ /*!
+ * \brief Perform the test analysis
+ */
+ void analysis(double time);
+
+private:
mechanism::RobotState *robot_; /**< Pointer to robot structure. */
double initial_time_; /**< Start time of the test. */
double timeout_;
+
+ joint_qualification_controllers::RobotData::Request robot_data_;
int state_;
-};
+ int joint_count_;
+ int actuator_count_;
-/***************************************************/
-/*! \class controller::CheckoutControllerNode
- \brief Checkout Controller
+ bool done() { return state_ == DONE; }
- */
-/***************************************************/
+ bool data_sent_;
-class CheckoutControllerNode : public Controller
-{
-public:
+ double last_publish_time_;
- CheckoutControllerNode();
- ~CheckoutControllerNode();
+ // RT service call
+ boost::scoped_ptr<realtime_tools::RealtimeSrvCall<joint_qualification_controllers::RobotData::Request, joint_qualification_controllers::RobotData::Response> > call_service_;
+};
- void update();
- bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
-private:
- CheckoutController *c_;
- mechanism::RobotState *robot_;
-
- bool data_sent_;
-
- double last_publish_time_;
- realtime_tools::RealtimeSrvCall<joint_qualification_controllers::RobotData::Request, joint_qualification_controllers::RobotData::Response> call_service_;
-};
}
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h 2009-08-05 17:45:00 UTC (rev 20792)
@@ -46,10 +46,9 @@
#include <vector>
-#include <ros/node.h>
+#include <ros/ros.h>
#include <math.h>
#include <joint_qualification_controllers/HoldSetData.h>
-#include <realtime_tools/realtime_publisher.h>
#include <realtime_tools/realtime_srv_call.h>
#include <mechanism_control/controller.h>
#include <robot_mechanism_controllers/joint_position_controller.h>
@@ -73,54 +72,70 @@
/*!
* \brief Functional way to initialize.
- * \param velocity Target velocity for the velocity controller.
- * \param max_effort Effort to limit the controller at.
* \param *robot The robot that is being controlled.
+ * \param &n Node handle for parameters and services
*/
- void init( double test_duration, double time, std::string name, mechanism::RobotState *robot);
- bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
+ bool init( mechanism::RobotState *robot, const ros::NodeHandle &n);
/*!
* \brief Issues commands to the joint. Should be called at regular intervals
*/
+ void update();
- virtual void update();
-
+ bool starting();
+
+ bool sendData();
+
bool done() { return state_ == DONE; }
joint_qualification_controllers::HoldSetData::Request hold_set_data_;
private:
+ control_toolbox::Dither* lift_dither_;
+ control_toolbox::Dither* flex_dither_;
- std::vector<control_toolbox::Dither*> dithers_;
+ controller::JointPositionController* lift_controller_;
+ controller::JointPositionController* flex_controller_;
- std::vector<controller::JointPositionController*> joint_position_controllers_;
- std::vector<std::vector<double> > hold_set_;
+ mechanism::JointState* flex_state_;
+ mechanism::JointState* lift_state_;
- std::vector<mechanism::JointState*> joint_states_; /**< Joint we're controlling. */
mechanism::RobotState *robot_; /**< Pointer to robot structure. */
- uint num_joints_;
-
int starting_count_;
int state_;
- uint current_position_;
+ double lift_cmd_, flex_cmd_;
+
+
double initial_time_;
double settle_time_;
double start_time_;
double dither_time_;
+ double timeout_;
+ double lift_min_, lift_max_, lift_delta_;
+ double flex_min_, flex_max_, flex_delta_;
int dither_count_;
- double timeout_;
+ uint lift_index_;
+ uint flex_index_;
+
+ bool data_sent_;
+
+ boost::scoped_ptr<realtime_tools::RealtimeSrvCall<joint_qualification_controllers::HoldSetData::Request, joint_qualification_controllers::HoldSetData::Response> > call_service_;
+
+
};
+}
+
+
/***************************************************/
-/*! \class controller::HoldSetControllerNode
+/*! \class controller::HoldSetController
\brief Hold Set Controller
This holds a joint at a set of positions, measuring effort
@@ -184,25 +199,4 @@
*/
/***************************************************/
-class HoldSetControllerNode : public Controller
-{
-public:
- HoldSetControllerNode();
- ~HoldSetControllerNode();
-
- void update();
- bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
-
-private:
- HoldSetController *c_;
- mechanism::RobotState *robot_;
-
- bool data_sent_;
-
- double last_publish_time_;
- realtime_tools::RealtimeSrvCall<joint_qualification_controllers::HoldSetData::Request, joint_qualification_controllers::HoldSetData::Response> call_service_;
-};
-}
-
-
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h 2009-08-05 17:45:00 UTC (rev 20792)
@@ -44,16 +44,14 @@
*/
/***************************************************/
-
-#include <ros/node.h>
+#include <ros/ros.h>
+#include <string>
#include <math.h>
-#include <sstream>
-#include <diagnostic_msgs/DiagnosticMessage.h>
#include <joint_qualification_controllers/TestData.h>
-#include <realtime_tools/realtime_publisher.h>
#include <realtime_tools/realtime_srv_call.h>
#include <mechanism_control/controller.h>
#include <robot_mechanism_controllers/joint_velocity_controller.h>
+#include <boost/scoped_ptr.hpp>
namespace controller
{
@@ -69,13 +67,15 @@
/*!
* \brief Functional way to initialize.
- * \param velocity Target velocity for the velocity controller.
- * \param max_effort Effort to limit the controller at.
* \param *robot The robot that is being controlled.
+ * \param &n NodeHandle of mechanism control
*/
- void init( double velocity, double max_effort, double max_expected_effort, double min_expected_effort, double min_pos, double max_pos, double time, double timeout, double slope, std::string name, mechanism::RobotState *robot);
- bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
+ bool init(mechanism::RobotState *robot, const ros::NodeHandle &n);
+ /*!
+ * \brief Called when controller is started
+ */
+ bool starting();
/*!
* \brief Perform the test analysis
@@ -83,17 +83,20 @@
void analysis();
/*!
- * \brief Issues commands to the joint. Should be called at regular intervals
+ * \brief Issues commands to the joint to perform hysteresis test.
*/
+ void update();
- virtual void update();
+ /*!
+ * \brief Sends data, returns true if sent
+ */
+ bool sendData();
bool done() { return state_ == DONE; }
- diagnostic_msgs::DiagnosticMessage diagnostic_message_;
- joint_qualification_controllers::TestData::Request test_data_;
private:
+ joint_qualification_controllers::TestData::Request test_data_;
mechanism::JointState *joint_; /**< Joint we're controlling. */
mechanism::RobotState *robot_; /**< Pointer to robot structure. */
@@ -112,37 +115,13 @@
int state_;
int starting_count;
-};
-
-/***************************************************/
-/*! \class controller::HysteresisControllerNode
- \brief Hystersis Controller Node
-
- This tests the hysteresis of a joint using a
- velocity controller.
-
-*/
-/***************************************************/
-
-class HysteresisControllerNode : public Controller
-{
-public:
-
- HysteresisControllerNode();
- ~HysteresisControllerNode();
-
- void update();
- bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
-
-private:
- HysteresisController *c_;
- mechanism::RobotState *robot_;
-
bool data_sent_;
double last_publish_time_;
- realtime_tools::RealtimeSrvCall<joint_qualification_controllers::TestData::Request, joint_qualification_controllers::TestData::Response> call_service_;
+ // RT service call
+ boost::scoped_ptr<realtime_tools::RealtimeSrvCall<joint_qualification_controllers::TestData::Request, joint_qualification_controllers::TestData::Response> > call_service_;
+
};
}
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h 2009-08-05 17:45:00 UTC (rev 20792)
@@ -43,13 +43,13 @@
/***************************************************/
-#include <ros/node.h>
+#include <ros/ros.h>
#include <math.h>
#include <joint_qualification_controllers/TestData.h>
-#include <realtime_tools/realtime_publisher.h>
#include <realtime_tools/realtime_srv_call.h>
#include <mechanism_control/controller.h>
#include <control_toolbox/sine_sweep.h>
+#include <boost/scoped_ptr.hpp>
namespace controller
@@ -71,20 +71,20 @@
/*!
* \brief Functional way to initialize.
- * \param start_freq The start value of the sweep (Hz).
- * \param end_freq The end value of the sweep (Hz).
- * \param amplitude The amplitude of the sweep (N).
- * \param duration The duration in seconds from start to finish (s).
- * \param time The current hardware time.
* \param *robot The robot that is being controlled.
+ * \param &n NodeHandle of mechanism control
*/
- void init(double start_freq, double end_freq, double duration, double amplitude, double first_mode, double second_mode, double error_tolerance, double time, std::string name,mechanism::RobotState *robot);
- bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
+ bool init(mechanism::RobotState *robot, const ros::NodeHandle &n);
+ bool starting();
+
void analysis();
- virtual void update();
+ void update();
+
+ bool sendData();
bool done() { return done_ == 1; }
+
joint_qualification_controllers::TestData::Request test_data_;
private:
@@ -95,34 +95,10 @@
double initial_time_; /**< Start time of the sweep. */
int count_;
bool done_;
-
-};
-
-/***************************************************/
-/*! \class controller::SineSweepControllerNode
- \brief Sine Sweep Controller ROS Node
-
-*/
-/***************************************************/
-
-class SineSweepControllerNode : public Controller
-{
-public:
-
- SineSweepControllerNode();
- ~SineSweepControllerNode();
-
- void update();
- bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
-
-private:
- SineSweepController *c_;
- mechanism::RobotState *robot_;
bool data_sent_;
- double last_publish_time_;
- realtime_tools::RealtimeSrvCall<joint_qualification_controllers::TestData::Request, joint_qualification_controllers::TestData::Response> call_service_;
+ boost::scoped_ptr<realtime_tools::RealtimeSrvCall<joint_qualification_controllers::TestData::Request, joint_qualification_controllers::TestData::Response> >call_service_;
};
}
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml 2009-08-05 17:45:00 UTC (rev 20792)
@@ -1,17 +1,16 @@
<package>
<description brief='Joint Qualification Controllers'>
</description>
- <author> Melonee Wise</author>
+ <author> Melonee Wise, Kevin Watts</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<depend package="mechanism_model" />
<depend package="wg_robot_description_parser" />
<depend package="realtime_tools" />
<depend package="robot_msgs" />
-
+ <depend package="control_toolbox" />
+ <depend package="roscpp" />
<depend package="robot_mechanism_controllers" />
- <depend package="rospy" />
- <depend package="robot_msgs" />
<depend package="robot_srvs" />
<url>http://pr.willowgarage.com</url>
<rosdep name="wxwidgets"/>
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/HoldPositionData.msg
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/HoldPositionData.msg 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/HoldPositionData.msg 2009-08-05 17:45:00 UTC (rev 20792)
@@ -1 +1,3 @@
-JointPositionData[] joint_data
\ No newline at end of file
+float32 flex_position
+JointPositionData lift_hold
+JointPositionData flex_hold
Added: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/HoldRunData.msg
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/HoldRunData.msg (rev 0)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/HoldRunData.msg 2009-08-05 17:45:00 UTC (rev 20792)
@@ -0,0 +1,2 @@
+float32 lift_position
+HoldPositionData[] flex_data # Same lift position, diff flex
\ No newline at end of file
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/JointPositionData.msg
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/JointPositionData.msg 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/msg/JointPositionData.msg 2009-08-05 17:45:00 UTC (rev 20792)
@@ -1,4 +1,3 @@
-float32 desired
float32[] time
float32[] position
float32[] velocity
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/src/checkout_controller.cpp
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/src/checkout_controller.cpp 2009-08-05 17:40:29 UTC (rev 20791)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/src/checkout_controller.cpp 2009-08-05 17:45:00 UTC (rev 20792)
@@ -39,8 +39,10 @@
ROS_REGISTER_CONTROLLER(CheckoutController)
-CheckoutController::CheckoutController():
- robot_(NULL)
+CheckoutController::CheckoutController()
+: robot_(NULL),
+ data_sent_(false),
+ call_service_(NULL)
{
robot_data_.test_time = 0;
robot_data_.num_joints = 0;
@@ -57,7 +59,7 @@
{
}
-void CheckoutController::init( double timeout, mechanism::RobotState *robot)
+bool CheckoutController::init(mechanism::RobotState *robot, const ros::NodeHandle &n)
{
assert(robot);
robot_ = robot;
@@ -121,28 +123,21 @@
robot_data_.actuator_data[i].enabled = 0;
}
- timeout_ = timeout;
+ n.param("timeout", timeout_, 30.0);
initial_time_ = robot_->hw_->current_time_;
+
+ call_service_.reset(new realtime_tools::RealtimeSrvCall<joint_qualification_controllers::RobotData::Request, joint_qualification_controllers::RobotData::Response>(n, "/robot_checkout"));
+
+ return true;
}
-bool CheckoutController::initXml(mechanism::RobotState *robot, TiXmlElement *config)
+bool CheckoutController::starting()
{
- assert(robot);
-
- TiXmlElement *cd = config->FirstChildElement("controller_defaults");
- if (cd)
- {
- // Pull timeout attribute if it exists
- const char *time_char = cd->Attribute("timeout");
- double timeout = time_char ? atof(cd->Attribute("timeout")) : timeout_;
+ initial_time_ = robot_->hw_->current_time_;
- init(timeout, robot);
- }
- else
- {
- init(timeout_, robot);
- }
+ data_sent_ = false;
+
return true;
}
@@ -168,34 +163,21 @@
case LISTENING:
{
cal = true;
- for (int i = 0; i < joint_count_; i++)
+ for (int i = 0; i < joint_count_; ++i)
{
// Check for caster wheel joints and fingers
// Wheel joints and fingers don't calibrate, so don't wait for them
if (cal && (robot_->joint_states_[i].joint_->name_.find("wheel_joint") != string::npos))
- {
- //cal = true;
continue;
- }
+
if (cal && (robot_->joint_states_[i].joint_->name_.find("finger") != string::npos))
- {
- //cal = true;
continue;
- }
+
// Base joint is a dummy joint used to set up visualization
if (cal && robot_->joint_states_[i].joint_->name_ == "base_joint")
- {
- //cal = true;
continue;
- }
-
- //if (cal && robot_->joint_states_[i].calibrated_)
- // cal = true;
- //else
- // cal = false;
- // break;
if (!robot_->joint_states_[i].calibrated_)
{
@@ -207,11 +189,11 @@
enabled = true;
for (int i = 0; i < actuator_count_; i++)
{
- if (robot_->hw_->actuators_[i]->state_.is_enabled_ && enabled)
- enabled = true;
- else
+ if (!robot_->hw_->actuators_[i]->state_.is_enabled_)
+ {
enabled = false;
break;
+ }
}
if (cal && enabled)
@@ -224,11 +206,51 @@
state_ = DONE;
break;
case DONE:
+ if (!data_sent_)
+ data_sent_ = sendData();
+
+
break;
}
}
+bool CheckoutController::sendData()
+{
+ if (call_service_->trylock())
+ {
+ joint_qualification_controllers::RobotData::Request *out = &call_service_->srv_req_;
+ out->test_time = robot_data_.test_time;
+ out->num_joints = robot_data_.num_joints;
+ out->num_actuators = robot_data_.num_actuators;
+
+ out->joint_data.resize(robot_data_.num_joints);
+ out->actuator_data.resize(robot_data_.num_actuators);
+
+ for (int i = 0; i < joint_count_; i++)
+ {
+ out->joint_data[i].index = robot_data_.joint_data[i].index;
+ out->joint_data[i].name = robot_data_.joint_data[i].name;
+ out->joint_data[i].is_cal = robot_data_.joint_data[i].is_cal;
+ out->joint_data[i].has_safety = robot_data_.joint_data[i].has_safety;
+ out->joint_data[i].type = robot_data_.joint_data[i].type;
+ }
+
+ for (int i = 0; i < actuator_count_; i++)
+ {
+ out->actuator_data[i].index = robot_data_.actuator_data[i].index;
+ out->actuator_data[i].name = robot_data_.actuator_data[i].name;
+ out->actuator_data[i].id = robot_data_.actuator_data[i].id;
+ out->actuator_data[i].enabled = robot_data_.actuator_data[i].enabled;
+ }
+
+ call_service_->unlockAndCall();
+
+ return true;
+ }
+ return false;
+}
+
void CheckoutController::analysis(double time)
{
robot_data_.test_time = time;
@@ -242,68 +264,4 @@
return;
}
-ROS_REGISTER_CONTROLLER(CheckoutControllerNode)
-CheckoutControllerNode::CheckoutControllerNode()
-: data_sent_(false), last_publish_time_(0), call_service_("/robot_checkout")
-{
- c_ = new CheckoutController();
-}
-CheckoutControllerNode::~CheckoutControllerNode()
-{
- delete c_;
-}
-
-void CheckoutControllerNode::update()
-{
- c_->update();
-
- if (c_->done())
- {
- if(!data_sent_)
- {
- if (call_service_.trylock())
- {
- joint_qualification_controllers::RobotData::Request *out = &call_service_.srv_req_;
- out->test_time = c_->robot_data_.test_time;
- out->num_joints = c_->robot_data_.num_joints;
- out->num_actuators = c_->robot_data_.num_actuators;
-
- out->joint_data.resize(c_->robot_data_.num_joints);
- out->actuator_data.resize(c_->robot_data_.num_actuators);
-
- for (int i = 0; i < c_->joint_count_; i++)
- {
- out->joint_data[i].index = c_->robot_data_.joint_data[i].index;
- out->joint_data[i].name = c_->robot_data_.joint_data[i].name;
- out->joint_data[i].is_cal = c_->robot_data_.joint_data[i].is_cal;
- out->joint_data[i].has_safety = c_->robot_data_.joint_data[i].has_safety;
- out->joint_data[i].type = c_->robot_data_.joint_data[i].type;
- }
-
- for (int i = 0; i < c_->actuator_count_; i++)
- {
- out->actuator_data[i].index = c_->robot_data_.actuator_data[i].index;
- out->actuator_data[i].name = c_->robot_data_.actuator_data[i].name;
- out->actuator_data[i].id = c_->robot_data_.actuator_data[i].id;
- out->actuator_data[i].enabled = c_->robot_data_.actuator_data[i].enabled;
- }
-
- call_service_.unlockAndCall();
- data_sent_ = true;
- }
- }
- }
-}
-
-bool CheckoutControllerNode::initXml(mechanism::RobotState *robot, TiXmlElement *config)
-{
- assert(robot);
- robot_ = robot;
-
- if (!c_->initXml(robot, config))
- return false;
-
- return true;
-}
-
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/src/hold_set_controller.cpp
===================================================================
--- pkg/trunk/controllers/qualification_...
[truncated message content] |
|
From: <rdi...@us...> - 2009-08-05 18:49:36
|
Revision: 20803
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20803&view=rev
Author: rdiankov
Date: 2009-08-05 18:49:29 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
caminfo->camerainfo changes
Modified Paths:
--------------
pkg/trunk/openrave_planning/orrosplanning/src/objecttransformsystem.h
pkg/trunk/stacks/visual_feature_detectors/checkerboard_detector/checkerboard_detector.cpp
Modified: pkg/trunk/openrave_planning/orrosplanning/src/objecttransformsystem.h
===================================================================
--- pkg/trunk/openrave_planning/orrosplanning/src/objecttransformsystem.h 2009-08-05 18:40:36 UTC (rev 20802)
+++ pkg/trunk/openrave_planning/orrosplanning/src/objecttransformsystem.h 2009-08-05 18:49:29 UTC (rev 20803)
@@ -46,6 +46,7 @@
{
}
virtual ~ObjectTransformSystem() {
+ _tf.reset();
stopsubscriptions(); // need to stop the subscriptions because the virtual destructor will not call the overridden stopsubscriptions
ROSSensorSystem<checkerboard_detector::ObjectDetection, ObjectTransformXMLID>::Destroy();
}
Modified: pkg/trunk/stacks/visual_feature_detectors/checkerboard_detector/checkerboard_detector.cpp
===================================================================
--- pkg/trunk/stacks/visual_feature_detectors/checkerboard_detector/checkerboard_detector.cpp 2009-08-05 18:40:36 UTC (rev 20802)
+++ pkg/trunk/stacks/visual_feature_detectors/checkerboard_detector/checkerboard_detector.cpp 2009-08-05 18:49:29 UTC (rev 20803)
@@ -166,7 +166,7 @@
lasttime = ros::Time::now();
s_pmasternode->advertise<checkerboard_detector::ObjectDetection>("ObjectDetection",1);
- s_pmasternode->subscribe("CamInfo", _caminfomsg, &CheckerboardDetector::caminfo_cb,this,1);
+ s_pmasternode->subscribe("CameraInfo", _caminfomsg, &CheckerboardDetector::caminfo_cb,this,1);
s_pmasternode->subscribe("Image", _imagemsg, &CheckerboardDetector::image_cb,this,1);
}
~CheckerboardDetector()
@@ -176,7 +176,7 @@
if( intrinsic_matrix )
cvReleaseMat(&intrinsic_matrix);
- s_pmasternode->unsubscribe("CamInfo");
+ s_pmasternode->unsubscribe("CameraInfo");
s_pmasternode->unsubscribe("Image");
s_pmasternode->unadvertise("ObjectDetection");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hsu...@us...> - 2009-08-06 00:59:40
|
Revision: 20863
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20863&view=rev
Author: hsujohnhsu
Date: 2009-08-06 00:59:27 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
remove ikea objects from pr2_ogre.
Modified Paths:
--------------
pkg/trunk/demos/pr2_gazebo/manifest.xml
pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch
pkg/trunk/stacks/pr2/pr2_ogre/CMakeLists.txt
pkg/trunk/stacks/pr2/pr2_ogre/manifest.xml
pkg/trunk/stacks/simulators/gazebo/launch/balcony_world.launch
pkg/trunk/stacks/simulators/gazebo/launch/camera_world.launch
pkg/trunk/stacks/simulators/gazebo/launch/debug.launch
pkg/trunk/stacks/simulators/gazebo/launch/empty_world.launch
pkg/trunk/stacks/simulators/gazebo/launch/empty_world_no_x.launch
pkg/trunk/stacks/simulators/gazebo/launch/office_world.launch
pkg/trunk/stacks/simulators/gazebo/launch/scan_world.launch
pkg/trunk/stacks/simulators/gazebo/launch/simple_world.launch
pkg/trunk/stacks/simulators/gazebo/launch/slide_world.launch
pkg/trunk/stacks/simulators/gazebo/launch/wg_world.launch
Added Paths:
-----------
pkg/trunk/sandbox/ikea_ogre/
pkg/trunk/sandbox/ikea_ogre/CMakeLists.txt
pkg/trunk/sandbox/ikea_ogre/Makefile
pkg/trunk/sandbox/ikea_ogre/Media/
pkg/trunk/sandbox/ikea_ogre/Media/materials/
pkg/trunk/sandbox/ikea_ogre/Media/materials/scripts/
pkg/trunk/sandbox/ikea_ogre/Media/materials/scripts/pr2.material
pkg/trunk/sandbox/ikea_ogre/Media/materials/textures/
pkg/trunk/sandbox/ikea_ogre/Media/materials/textures/pr2_wheel_left.png
pkg/trunk/sandbox/ikea_ogre/Media/materials/textures/pr2_wheel_right.png
pkg/trunk/sandbox/ikea_ogre/Media/models/
pkg/trunk/sandbox/ikea_ogre/manifest.xml
Modified: pkg/trunk/demos/pr2_gazebo/manifest.xml
===================================================================
--- pkg/trunk/demos/pr2_gazebo/manifest.xml 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/demos/pr2_gazebo/manifest.xml 2009-08-06 00:59:27 UTC (rev 20863)
@@ -8,6 +8,7 @@
<depend package="gazebo_tools"/>
<depend package="teleop_arm_keyboard"/>
<depend package="pr2_ogre" />
+ <depend package="ikea_ogre" />
<depend package="gazebo_worlds"/>
<depend package="pr2_defs"/>
<depend package="pr2_default_controllers"/>
Modified: pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch
===================================================================
--- pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/demos/pr2_gazebo/pr2_default_controllers.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -7,5 +7,8 @@
<include file="$(find arm_gazebo)/controllers/l_arm_position_controller.launch" output="screen"/>
<include file="$(find arm_gazebo)/controllers/r_arm_position_controller.launch" output="screen"/>
+ <node pkg="mechanism_control" type="spawner.py" args="$(find pr2_default_controllers)/torso_lift_vel_controller.xml" output="screen" />
+
+
</launch>
Added: pkg/trunk/sandbox/ikea_ogre/CMakeLists.txt
===================================================================
--- pkg/trunk/sandbox/ikea_ogre/CMakeLists.txt (rev 0)
+++ pkg/trunk/sandbox/ikea_ogre/CMakeLists.txt 2009-08-06 00:59:27 UTC (rev 20863)
@@ -0,0 +1,34 @@
+cmake_minimum_required(VERSION 2.4.6)
+include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
+rospack(ikea_ogre)
+
+# find needed paths
+find_ros_package(ikea_objects)
+find_ros_package(ogre)
+
+MESSAGE(STATUS "\nikea_objects path ${ikea_objects_PACKAGE_PATH}\n")
+if(EXISTS ${ikea_objects_PACKAGE_PATH})
+ # build the ogre mesh files from *.stl (and *.stlb from convex decomposition)
+ file(GLOB ikea_objects_stl_files ${ikea_objects_PACKAGE_PATH}/meshes/convex/*.stlb)
+ set(ikea_objects_gen_files "")
+
+ set(ikea_objects_out_path ${CMAKE_CURRENT_SOURCE_DIR}/Media/models/ikea_objects)
+
+ MAKE_DIRECTORY(${ikea_objects_out_path})
+
+ foreach(it ${ikea_objects_stl_files})
+ get_filename_component(basename ${it} NAME)
+
+ # convert to ogre files
+ add_custom_command(
+ OUTPUT ${ikea_objects_out_path}/${basename}.mesh
+ COMMAND rosrun
+ ARGS ogre_tools stl_to_mesh ${it} ${ikea_objects_out_path}/${basename}.mesh
+ DEPENDS ${it})
+
+ set(ikea_objects_gen_files ${ikea_objects_gen_files} ${ikea_objects_out_path}/${basename}.mesh)
+ endforeach(it)
+
+ add_custom_target(ikea_objects_media_files ALL DEPENDS ${ikea_objects_gen_files})
+endif(EXISTS ${ikea_objects_PACKAGE_PATH})
+
Added: pkg/trunk/sandbox/ikea_ogre/Makefile
===================================================================
--- pkg/trunk/sandbox/ikea_ogre/Makefile (rev 0)
+++ pkg/trunk/sandbox/ikea_ogre/Makefile 2009-08-06 00:59:27 UTC (rev 20863)
@@ -0,0 +1 @@
+include $(shell rospack find mk)/cmake.mk
Added: pkg/trunk/sandbox/ikea_ogre/Media/materials/scripts/pr2.material
===================================================================
--- pkg/trunk/sandbox/ikea_ogre/Media/materials/scripts/pr2.material (rev 0)
+++ pkg/trunk/sandbox/ikea_ogre/Media/materials/scripts/pr2.material 2009-08-06 00:59:27 UTC (rev 20863)
@@ -0,0 +1,366 @@
+material PR2/floor_texture
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture map3.png
+ tex_address_mode clamp
+ }
+ }
+ }
+}
+
+material PR2/wall_texture
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture willowMap.png
+ tex_address_mode clamp
+ }
+ }
+ }
+}
+
+material PR2/wheel_right
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_right.png
+ }
+ }
+ }
+}
+
+material PR2/wheel_left
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_left.png
+ }
+ }
+ }
+}
+
+
+
+material PR2/fr_caster_l_wheel_link
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_right.png
+ }
+ }
+ }
+}
+
+material PR2/fl_caster_l_wheel_link
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_left.png
+ }
+ }
+ }
+}
+material PR2/br_caster_l_wheel_link
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_right.png
+ }
+ }
+ }
+}
+
+material PR2/bl_caster_l_wheel_link
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_left.png
+ }
+ }
+ }
+}
+
+
+material PR2/fr_caster_r_wheel_link
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_right.png
+ }
+ }
+ }
+}
+
+material PR2/fl_caster_r_wheel_link
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_left.png
+ }
+ }
+ }
+}
+material PR2/br_caster_r_wheel_link
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_right.png
+ }
+ }
+ }
+}
+
+material PR2/bl_caster_r_wheel_link
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_left.png
+ }
+ }
+ }
+}
+
+
+material PR2/RollLinks
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture pr2_wheel_left.png
+ }
+ }
+ }
+}
+
+material PR2/Shiny
+{
+ technique
+ {
+ pass
+ {
+ ambient 0.75 0.75 0.75
+ texture_unit
+ {
+ texture plug_texture.jpg
+ env_map spherical
+ }
+ }
+ }
+}
+
+material PR2/Plug
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture plug_texture.jpg
+ }
+ }
+ }
+}
+
+material PR2/Jack
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture jack_texture.jpg
+ }
+ }
+ }
+}
+
+material PR2/Outlet
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture outlet_texture.jpg
+ }
+ }
+ }
+}
+
+
+material PR2/White
+{
+ receive_shadows on
+ lighting on
+
+ technique
+ {
+ pass
+ {
+ ambient 0.5 0.5 0.5 1.0
+ diffuse 1.0 1.0 1.0 1.0
+ specular 1.0 1.0 1.0 1.0
+ shading gouraud
+ }
+ }
+}
+
+
+
+material PR2/Blue
+{
+ receive_shadows on
+
+ technique
+ {
+ pass
+ {
+ ambient 0.000000 0.000000 0.200000 1.000000
+ diffuse 0.000000 0.000000 0.800000 1.000000
+ specular 0.000000 0.000000 0.200000 1.000000
+ emissive 0.000000 0.000000 0.000000 1.000000
+ shading gouraud
+ }
+ }
+}
+
+material PR2/Grey2
+{
+ receive_shadows on
+ lighting on
+
+ technique
+ {
+ pass
+ {
+ ambient 0.5 0.5 0.5 1.0
+ diffuse 0.9 0.9 0.9 1.0
+ specular 0.8 0.8 0.8 1
+ lighting on
+ }
+ }
+}
+
+material PR2/Grey
+{
+ receive_shadows on
+ lighting on
+
+ technique
+ {
+ pass
+ {
+ ambient 0.1 0.1 0.1 1.0
+ diffuse 0.7 0.7 0.7 1.0
+ specular 0.8 0.8 0.8 1
+ }
+ }
+}
+
+material PR2/Yellow
+{
+ receive_shadows on
+
+ technique
+ {
+ pass
+ {
+ ambient 0.200000 0.200000 0.000000 1.000000
+ diffuse 0.800000 0.800000 0.000000 1.000000
+ specular 0.200000 0.200000 0.000000 1.000000
+ emissive 0.000000 0.000000 0.000000 1.000000
+ lighting on
+ }
+ }
+}
+
+material PR2/Red
+{
+ receive_shadows on
+ technique
+ {
+ pass
+ {
+ ambient 0.200000 0.000000 0.000000 1.000000
+ diffuse 0.800000 0.000000 0.000000 1.000000
+ specular 0.200000 0.000000 0.000000 1.000000
+ emissive 0.000000 0.000000 0.000000 1.000000
+ lighting on
+ shading phong
+ }
+ }
+}
+
+material PR2/Green
+{
+ receive_shadows on
+
+ technique
+ {
+ pass
+ {
+ ambient 0.000000 0.200000 0.000000 1.000000
+ diffuse 0.000000 0.800000 0.000000 1.000000
+ specular 0.000000 0.200000 0.000000 1.000000
+ emissive 0.000000 0.000000 0.000000 0.000000
+ lighting on
+ shading phong
+ }
+ }
+}
+
Added: pkg/trunk/sandbox/ikea_ogre/Media/materials/textures/pr2_wheel_left.png
===================================================================
(Binary files differ)
Property changes on: pkg/trunk/sandbox/ikea_ogre/Media/materials/textures/pr2_wheel_left.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: pkg/trunk/sandbox/ikea_ogre/Media/materials/textures/pr2_wheel_right.png
===================================================================
(Binary files differ)
Property changes on: pkg/trunk/sandbox/ikea_ogre/Media/materials/textures/pr2_wheel_right.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: pkg/trunk/sandbox/ikea_ogre/manifest.xml
===================================================================
--- pkg/trunk/sandbox/ikea_ogre/manifest.xml (rev 0)
+++ pkg/trunk/sandbox/ikea_ogre/manifest.xml 2009-08-06 00:59:27 UTC (rev 20863)
@@ -0,0 +1,19 @@
+<package>
+
+ <description brief="Ikea Objects Ogre Mesh Files">
+
+ This package contains Ikea objects Ogre mesh files used for visualization and collision as
+ defined at Willow Garage.
+
+ </description>
+ <author>John Hsu</author>
+ <license>BSD</license>
+ <review status="unreviewed" notes=""/>
+
+ <depend package="convex_decomposition"/>
+ <depend package="ivcon"/>
+ <depend package="ogre_tools"/>
+ <depend package="ikea_objects"/>
+ <url>http://pr.willowgarage.com/wiki/RobotDescriptionFormat</url>
+
+</package>
Modified: pkg/trunk/stacks/pr2/pr2_ogre/CMakeLists.txt
===================================================================
--- pkg/trunk/stacks/pr2/pr2_ogre/CMakeLists.txt 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/pr2/pr2_ogre/CMakeLists.txt 2009-08-06 00:59:27 UTC (rev 20863)
@@ -51,30 +51,3 @@
add_custom_target(media_files ALL DEPENDS ${pr2_gen_files})
-find_ros_package(ikea_objects)
-MESSAGE(STATUS "\nikea_objects path ${ikea_objects_PACKAGE_PATH}\n")
-if(EXISTS ${ikea_objects_PACKAGE_PATH})
- # build the ogre mesh files from *.stl (and *.stlb from convex decomposition)
- file(GLOB ikea_objects_stl_files ${ikea_objects_PACKAGE_PATH}/meshes/convex/*.stlb)
- set(ikea_objects_gen_files "")
-
- set(ikea_objects_out_path ${CMAKE_CURRENT_SOURCE_DIR}/Media/models/ikea_objects)
-
- MAKE_DIRECTORY(${ikea_objects_out_path})
-
- foreach(it ${ikea_objects_stl_files})
- get_filename_component(basename ${it} NAME)
-
- # convert to ogre files
- add_custom_command(
- OUTPUT ${ikea_objects_out_path}/${basename}.mesh
- COMMAND rosrun
- ARGS ogre_tools stl_to_mesh ${it} ${ikea_objects_out_path}/${basename}.mesh
- DEPENDS ${it})
-
- set(ikea_objects_gen_files ${ikea_objects_gen_files} ${ikea_objects_out_path}/${basename}.mesh)
- endforeach(it)
-
- add_custom_target(ikea_objects_media_files ALL DEPENDS ${ikea_objects_gen_files})
-endif(EXISTS ${ikea_objects_PACKAGE_PATH})
-
Modified: pkg/trunk/stacks/pr2/pr2_ogre/manifest.xml
===================================================================
--- pkg/trunk/stacks/pr2/pr2_ogre/manifest.xml 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/pr2/pr2_ogre/manifest.xml 2009-08-06 00:59:27 UTC (rev 20863)
@@ -14,7 +14,6 @@
<depend package="convex_decomposition"/>
<depend package="ivcon"/>
<depend package="ogre_tools"/>
- <depend package="ikea_objects"/>
<url>http://pr.willowgarage.com/wiki/RobotDescriptionFormat</url>
</package>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/balcony_world.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/balcony_world.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/balcony_world.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -5,7 +5,7 @@
<node pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/balcony.world" respawn="false" output="screen">
<env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/lib:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/camera_world.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/camera_world.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/camera_world.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -5,7 +5,7 @@
<node pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/camera.world" respawn="false" output="screen">
<env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/lib:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/debug.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/debug.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/debug.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -8,7 +8,7 @@
-->
<node pkg="gazebo" launch-prefix="gdb --args" type="gazebo" args="$(find gazebo_worlds)/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:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/empty_world.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/empty_world.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/empty_world.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -9,7 +9,7 @@
-->
<node pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty.world" respawn="false" >
<env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/lib:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/empty_world_no_x.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/empty_world_no_x.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/empty_world_no_x.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -5,7 +5,7 @@
<node pkg="gazebo" launch-prefix="xvfb-run" type="gazebo" args="-g $(find gazebo_worlds)/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:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/office_world.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/office_world.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/office_world.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -5,7 +5,7 @@
<node pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/simple_office.world" respawn="false" output="screen">
<env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/lib:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/scan_world.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/scan_world.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/scan_world.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -5,7 +5,7 @@
<node pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/scan.world" respawn="false" output="screen">
<env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/lib:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/simple_world.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/simple_world.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/simple_world.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -5,7 +5,7 @@
<node pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/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:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/slide_world.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/slide_world.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/slide_world.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -5,7 +5,7 @@
<node pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/slide.world" respawn="false" output="screen">
<env name="LD_LIBRARY_PATH" value="$(find gazebo_plugin)/lib:$(find gazebo)/gazebo/lib:$(find Cg)/Cg/lib:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
Modified: pkg/trunk/stacks/simulators/gazebo/launch/wg_world.launch
===================================================================
--- pkg/trunk/stacks/simulators/gazebo/launch/wg_world.launch 2009-08-06 00:30:47 UTC (rev 20862)
+++ pkg/trunk/stacks/simulators/gazebo/launch/wg_world.launch 2009-08-06 00:59:27 UTC (rev 20863)
@@ -5,7 +5,7 @@
<node pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/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:$(optenv LD_LIBRARY_PATH)" />
- <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
+ <env name="GAZEBO_RESOURCE_PATH" value="$(find pr2_ogre):$(find ikea_ogre):$(find gazebo_worlds):$(find gazebo)/gazebo/share/gazebo" />
<env name="OGRE_RESOURCE_PATH" value="$(find ogre)/ogre/lib/OGRE" />
</node>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2009-08-06 01:09:21
|
Revision: 20864
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20864&view=rev
Author: syrnick
Date: 2009-08-06 01:09:14 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
Added an explicit delay between the messages for the bagserver
Created full test for the functional_m3n classifier. It runs training, reloads the model, makes predictions and computes performance.
Modified Paths:
--------------
pkg/trunk/sandbox/functional_m3n_ros/CMakeLists.txt
pkg/trunk/sandbox/functional_m3n_ros/include/functional_m3n_ros/m3n_prediction_node.h
pkg/trunk/sandbox/functional_m3n_ros/manifest.xml
pkg/trunk/sandbox/functional_m3n_ros/src/m3n_learning_node.cpp
pkg/trunk/sandbox/functional_m3n_ros/src/m3n_prediction_node.cpp
pkg/trunk/sandbox/functional_m3n_ros/test_data/m3n_predictor.launch
pkg/trunk/util/bagserver/src/bagserver_srv.py
Added Paths:
-----------
pkg/trunk/sandbox/functional_m3n_ros/performance_notes.txt
pkg/trunk/sandbox/functional_m3n_ros/srv/QueryPerformanceStats.srv
pkg/trunk/sandbox/functional_m3n_ros/srv/SetModel.srv
pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training.launch
pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training.xml
pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training_1.py
Property Changed:
----------------
pkg/trunk/sandbox/functional_m3n_ros/test_data/
Modified: pkg/trunk/sandbox/functional_m3n_ros/CMakeLists.txt
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/CMakeLists.txt 2009-08-06 00:59:27 UTC (rev 20863)
+++ pkg/trunk/sandbox/functional_m3n_ros/CMakeLists.txt 2009-08-06 01:09:14 UTC (rev 20864)
@@ -35,3 +35,13 @@
rospack_add_executable (m3n_learning_node src/m3n_learning_node.cpp)
target_link_libraries (m3n_learning_node functional_m3n)
rospack_link_boost(m3n_learning_node filesystem)
+
+
+rospack_download_test_data(http://pr.willowgarage.com/data/${PROJECT_NAME}/pcd_all_1.bag test_data/pcd_all_1.bag)
+rospack_download_test_data(http://pr.willowgarage.com/data/${PROJECT_NAME}/pcd_all_1.index test_data/pcd_all_1.index)
+rospack_download_test_data(http://pr.willowgarage.com/data/${PROJECT_NAME}/pcd_test_1.bag test_data/pcd_test_1.bag)
+rospack_download_test_data(http://pr.willowgarage.com/data/${PROJECT_NAME}/pcd_train_1.bag test_data/pcd_train_1.bag)
+
+#rospack_add_rostest(test/test_full_training.xml)
+
+
Modified: pkg/trunk/sandbox/functional_m3n_ros/include/functional_m3n_ros/m3n_prediction_node.h
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/include/functional_m3n_ros/m3n_prediction_node.h 2009-08-06 00:59:27 UTC (rev 20863)
+++ pkg/trunk/sandbox/functional_m3n_ros/include/functional_m3n_ros/m3n_prediction_node.h 2009-08-06 01:09:14 UTC (rev 20864)
@@ -55,6 +55,9 @@
#include <functional_m3n/m3n_model.h>
+#include <functional_m3n_ros/SetModel.h>
+#include <functional_m3n_ros/QueryPerformanceStats.h>
+
namespace m3n
{
@@ -67,7 +70,12 @@
PredictionNode();
void cloudCallback(const sensor_msgs::PointCloudConstPtr& the_cloud);
+ bool setModel(functional_m3n_ros::SetModel::Request &req,
+ functional_m3n_ros::SetModel::Response &res );
+ bool queryPerformanceStats(
+ functional_m3n_ros::QueryPerformanceStats::Request &req,
+ functional_m3n_ros::QueryPerformanceStats::Response &res );
boost::shared_ptr<PtCloudRFCreator> rf_creator_;
bool use_colors_;
@@ -76,9 +84,25 @@
M3NModel m3n_model2;
std::string model_file_name_;
+ std::string ground_truth_channel_name_;
+
ros::Subscriber cloud_sub_;
ros::Publisher cloud_pub_;
+ ros::ServiceServer set_model_svc_;
+ ros::ServiceServer query_perf_stats_svc_;
+
+ unsigned int nbr_correct;
+ unsigned int nbr_gt;
+ double total_accuracy;
+
+ void computeClassificationRates(const vector<float>& inferred_labels, const vector<float>& gt_labels,
+ const vector<unsigned int>& labels,
+ unsigned int& nbr_correct,
+ unsigned int& nbr_gt,
+ double& accuracy);
+
+
};
Modified: pkg/trunk/sandbox/functional_m3n_ros/manifest.xml
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/manifest.xml 2009-08-06 00:59:27 UTC (rev 20863)
+++ pkg/trunk/sandbox/functional_m3n_ros/manifest.xml 2009-08-06 01:09:14 UTC (rev 20864)
@@ -16,6 +16,7 @@
<depend package="opencv_latest"/>
<depend package="object_names"/>
+ <depend package="bagserver"/>
</package>
Added: pkg/trunk/sandbox/functional_m3n_ros/performance_notes.txt
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/performance_notes.txt (rev 0)
+++ pkg/trunk/sandbox/functional_m3n_ros/performance_notes.txt 2009-08-06 01:09:14 UTC (rev 20864)
@@ -0,0 +1,4 @@
+Train: pcd_train_1.bag
+Train acc: 0.892634
+Test acc: 0.709794
+
Modified: pkg/trunk/sandbox/functional_m3n_ros/src/m3n_learning_node.cpp
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/src/m3n_learning_node.cpp 2009-08-06 00:59:27 UTC (rev 20863)
+++ pkg/trunk/sandbox/functional_m3n_ros/src/m3n_learning_node.cpp 2009-08-06 01:09:14 UTC (rev 20864)
@@ -114,7 +114,6 @@
{
ROS_INFO("Received learning command, starting to learn");
-
boost::filesystem::path model_base_path(model_file_path_);
if(~boost::filesystem::exists(model_base_path))
{
Modified: pkg/trunk/sandbox/functional_m3n_ros/src/m3n_prediction_node.cpp
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/src/m3n_prediction_node.cpp 2009-08-06 00:59:27 UTC (rev 20863)
+++ pkg/trunk/sandbox/functional_m3n_ros/src/m3n_prediction_node.cpp 2009-08-06 01:09:14 UTC (rev 20864)
@@ -61,17 +61,54 @@
cloud_pub_ = n_.advertise<PointCloud>("predictions_cloud",100);
+ n_.param(std::string("~ground_truth_channel"),ground_truth_channel_name_,std::string("NONE"));
+
if (m3n_model2.loadFromFile(model_file_name_) < 0)
{
ROS_ERROR("couldnt load model");
throw "ERR";
}
+
+ set_model_svc_ = n_.advertiseService(std::string("SetModel"), &PredictionNode::setModel,this);
+
+ query_perf_stats_svc_ = n_.advertiseService(std::string("Performance"), &PredictionNode::queryPerformanceStats,this);
+
+ nbr_correct=0;
+ nbr_gt=0;
+ total_accuracy=0.0;
+
ROS_INFO("Init done.");
+
}
+bool PredictionNode::queryPerformanceStats(
+ functional_m3n_ros::QueryPerformanceStats::Request &req,
+ functional_m3n_ros::QueryPerformanceStats::Response &res )
+{
+ res.accuracy = total_accuracy;
+ res.correct_weight = (double)nbr_correct;
+ res.checked_weight = (double)nbr_gt;
+ return true;
+}
+bool PredictionNode::setModel(functional_m3n_ros::SetModel::Request &req,
+ functional_m3n_ros::SetModel::Response &res )
+{
+ model_file_name_=req.model_reference;
+ ROS_INFO_STREAM("Loading new model "<<model_file_name_);
+ if (m3n_model2.loadFromFile(model_file_name_) < 0)
+ {
+ ROS_ERROR("couldnt load model");
+ }
+ nbr_correct=0;
+ nbr_gt=0;
+ total_accuracy=0.0;
+ return true;
+}
+
+
void PredictionNode::cloudCallback(const PointCloudConstPtr& the_cloud)
{
@@ -154,13 +191,116 @@
}
}
+
+ int chan_gt=cloud_geometry::getChannelIndex(the_cloud,ground_truth_channel_name_);
+ if(chan_gt!=-1)
+ {
+ unsigned int nbr_correct_in_pcd;
+ unsigned int nbr_gt_in_pcd;
+ double accuracy;
+ computeClassificationRates( cloud_out.chan[chan_predictions_id].vals,
+ the_cloud->chan[chan_gt].vals,
+ m3n_model2.getTrainingLabels(),
+ nbr_correct_in_pcd,
+ nbr_gt_in_pcd,
+ accuracy);
+ nbr_correct += nbr_correct_in_pcd;
+ nbr_gt += nbr_gt_in_pcd;
+ if(nbr_gt==0)
+ {
+ total_accuracy=0.0;
+ }
+ else
+ {
+ total_accuracy = static_cast<double>(nbr_correct)/static_cast<double>(nbr_gt);
+ }
+ ROS_INFO("Total correct: %u / %u = %f", nbr_correct, nbr_gt, total_accuracy);
+
+ }
+
+
cloud_pub_.publish(cloud_out);
}
+void PredictionNode::computeClassificationRates(const vector<float>& inferred_labels, const vector<float>& gt_labels,
+ const vector<unsigned int>& labels,
+ unsigned int& nbr_correct,
+ unsigned int& nbr_gt,
+ double& accuracy)
+ {
+ // Initialize counters for each label
+ // (map: label -> counter)
+ std::map<unsigned int, unsigned int> total_label_count; // how many nodes with gt label
+ std::map<unsigned int, unsigned int> correct_label_count; // how many correctly classified
+ std::map<unsigned int, unsigned int> false_pos_label_count; // how many wrongly classified
+ for (unsigned int i = 0 ; i < labels.size() ; i++)
+ {
+ total_label_count[labels[i]] = 0;
+ correct_label_count[labels[i]] = 0;
+ false_pos_label_count[labels[i]] = 0;
+ }
+ // Holds the total number of nodes correctly classified
+ nbr_correct = 0;
+ nbr_gt = 0;
+
+ // Count the total and per-label number correctly classified
+ unsigned int curr_node_id = 0;
+ unsigned int curr_gt_label = 0;
+ unsigned int curr_infer_label = 0;
+ vector<unsigned int>::const_iterator iter_predictions;
+ for (unsigned int i=0;i<inferred_labels.size();i++)
+ {
+ curr_gt_label = (unsigned int)gt_labels[i];
+ curr_infer_label = (unsigned int)inferred_labels[i];
+
+ total_label_count[curr_gt_label]++;
+ if(curr_gt_label==0)
+ {
+ continue;
+ }
+
+ nbr_gt++;
+ if (curr_gt_label == curr_infer_label)
+ {
+ nbr_correct++;
+ correct_label_count[curr_gt_label]++;
+ }
+ else
+ {
+ false_pos_label_count[curr_infer_label]++;
+ }
+ }
+
+ // Print statistics
+ if(nbr_gt==0)
+ {
+ accuracy=0.0;
+ }
+ else
+ {
+ accuracy = static_cast<double>(nbr_correct)/static_cast<double>(nbr_gt);
+ }
+
+
+ ROS_INFO("Total correct: %u / %u = %f", nbr_correct, nbr_gt, accuracy);
+ stringstream ss;
+ ss << "Label distribution: ";
+ unsigned int curr_label = 0;
+ for (unsigned int i = 0 ; i < labels.size() ; i++)
+ {
+ curr_label = labels[i];
+ ss << "[" << curr_label << ": " << correct_label_count[curr_label] << "/"
+ << total_label_count[curr_label] << " (" << false_pos_label_count[curr_label] << ")] ";
+ }
+ ROS_INFO("%s", ss.str().c_str());
+ }
+
+
+
/* ---[ */
int
main (int argc, char** argv)
Added: pkg/trunk/sandbox/functional_m3n_ros/srv/QueryPerformanceStats.srv
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/srv/QueryPerformanceStats.srv (rev 0)
+++ pkg/trunk/sandbox/functional_m3n_ros/srv/QueryPerformanceStats.srv 2009-08-06 01:09:14 UTC (rev 20864)
@@ -0,0 +1,4 @@
+---
+float64 accuracy
+float64 correct_weight
+float64 checked_weight
\ No newline at end of file
Added: pkg/trunk/sandbox/functional_m3n_ros/srv/SetModel.srv
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/srv/SetModel.srv (rev 0)
+++ pkg/trunk/sandbox/functional_m3n_ros/srv/SetModel.srv 2009-08-06 01:09:14 UTC (rev 20864)
@@ -0,0 +1,4 @@
+string model_type
+string model_name
+string model_reference
+---
Added: pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training.launch
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training.launch (rev 0)
+++ pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training.launch 2009-08-06 01:09:14 UTC (rev 20864)
@@ -0,0 +1,24 @@
+<launch>
+
+
+ <node pkg="functional_m3n_ros" type="m3n_learning_node" name="fm3n_training" output="screen">
+ <param name="model_file_path" value="$(find functional_m3n_ros)/test_data/test_model_root/"/>
+ </node>
+
+ <node pkg="functional_m3n_ros" type="m3n_prediction_node" name="fm3n_predictor" output="screen">
+ <remap from="cloud" to="/hist/training_cloud"/>
+ </node>
+ <node pkg="bagserver" type="bagserver_srv.py" name="hist_server" output="screen">
+ <param name="namespace" value="hist"/>
+ <param name="index" value="$(find functional_m3n_ros)/test_data/pcd_all_1.index"/>
+ <param name="message_publishing_delay" value="0.5"/>
+ </node>
+
+
+ <node pkg="rosrecord" type="rosplay" args="-s 1 $(find functional_m3n_ros)/test_data/pcd_train_1.bag" output="screen"/>
+
+ <node pkg="functional_m3n_ros" type="test_full_training_1.py" name="test_executive" output="screen"/>
+
+
+
+</launch>
Added: pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training.xml
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training.xml (rev 0)
+++ pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training.xml 2009-08-06 01:09:14 UTC (rev 20864)
@@ -0,0 +1,24 @@
+<launch>
+
+
+ <node pkg="functional_m3n_ros" type="m3n_learning_node" name="fm3n_training" output="screen">
+ <param name="model_file_path" value="$(find functional_m3n_ros)/test_data/test_model_root/"/>
+ </node>
+
+ <node pkg="functional_m3n_ros" type="m3n_prediction_node" name="fm3n_predictor" output="screen">
+ <remap from="cloud" to="/hist/training_cloud"/>
+ </node>
+ <node pkg="bagserver" type="bagserver_srv.py" name="hist_server" output="screen">
+ <param name="namespace" value="hist"/>
+ <param name="index" value="$(find functional_m3n_ros)/test_data/pcd_all_1.index"/>
+ <param name="message_publishing_delay" value="0.5"/>
+ </node>
+
+
+ <node pkg="rosrecord" type="rosplay" args="-s 1 $(find functional_m3n_ros)/test_data/pcd_train_1.bag" output="screen"/>
+
+ <test test-name="functional_m3n_basic" pkg="functional_m3n_ros" type="test_full_training_1.py" name="test_executive" time-limit="600"/>
+
+
+
+</launch>
Added: pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training_1.py
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training_1.py (rev 0)
+++ pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training_1.py 2009-08-06 01:09:14 UTC (rev 20864)
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+# Software License Agreement (BSD License)
+#
+# Copyright (c) 2009, Willow Garage, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of 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.
+
+PKG = 'functional_m3n_ros'
+import roslib; roslib.load_manifest(PKG)
+
+import rospy
+
+import unittest
+
+from functional_m3n_ros.srv import *
+from bagserver.srv import *
+
+class FullTestLearningBasic(unittest.TestCase):
+
+
+ def testLearningSimple(self):
+ rospy.sleep(5);
+ rospy.wait_for_service('/learn')
+
+ learn_proxy = rospy.ServiceProxy('learn', Learn)
+ model_name="test_model_%s" % str(rospy.get_rostime());
+ result=learn_proxy(model_name);
+
+ print model_name
+ print result
+ predictor_proxy = rospy.ServiceProxy('SetModel', SetModel)
+ predictor_performance = rospy.ServiceProxy('Performance', QueryPerformanceStats)
+
+ set_model_resul=predictor_proxy(result.model_type,
+ model_name,
+ result.model_reference);
+
+ play_history = rospy.ServiceProxy('hist', History)
+
+ begin=rospy.Time(1247098041,895116000);
+ end =rospy.Time(1247098087,908848000);
+ play_history(begin,end,"ALL")
+ rospy.sleep(10);
+
+ perf1=predictor_performance();
+
+ rospy.loginfo("Accuracy %f (%f of %f )" %(perf1.accuracy,perf1.correct_weight,perf1.checked_weight))
+
+ self.failIf(perf1.accuracy<0.8);
+
+ set_model_resul=predictor_proxy(result.model_type,
+ model_name,
+ result.model_reference);
+
+ begin=rospy.Time( 1247098100, 316937000);
+ end =rospy.Time( 1247098133, 726237000);
+
+ play_history(begin,end,"ALL")
+
+ rospy.sleep(10);
+ perf2=predictor_performance();
+ rospy.loginfo("Accuracy %f (%f of %f )" %(perf2.accuracy,perf2.correct_weight,perf2.checked_weight))
+
+ self.failIf(perf2.accuracy<0.7);
+
+from threading import Thread
+
+if __name__ == "__main__":
+ import rostest
+ rospy.init_node("test_content");
+
+ rostest.rosrun('functional_m3n_ros','test_full_training_1',FullTestLearningBasic)
+
Property changes on: pkg/trunk/sandbox/functional_m3n_ros/test/test_full_training_1.py
___________________________________________________________________
Added: svn:executable
+ *
Property changes on: pkg/trunk/sandbox/functional_m3n_ros/test_data
___________________________________________________________________
Added: svn:ignore
+ pcd_all_1.index
pcd_all_1.bag
pcd_train_1.bag
pcd_test_1.bag
Modified: pkg/trunk/sandbox/functional_m3n_ros/test_data/m3n_predictor.launch
===================================================================
--- pkg/trunk/sandbox/functional_m3n_ros/test_data/m3n_predictor.launch 2009-08-06 00:59:27 UTC (rev 20863)
+++ pkg/trunk/sandbox/functional_m3n_ros/test_data/m3n_predictor.launch 2009-08-06 01:09:14 UTC (rev 20864)
@@ -1,13 +1,13 @@
<launch>
- <node pkg="functional_m3n_ros" type="m3n_prediction_node" name="fm3n_learner" output="screen"
- launch-prefix="xterm -e gdb -args"
+ <node pkg="functional_m3n_ros" type="m3n_prediction_node" name="fm3n_predictor" output="screen"
>
<!-- launch-prefix="xterm -e gdb -args" -->
<param name="use_color" value="True"/>
+ <param name="ground_truth_channel" value="ann-w-env-layer-1p"/>
- <param name="model_file" value="$(find functional_m3n_ros)/test_data/test_model_root/test_model_1248938712259804010/f_m3n"/>
+ <param name="model_file" value="$(find functional_m3n_ros)/test_data/test_model_root/test_model_1249495947974724054/f_m3n"/>
<!--param name="model_file" value="$(find functional_m3n_ros)/test_data/test_model_root/test_model_1248824163850214958/f_m3n" -->
<!--param name="model_file" value="$(find functional_m3n_ros)/test_data/test_model_root/test_model_1248845007846792936/f_m3n"-->
Modified: pkg/trunk/util/bagserver/src/bagserver_srv.py
===================================================================
--- pkg/trunk/util/bagserver/src/bagserver_srv.py 2009-08-06 00:59:27 UTC (rev 20863)
+++ pkg/trunk/util/bagserver/src/bagserver_srv.py 2009-08-06 01:09:14 UTC (rev 20864)
@@ -61,6 +61,7 @@
self.out_namespace=rospy.get_param("~namespace");
self.index_name_=rospy.get_param("~index");
+ self.pub_delay_=rospy.get_param("~message_publishing_delay",0);
self.setup_hist();
@@ -185,7 +186,7 @@
self.active_topics={};
if not req.topic == "":
- if req.topic =="*":
+ if req.topic =="*" or req.topic =="ALL":
topic_filter_dict=None;
else:
topic_filter_dict={};
@@ -223,7 +224,7 @@
def handle_query(self,req):
- rospy.logdebug(" Query %s - %s " % (req.begin,req.end))
+ rospy.loginfo(" Query %s - %s " % (req.begin,req.end))
self.setll(req);
@@ -234,6 +235,7 @@
if rospy.is_shutdown():
break
nextT=self.pick_next_topic();
+
if nextT is None:
break
(sec,nsec,idx,file_pos,topic,iBag)=self.active_topics[nextT]
@@ -252,7 +254,10 @@
sim_time.rostime.secs=sec;
sim_time.rostime.nsecs=nsec;
self.time_pub_.publish(sim_time)
- rospy.sleep(0.00001)
+ if self.pub_delay_>0:
+ rospy.sleep(self.pub_delay_);
+ else:
+ rospy.sleep(0.00001)
self.advance_topic(nextT,req.end)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <is...@us...> - 2009-08-06 20:11:02
|
Revision: 20925
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20925&view=rev
Author: isucan
Date: 2009-08-06 20:10:39 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
adding definition for acceptable contacts
Modified Paths:
--------------
pkg/trunk/highlevel/move_arm/CMakeLists.txt
pkg/trunk/highlevel/move_arm/manifest.xml
pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp
pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp
pkg/trunk/highlevel/move_arm/test/oscillate_move.cpp
pkg/trunk/stacks/pr2/pr2_robot_actions/manifest.xml
Added Paths:
-----------
pkg/trunk/highlevel/move_arm/msg/
pkg/trunk/highlevel/move_arm/msg/AcceptableContact.msg
pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg
pkg/trunk/highlevel/move_arm/msg/MoveArmState.msg
Removed Paths:
-------------
pkg/trunk/stacks/pr2/pr2_robot_actions/msg/MoveArmGoal.msg
pkg/trunk/stacks/pr2/pr2_robot_actions/msg/MoveArmState.msg
Modified: pkg/trunk/highlevel/move_arm/CMakeLists.txt
===================================================================
--- pkg/trunk/highlevel/move_arm/CMakeLists.txt 2009-08-06 20:09:46 UTC (rev 20924)
+++ pkg/trunk/highlevel/move_arm/CMakeLists.txt 2009-08-06 20:10:39 UTC (rev 20925)
@@ -6,6 +6,8 @@
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
+genmsg()
+
# main executable
rospack_add_executable(move_arm_action src/move_arm_action.cpp)
rospack_link_boost(move_arm_action thread)
Modified: pkg/trunk/highlevel/move_arm/manifest.xml
===================================================================
--- pkg/trunk/highlevel/move_arm/manifest.xml 2009-08-06 20:09:46 UTC (rev 20924)
+++ pkg/trunk/highlevel/move_arm/manifest.xml 2009-08-06 20:10:39 UTC (rev 20925)
@@ -14,11 +14,19 @@
<depend package="std_msgs"/>
<depend package="robot_msgs"/>
<depend package="motion_planning_msgs"/>
+ <depend package="geometry_msgs"/>
+ <depend package="mapping_msgs"/>
<depend package="manipulation_srvs"/>
<depend package="visualization_msgs"/>
+ <depend package="geometric_shapes" />
<depend package="planning_models" />
<depend package="planning_environment" />
<depend package="robot_actions"/>
<depend package="pr2_robot_actions"/>
<depend package="pr2_mechanism_controllers"/>
+
+ <export>
+ <cpp cflags="-I${prefix}/msg/cpp" />
+ </export>
+
</package>
Added: pkg/trunk/highlevel/move_arm/msg/AcceptableContact.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/AcceptableContact.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/AcceptableContact.msg 2009-08-06 20:10:39 UTC (rev 20925)
@@ -0,0 +1,14 @@
+# This message defines a region of space where contacts
+# with certain links are allowed, up to a certain depth
+
+# The shape of the bound where contacts are allowed
+mapping_msgs/Object bound
+
+# The pose of the box defining the region where contacts are allowed
+geometry_msgs/PoseStamped pose
+
+# The set of links that are allowed to touch obstacles
+string[] links
+
+# The maximum penetration depth
+float64 depth
Copied: pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg (from rev 20909, pkg/trunk/stacks/pr2/pr2_robot_actions/msg/MoveArmGoal.msg)
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg 2009-08-06 20:10:39 UTC (rev 20925)
@@ -0,0 +1,10 @@
+# The goal state for the model to plan for. The state is not necessarily explicit.
+# The goal is considered achieved if all the constraints are satisfied.
+# An explicit state can be specified by setting joint constraints to a specific value.
+motion_planning_msgs/KinematicConstraints goal_constraints
+
+# The set of constraints that need to be satisfied by the entire solution path.
+motion_planning_msgs/KinematicConstraints path_constraints
+
+# The set of allowed contacts
+AcceptableContact[] contacts
Property changes on: pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg
___________________________________________________________________
Added: svn:mergeinfo
+ /pkg/branches/gazebo-branch-merge/highlevel/pr2_robot_actions/msg/MoveArmGoal.msg:15683-15684,15739-15794,15797-15820,15822-15839,15852-15870,15983-16008,16010-16016,16129-16141,16145-16169,16245-16262,16274-16334
Copied: pkg/trunk/highlevel/move_arm/msg/MoveArmState.msg (from rev 20909, pkg/trunk/stacks/pr2/pr2_robot_actions/msg/MoveArmState.msg)
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmState.msg (rev 0)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmState.msg 2009-08-06 20:10:39 UTC (rev 20925)
@@ -0,0 +1,9 @@
+# Status
+robot_actions/ActionStatus status
+
+MoveArmGoal goal
+
+int32 PLANNING=1 # when arm is stopped and planning is being performed
+int32 MOVING=2 # when we are executing a plan
+
+int32 feedback
Property changes on: pkg/trunk/highlevel/move_arm/msg/MoveArmState.msg
___________________________________________________________________
Added: svn:mergeinfo
+ /pkg/branches/gazebo-branch-merge/highlevel/pr2_robot_actions/msg/MoveArmState.msg:15683-15684,15739-15794,15797-15820,15822-15839,15852-15870,15983-16008,16010-16016,16129-16141,16145-16169,16245-16262,16274-16334
Modified: pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp
===================================================================
--- pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp 2009-08-06 20:09:46 UTC (rev 20924)
+++ pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp 2009-08-06 20:10:39 UTC (rev 20925)
@@ -42,8 +42,8 @@
#include <planning_environment/monitors/kinematic_model_state_monitor.h>
#include <motion_planning_msgs/KinematicPath.h>
#include <manipulation_srvs/IKService.h>
-#include <pr2_robot_actions/MoveArmGoal.h>
-#include <pr2_robot_actions/MoveArmState.h>
+#include <move_arm/MoveArmGoal.h>
+#include <move_arm/MoveArmState.h>
#include <pr2_robot_actions/ActuateGripperState.h>
#include <std_msgs/Float64.h>
@@ -100,7 +100,7 @@
std::cout << " -rotation [x, y, z, w] = [" << q.x() << ", " << q.y() << ", " << q.z() << ", " << q.w() << "]" << std::endl;
}
-void goalToState(const pr2_robot_actions::MoveArmGoal &goal, planning_models::StateParams &sp)
+void goalToState(const move_arm::MoveArmGoal &goal, planning_models::StateParams &sp)
{
for (unsigned int i = 0 ; i < goal.goal_constraints.joint_constraint.size() ; ++i)
{
@@ -109,7 +109,7 @@
}
}
-btTransform effPosition(const planning_environment::KinematicModelStateMonitor &km, const pr2_robot_actions::MoveArmGoal &goal)
+btTransform effPosition(const planning_environment::KinematicModelStateMonitor &km, const move_arm::MoveArmGoal &goal)
{
planning_models::StateParams sp(*km.getRobotState());
goalToState(goal, sp);
@@ -117,19 +117,19 @@
return km.getKinematicModel()->getJoint(goal.goal_constraints.joint_constraint.back().joint_name)->after->globalTrans;
}
-void printConfig(const pr2_robot_actions::MoveArmGoal &goal)
+void printConfig(const move_arm::MoveArmGoal &goal)
{
for (unsigned int i = 0 ; i < goal.goal_constraints.joint_constraint.size(); ++i)
std::cout << " " << goal.goal_constraints.joint_constraint[i].joint_name << " = " << goal.goal_constraints.joint_constraint[i].value[0] << std::endl;
}
-void printConfigs(const std::map<std::string, pr2_robot_actions::MoveArmGoal> &goals)
+void printConfigs(const std::map<std::string, move_arm::MoveArmGoal> &goals)
{
- for (std::map<std::string, pr2_robot_actions::MoveArmGoal>::const_iterator it = goals.begin() ; it != goals.end() ; ++it)
+ for (std::map<std::string, move_arm::MoveArmGoal>::const_iterator it = goals.begin() ; it != goals.end() ; ++it)
std::cout << " " << it->first << std::endl;
}
-void setupGoal(const std::vector<std::string> &names, pr2_robot_actions::MoveArmGoal &goal)
+void setupGoal(const std::vector<std::string> &names, move_arm::MoveArmGoal &goal)
{
goal.goal_constraints.joint_constraint.resize(names.size());
for (unsigned int i = 0 ; i < goal.goal_constraints.joint_constraint.size(); ++i)
@@ -146,7 +146,7 @@
}
}
-void setupGoalEEf(const std::string &link, const std::vector<double> &pz, pr2_robot_actions::MoveArmGoal &goal)
+void setupGoalEEf(const std::string &link, const std::vector<double> &pz, move_arm::MoveArmGoal &goal)
{
goal.goal_constraints.pose_constraint.resize(1);
goal.goal_constraints.pose_constraint[0].type = motion_planning_msgs::PoseConstraint::POSITION_X + motion_planning_msgs::PoseConstraint::POSITION_Y + motion_planning_msgs::PoseConstraint::POSITION_Z +
@@ -167,7 +167,7 @@
goal.goal_constraints.pose_constraint[0].position_tolerance_above.y = 0.005;
goal.goal_constraints.pose_constraint[0].position_tolerance_above.z = 0.01;
goal.goal_constraints.pose_constraint[0].position_tolerance_below.x = 0.005;
- goal.goal_constraints.pose_constraint[0].position_tolerance_below.y = 0.01;
+ goal.goal_constraints.pose_constraint[0].position_tolerance_below.y = 0.005;
goal.goal_constraints.pose_constraint[0].position_tolerance_below.z = 0.005;
goal.goal_constraints.pose_constraint[0].orientation_tolerance_above.x = 0.005;
@@ -177,10 +177,10 @@
goal.goal_constraints.pose_constraint[0].orientation_tolerance_below.y = 0.005;
goal.goal_constraints.pose_constraint[0].orientation_tolerance_below.z = 0.005;
- goal.goal_constraints.pose_constraint[0].orientation_importance = 0.01;
+ goal.goal_constraints.pose_constraint[0].orientation_importance = 0.2;
}
-void setConfig(const planning_models::StateParams *_sp, const std::vector<std::string> &names, pr2_robot_actions::MoveArmGoal &goal)
+void setConfig(const planning_models::StateParams *_sp, const std::vector<std::string> &names, move_arm::MoveArmGoal &goal)
{
setupGoal(names, goal);
planning_models::StateParams sp(*_sp);
@@ -192,7 +192,7 @@
}
}
-void diffConfig(const planning_environment::KinematicModelStateMonitor &km, pr2_robot_actions::MoveArmGoal &goal)
+void diffConfig(const planning_environment::KinematicModelStateMonitor &km, move_arm::MoveArmGoal &goal)
{
std::vector<std::string> names;
for (unsigned int i = 0 ; i < goal.goal_constraints.joint_constraint.size(); ++i)
@@ -204,7 +204,7 @@
}
btTransform pose1 = effPosition(km, goal);
- pr2_robot_actions::MoveArmGoal temp;
+ move_arm::MoveArmGoal temp;
setConfig(km.getRobotState(), names, temp);
btTransform pose2 = effPosition(km, temp);
std::cout << std::endl;
@@ -236,7 +236,7 @@
view.publish(kp);
}
-void setConfigJoint(const unsigned int pos, const double value, pr2_robot_actions::MoveArmGoal &goal)
+void setConfigJoint(const unsigned int pos, const double value, move_arm::MoveArmGoal &goal)
{
goal.goal_constraints.joint_constraint[pos].value[0] = value;
}
@@ -256,12 +256,12 @@
arm = "l";
ros::NodeHandle nh;
- robot_actions::ActionClient<pr2_robot_actions::MoveArmGoal, pr2_robot_actions::MoveArmState, int32_t> move_arm(arm == "r" ? "move_right_arm" : "move_left_arm");
+ robot_actions::ActionClient<move_arm::MoveArmGoal, move_arm::MoveArmState, int32_t> move_arm(arm == "r" ? "move_right_arm" : "move_left_arm");
robot_actions::ActionClient<std_msgs::Float64, pr2_robot_actions::ActuateGripperState, std_msgs::Float64> gripper(arm == "r" ? "actuate_gripper_right_arm" : "actuate_gripper_left_arm");
ros::Publisher view = nh.advertise<motion_planning_msgs::KinematicPath>("display_kinematic_path", 1);
int32_t feedback;
- std::map<std::string, pr2_robot_actions::MoveArmGoal> goals;
+ std::map<std::string, move_arm::MoveArmGoal> goals;
std::vector<std::string> names(7);
names[0] = arm + "_shoulder_pan_joint";
@@ -315,7 +315,7 @@
else
if (cmd == "current")
{
- pr2_robot_actions::MoveArmGoal temp;
+ move_arm::MoveArmGoal temp;
setConfig(km.getRobotState(), names, temp);
printConfig(temp);
std::cout << std::endl;
@@ -525,7 +525,7 @@
std::string link = km.getKinematicModel()->getJoint(names.back())->after->name;
std::cout << "Moving " << link << " to " << nrs[0] << ", " << nrs[1] << ", " << nrs[2] << ", " <<
nrs[3] << ", " << nrs[4] << ", " << nrs[5] << ", " << nrs[6] << "..." << std::endl;
- pr2_robot_actions::MoveArmGoal g;
+ move_arm::MoveArmGoal g;
setupGoalEEf(link, nrs, g);
if (move_arm.execute(g, feedback, ros::Duration(allowed_time)) != robot_actions::SUCCESS)
std::cerr << "Failed achieving goal" << std::endl;
Modified: pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp
===================================================================
--- pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp 2009-08-06 20:09:46 UTC (rev 20924)
+++ pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp 2009-08-06 20:10:39 UTC (rev 20925)
@@ -40,8 +40,8 @@
#include <robot_actions/action.h>
#include <robot_actions/action_runner.h>
-#include <pr2_robot_actions/MoveArmState.h>
-#include <pr2_robot_actions/MoveArmGoal.h>
+#include <move_arm/MoveArmState.h>
+#include <move_arm/MoveArmGoal.h>
#include <manipulation_msgs/JointTraj.h>
#include <manipulation_srvs/IKService.h>
@@ -57,6 +57,9 @@
#include <visualization_msgs/Marker.h>
#include <planning_environment/monitors/planning_monitor.h>
+#include <planning_environment/util/construct_object.h>
+#include <geometric_shapes/bodies.h>
+
#include <algorithm>
#include <cstdlib>
@@ -147,27 +150,9 @@
if (unsafe_paths_)
ROS_WARN("Paths will NOT be monitored for collision once they have been sent to the controller");
- std::string touch;
- nodeHandle_.param<std::string>("~allowed_touch", touch, std::string());
- std::stringstream ss(touch);
- while (ss.good() & !ss.eof())
- {
- std::string link; ss >> link;
- allowedTouch_[link] = true;
- }
-
- if (!touch.empty())
- ROS_INFO("Touching is allowed for links: %s", touch.c_str());
- else
- ROS_INFO("No link is allowed to touch objects");
-
- nodeHandle_.param<double>("~max_penetration_depth", maxPenetrationDepth_, 0.0);
- if (!touch.empty())
- ROS_INFO("Maximum penetration depth is %f", maxPenetrationDepth_);
-
return true;
}
-
+
protected:
bool getControlJointNames(std::vector<std::string> &joint_names)
@@ -234,30 +219,24 @@
bool unsafe_paths_;
bool show_collisions_;
- /// the set of links that are allowed to touch objects
- std::map<std::string, bool> allowedTouch_;
-
- /// the maximum penetration allowed when touching objects
- double maxPenetrationDepth_;
-
};
-class MoveArm : public robot_actions::Action<pr2_robot_actions::MoveArmGoal, int32_t>
+class MoveArm : public robot_actions::Action<move_arm::MoveArmGoal, int32_t>
{
public:
- MoveArm(MoveBodyCore &core) : Action<pr2_robot_actions::MoveArmGoal, int32_t>("move_" + core.group_), core_(core)
+ MoveArm(MoveBodyCore &core) : Action<move_arm::MoveArmGoal, int32_t>("move_" + core.group_), core_(core)
{
if (core_.show_collisions_)
visMarkerPublisher_ = core_.nodeHandle_.advertise<visualization_msgs::Marker>("visualization_marker", 128);
// advertise the topic for displaying kinematic plans
- displayPathPublisher_ = core_.nodeHandle_.advertise<motion_planning_msgs::KinematicPath>("display_kinematic_path", 10);
+ displayPathPublisher_ = core_.nodeHandle_.advertise<motion_planning_msgs::KinematicPath>("executing_kinematic_path", 10);
- validatingPath_ = false;
planningMonitor_ = core_.planningMonitor_;
- planningMonitor_->setOnCollisionContactCallback(boost::bind(&MoveArm::contactFound, this, _1), 0);
+ tf_ = &core_.tf_;
+
planningMonitor_->getEnvironmentModel()->setVerbose(false);
}
@@ -266,32 +245,126 @@
}
private:
+
+ struct AllowedContact
+ {
+ boost::shared_ptr<bodies::Body> bound;
+ std::vector<std::string> links;
+ double depth;
+ };
+ // construct a list of states with cost
+ struct CostState
+ {
+ planning_models::StateParams *state;
+ double cost;
+ unsigned int index;
+ };
+
+ struct CostStateOrder
+ {
+ bool operator()(const CostState& a, const CostState& b) const
+ {
+ return a.cost < b.cost;
+ }
+ };
+
+ struct CollisionCost
+ {
+ CollisionCost(void)
+ {
+ cost = 0.0;
+ sum = 0.0;
+ }
+
+ double cost;
+ double sum;
+ };
+
+
+ /** \brief The allowed, ccost and display arguments should be bound by the caller. This is a callback function that gets called by the planning
+ * environment when a collision is found */
+ void contactFound(const std::vector<AllowedContact> &allowed, CollisionCost &ccost, bool display, collision_space::EnvironmentModel::Contact &contact)
+ {
+ double cdepth = fabs(contact.depth);
+
+ if (contact.link1 && contact.link2) // self colliison
+ ccost.cost = INFINITY;
+ else
+ {
+ if (contact.link1 || contact.link2)
+ {
+ std::string link = contact.link1 ? contact.link1->name : contact.link2->name;
+ double thisDepth = INFINITY;
+
+ for (unsigned int i = 0 ; i < allowed.size() ; ++i)
+ if (allowed[i].bound->containsPoint(contact.pos) && cdepth < allowed[i].depth)
+ {
+ for (unsigned int j = 0 ; j < allowed[i].links.size() ; ++j)
+ if (allowed[i].links[j] == link)
+ {
+ if (thisDepth > cdepth)
+ thisDepth = cdepth;
+ break;
+ }
+ }
+
+ if (thisDepth > ccost.cost)
+ ccost.cost = thisDepth;
+ }
+ }
+
+ ccost.sum += cdepth;
+
+
+ if (display)
+ {
+ static int count = 0;
+ visualization_msgs::Marker mk;
+ mk.header.stamp = planningMonitor_->lastMapUpdate();
+ mk.header.frame_id = planningMonitor_->getFrameId();
+ mk.ns = ros::this_node::getName();
+ mk.id = count++;
+ mk.type = visualization_msgs::Marker::SPHERE;
+ mk.action = visualization_msgs::Marker::ADD;
+ mk.pose.position.x = contact.pos.x();
+ mk.pose.position.y = contact.pos.y();
+ mk.pose.position.z = contact.pos.z();
+ mk.pose.orientation.w = 1.0;
+
+ mk.scale.x = mk.scale.y = mk.scale.z = 0.03;
+
+ mk.color.a = 0.6;
+ mk.color.r = 1.0;
+ mk.color.g = 0.04;
+ mk.color.b = 0.04;
+
+ mk.lifetime = ros::Duration(30.0);
+
+ visMarkerPublisher_.publish(mk);
+ }
+ }
+
/** \brief Evaluate the cost of a state, in terms of collisions */
double computeStateCollisionCost(const planning_models::StateParams *sp)
{
- // clear collision data where callback adds to
- collisionCost_ = 0.0;
- collisionLinks_.clear();
-
+ std::vector<AllowedContact> allowed; // leave this empty
+ CollisionCost ccost;
+
+ planningMonitor_->setOnCollisionContactCallback(boost::bind(&MoveArm::contactFound, this, allowed, ccost, false, _1), 0);
+
// check for collision, getting all contacts
planningMonitor_->isStateValid(sp, planning_environment::PlanningMonitor::COLLISION_TEST);
- return evaluateLastCollisionCost();
+ planningMonitor_->setOnCollisionContactCallback(NULL);
+
+ return ccost.sum;
}
-
- /** \brief Evaluate the cost of the last set of collision checks */
- double evaluateLastCollisionCost(void)
- {
- // check we are only touching with allowed links
- for (std::map<std::string, int>::iterator it = collisionLinks_.begin() ; it != collisionLinks_.end() ; ++it)
- if (core_.allowedTouch_.find(it->first) == core_.allowedTouch_.end())
- return INFINITY;
- return collisionCost_;
- }
+
/** \brief If we have a complex goal for which we have not yet found a valid goal state, we use this function*/
- robot_actions::ResultStatus solveGoalComplex(std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
+ robot_actions::ResultStatus solveGoalComplex(const std::vector<AllowedContact> &allowed,
+ std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal with unknown valid goal state ...");
@@ -339,7 +412,7 @@
// update the goal constraints for the planning monitor as well
planningMonitor_->setGoalConstraints(req.goal_constraints);
- return runLRplanner(req, feedback);
+ return runLRplanner(allowed, req, feedback);
}
else
{
@@ -357,7 +430,7 @@
// update the goal constraints for the planning monitor as well
planningMonitor_->setGoalConstraints(req.goal_constraints);
- robot_actions::ResultStatus result = runLRplanner(req, feedback);
+ robot_actions::ResultStatus result = runLRplanner(allowed, req, feedback);
req.goal_constraints = kc;
planningMonitor_->setGoalConstraints(req.goal_constraints);
@@ -365,24 +438,24 @@
// if reaching the intermediate state was succesful
if (result == robot_actions::SUCCESS)
// run the short range planner to the original goal
- return runSRplanner(states, req, feedback);
+ return runSRplanner(allowed, states, req, feedback);
else
return result;
}
}
else
- return runLRplanner(states, req, feedback);
+ return runLRplanner(allowed, states, req, feedback);
}
else
{
ROS_ERROR("Service for searching for valid states failed");
- return runLRplanner(states, req, feedback);
+ return runLRplanner(allowed, states, req, feedback);
}
}
/** \brief Extract the state specified by the goal and run a planner towards it, if it is valid */
- robot_actions::ResultStatus solveGoalJoints(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus solveGoalJoints(const std::vector<AllowedContact> &allowed, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal to set of joints ...");
@@ -398,32 +471,16 @@
// try to skip straight to planning
if (planningMonitor_->isStateValidAtGoal(sp.get()))
- return runLRplanner(req, feedback);
+ return runLRplanner(allowed, req, feedback);
else
{
// if we can't, go to the more generic joint solver
std::vector< boost::shared_ptr<planning_models::StateParams> > states;
states.push_back(sp);
- return solveGoalJoints(states, req, feedback);
+ return solveGoalJoints(allowed, states, req, feedback);
}
}
-
- // construct a list of states with cost
- struct myState
- {
- planning_models::StateParams *state;
- double cost;
- unsigned int index;
- };
-
- struct myStateComp
- {
- bool operator()(const myState& a, const myState& b) const
- {
- return a.cost < b.cost;
- }
- };
-
+
void updateRequest(motion_planning_msgs::GetMotionPlan::Request &req, const planning_models::StateParams *sp)
{
// update request
@@ -445,16 +502,17 @@
}
/** \brief Find a plan to given request, given a set of hint states in the goal region */
- robot_actions::ResultStatus solveGoalJoints(std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
+ robot_actions::ResultStatus solveGoalJoints(const std::vector<AllowedContact> &allowed,
+ std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal to set of joints pointing to potentially invalid state ...");
// just in case we received no states (this should not happen)
if (states.empty())
- return solveGoalComplex(states, req, feedback);
+ return solveGoalComplex(allowed, states, req, feedback);
- std::vector<myState> cstates(states.size());
+ std::vector<CostState> cstates(states.size());
for (unsigned int i = 0 ; i < states.size() ; ++i)
{
@@ -464,7 +522,7 @@
}
// find the state with minimal cost
- std::sort(cstates.begin(), cstates.end(), myStateComp());
+ std::sort(cstates.begin(), cstates.end(), CostStateOrder());
for (unsigned int i = 0 ; i < cstates.size() ; ++i)
ROS_DEBUG("Cost of hint state %d is %f", i, cstates[i].cost);
@@ -472,7 +530,7 @@
if (planningMonitor_->isStateValidAtGoal(cstates[0].state))
{
updateRequest(req, cstates[0].state);
- return runLRplanner(req, feedback);
+ return runLRplanner(allowed, req, feedback);
}
else
{
@@ -480,7 +538,7 @@
std::vector< boost::shared_ptr<planning_models::StateParams> > backup = states;
for (unsigned int i = 0 ; i < cstates.size() ; ++i)
states[i] = backup[cstates[i].index];
- return solveGoalComplex(states, req, feedback);
+ return solveGoalComplex(allowed, states, req, feedback);
}
}
@@ -494,7 +552,7 @@
reach a maximal number of steps. If we have candidate
solutions, we forward this to the joint-goal solver. If not,
the complex goal solver is to be used. */
- robot_actions::ResultStatus solveGoalPose(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus solveGoalPose(const std::vector<AllowedContact> &allowed, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal to pose ...");
@@ -535,13 +593,13 @@
}
if (states.empty())
- return solveGoalComplex(states, req, feedback);
+ return solveGoalComplex(allowed, states, req, feedback);
else
- return solveGoalJoints(states, req, feedback);
+ return solveGoalJoints(allowed, states, req, feedback);
}
/** \brief Depending on the type of constraint, decide whether or not to use IK, decide which planners to use */
- robot_actions::ResultStatus solveGoal(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus solveGoal(const std::vector<AllowedContact> &allowed, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal...");
@@ -551,30 +609,31 @@
req.goal_constraints.pose_constraint[0].type ==
motion_planning_msgs::PoseConstraint::POSITION_X + motion_planning_msgs::PoseConstraint::POSITION_Y + motion_planning_msgs::PoseConstraint::POSITION_Z +
motion_planning_msgs::PoseConstraint::ORIENTATION_R + motion_planning_msgs::PoseConstraint::ORIENTATION_P + motion_planning_msgs::PoseConstraint::ORIENTATION_Y) // that is active on all 6 DOFs
- return solveGoalPose(req, feedback);
+ return solveGoalPose(allowed, req, feedback);
// if we have only joint constraints, we call the method that gets us to a goal state
if (req.goal_constraints.pose_constraint.empty())
- return solveGoalJoints(req, feedback);
+ return solveGoalJoints(allowed, req, feedback);
// otherwise, more complex constraints, run a generic method; we have no hint states
std::vector< boost::shared_ptr<planning_models::StateParams> > states;
- return solveGoalComplex(states, req, feedback);
+ return solveGoalComplex(allowed, states, req, feedback);
}
- robot_actions::ResultStatus runLRplanner(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus runLRplanner(const std::vector<AllowedContact> &allowed, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
std::vector< boost::shared_ptr<planning_models::StateParams> > states;
- return runLRplanner(states, req, feedback);
+ return runLRplanner(allowed, states, req, feedback);
}
- robot_actions::ResultStatus runLRplanner(std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
+ robot_actions::ResultStatus runLRplanner(const std::vector<AllowedContact> &allowed,
+ std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Running long range planner...");
ros::ServiceClient clientPlan = core_.nodeHandle_.serviceClient<motion_planning_msgs::GetMotionPlan>(LR_MOTION_PLAN_NAME, true);
- robot_actions::ResultStatus result = runPlanner(clientPlan, req, feedback);
+ robot_actions::ResultStatus result = runPlanner(clientPlan, allowed, req, feedback);
// if the planner aborted and we have an idea about an invalid state that
// may be in the goal region, we make one last try using the short range planner
@@ -583,25 +642,27 @@
// set the goal to be a state
ROS_INFO("Trying again with a state in the goal region (although the state is invalid)...");
updateRequest(req, states[0].get());
- result = runPlanner(clientPlan, req, feedback);
+ result = runPlanner(clientPlan, allowed, req, feedback);
}
return result;
}
- robot_actions::ResultStatus runSRplanner(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus runSRplanner(const std::vector<AllowedContact> &allowed,
+ motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
std::vector< boost::shared_ptr<planning_models::StateParams> > states;
- return runSRplanner(states, req, feedback);
+ return runSRplanner(allowed, states, req, feedback);
}
- robot_actions::ResultStatus runSRplanner(std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
+ robot_actions::ResultStatus runSRplanner(const std::vector<AllowedContact> &allowed,
+ std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Running short range planner...");
ros::ServiceClient clientPlan = core_.nodeHandle_.serviceClient<motion_planning_msgs::GetMotionPlan>(SR_MOTION_PLAN_NAME, true);
- robot_act...
[truncated message content] |
|
From: <is...@us...> - 2009-08-06 20:16:22
|
Revision: 20927
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20927&view=rev
Author: isucan
Date: 2009-08-06 20:15:38 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
moved the acceptable contacts message
Modified Paths:
--------------
pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg
pkg/trunk/motion_planning/motion_planning_msgs/manifest.xml
pkg/trunk/motion_planning/motion_planning_msgs/msg/KinematicSpaceParameters.msg
Added Paths:
-----------
pkg/trunk/motion_planning/motion_planning_msgs/msg/AcceptableContact.msg
Removed Paths:
-------------
pkg/trunk/highlevel/move_arm/msg/AcceptableContact.msg
Deleted: pkg/trunk/highlevel/move_arm/msg/AcceptableContact.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/AcceptableContact.msg 2009-08-06 20:13:33 UTC (rev 20926)
+++ pkg/trunk/highlevel/move_arm/msg/AcceptableContact.msg 2009-08-06 20:15:38 UTC (rev 20927)
@@ -1,14 +0,0 @@
-# This message defines a region of space where contacts
-# with certain links are allowed, up to a certain depth
-
-# The shape of the bound where contacts are allowed
-mapping_msgs/Object bound
-
-# The pose of the box defining the region where contacts are allowed
-geometry_msgs/PoseStamped pose
-
-# The set of links that are allowed to touch obstacles
-string[] links
-
-# The maximum penetration depth
-float64 depth
Modified: pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg
===================================================================
--- pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg 2009-08-06 20:13:33 UTC (rev 20926)
+++ pkg/trunk/highlevel/move_arm/msg/MoveArmGoal.msg 2009-08-06 20:15:38 UTC (rev 20927)
@@ -7,4 +7,4 @@
motion_planning_msgs/KinematicConstraints path_constraints
# The set of allowed contacts
-AcceptableContact[] contacts
+motion_planning_msgs/AcceptableContact[] contacts
Modified: pkg/trunk/motion_planning/motion_planning_msgs/manifest.xml
===================================================================
--- pkg/trunk/motion_planning/motion_planning_msgs/manifest.xml 2009-08-06 20:13:33 UTC (rev 20926)
+++ pkg/trunk/motion_planning/motion_planning_msgs/manifest.xml 2009-08-06 20:15:38 UTC (rev 20927)
@@ -11,6 +11,7 @@
<depend package="std_msgs"/>
<depend package="geometry_msgs"/>
+ <depend package="mapping_msgs"/>
<export>
<cpp cflags="-I${prefix}/msg/cpp -I${prefix}/srv/cpp"/>
Copied: pkg/trunk/motion_planning/motion_planning_msgs/msg/AcceptableContact.msg (from rev 20925, pkg/trunk/highlevel/move_arm/msg/AcceptableContact.msg)
===================================================================
--- pkg/trunk/motion_planning/motion_planning_msgs/msg/AcceptableContact.msg (rev 0)
+++ pkg/trunk/motion_planning/motion_planning_msgs/msg/AcceptableContact.msg 2009-08-06 20:15:38 UTC (rev 20927)
@@ -0,0 +1,14 @@
+# This message defines a region of space where contacts
+# with certain links are allowed, up to a certain depth
+
+# The shape of the bound where contacts are allowed
+mapping_msgs/Object bound
+
+# The pose of the box defining the region where contacts are allowed
+geometry_msgs/PoseStamped pose
+
+# The set of links that are allowed to touch obstacles
+string[] links
+
+# The maximum penetration depth
+float64 depth
Property changes on: pkg/trunk/motion_planning/motion_planning_msgs/msg/AcceptableContact.msg
___________________________________________________________________
Added: svn:mergeinfo
+
Modified: pkg/trunk/motion_planning/motion_planning_msgs/msg/KinematicSpaceParameters.msg
===================================================================
--- pkg/trunk/motion_planning/motion_planning_msgs/msg/KinematicSpaceParameters.msg 2009-08-06 20:13:33 UTC (rev 20926)
+++ pkg/trunk/motion_planning/motion_planning_msgs/msg/KinematicSpaceParameters.msg 2009-08-06 20:15:38 UTC (rev 20927)
@@ -16,3 +16,6 @@
# Higher coordinate for the box described above
geometry_msgs/PointStamped volumeMax
+
+# A list of allowed contacts
+AcceptableContact[] contacts
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <is...@us...> - 2009-08-06 22:12:04
|
Revision: 20935
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20935&view=rev
Author: isucan
Date: 2009-08-06 22:11:57 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
updates to move_arm; dealing with alloweble contacts in a nicer way (more general)
Modified Paths:
--------------
pkg/trunk/highlevel/move_arm/launch/move_larm.launch
pkg/trunk/highlevel/move_arm/launch/move_rarm.launch
pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp
pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp
pkg/trunk/motion_planning/planning_environment/include/planning_environment/monitors/collision_space_monitor.h
pkg/trunk/motion_planning/planning_environment/include/planning_environment/monitors/planning_monitor.h
pkg/trunk/motion_planning/planning_environment/src/monitors/collision_space_monitor.cpp
pkg/trunk/motion_planning/planning_environment/src/monitors/planning_monitor.cpp
pkg/trunk/world_models/collision_space/include/collision_space/environment.h
pkg/trunk/world_models/collision_space/include/collision_space/environmentBullet.h
pkg/trunk/world_models/collision_space/include/collision_space/environmentODE.h
pkg/trunk/world_models/collision_space/src/environment.cpp
pkg/trunk/world_models/collision_space/src/environmentBullet.cpp
pkg/trunk/world_models/collision_space/src/environmentODE.cpp
Modified: pkg/trunk/highlevel/move_arm/launch/move_larm.launch
===================================================================
--- pkg/trunk/highlevel/move_arm/launch/move_larm.launch 2009-08-06 22:04:58 UTC (rev 20934)
+++ pkg/trunk/highlevel/move_arm/launch/move_larm.launch 2009-08-06 22:11:57 UTC (rev 20935)
@@ -19,9 +19,6 @@
<param name="group" type="string" value="left_arm" />
<param name="show_collisions" type="bool" value="true" />
- <param name="allowed_touch" type="string" value="l_gripper_l_finger_link l_gripper_r_finger_link l_gripper_l_finger_tip_link l_gripper_r_finger_tip_link" />
- <param name="max_penetration_depth" type="double" value="0.01" />
-
<param name="refresh_interval_collision_map" type="double" value="20.0" />
<param name="refresh_interval_kinematic_state" type="double" value="1.0" />
<param name="bounding_planes" type="string" value="0 0 1 -0.01" />
Modified: pkg/trunk/highlevel/move_arm/launch/move_rarm.launch
===================================================================
--- pkg/trunk/highlevel/move_arm/launch/move_rarm.launch 2009-08-06 22:04:58 UTC (rev 20934)
+++ pkg/trunk/highlevel/move_arm/launch/move_rarm.launch 2009-08-06 22:11:57 UTC (rev 20935)
@@ -19,9 +19,6 @@
<param name="group" type="string" value="right_arm" />
<param name="show_collisions" type="bool" value="true" />
- <param name="allowed_touch" type="string" value="r_gripper_l_finger_link r_gripper_r_finger_link r_gripper_l_finger_tip_link r_gripper_r_finger_tip_link" />
- <param name="max_penetration_depth" type="double" value="0.01" />
-
<param name="refresh_interval_collision_map" type="double" value="20.0" />
<param name="refresh_interval_kinematic_state" type="double" value="1.0" />
<param name="bounding_planes" type="string" value="0 0 1 -0.01" />
Modified: pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp
===================================================================
--- pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp 2009-08-06 22:04:58 UTC (rev 20934)
+++ pkg/trunk/highlevel/move_arm/src/arm_cmd_line.cpp 2009-08-06 22:11:57 UTC (rev 20935)
@@ -178,6 +178,17 @@
goal.goal_constraints.pose_constraint[0].orientation_tolerance_below.z = 0.005;
goal.goal_constraints.pose_constraint[0].orientation_importance = 0.2;
+
+ goal.contacts.resize(1);
+ goal.contacts[0].links.push_back("r_gripper_l_finger_link");
+ goal.contacts[0].links.push_back("r_gripper_r_finger_link");
+ goal.contacts[0].links.push_back("r_gripper_l_finger_tip_link");
+ goal.contacts[0].links.push_back("r_gripper_r_finger_tip_link");
+ goal.contacts[0].links.push_back("r_gripper_palm_link");
+ goal.contacts[0].depth = 0.025;
+ goal.contacts[0].bound.type = mapping_msgs::Object::SPHERE;
+ goal.contacts[0].bound.dimensions.push_back(0.3);
+ goal.contacts[0].pose = goal.goal_constraints.pose_constraint[0].pose;
}
void setConfig(const planning_models::StateParams *_sp, const std::vector<std::string> &names, move_arm::MoveArmGoal &goal)
Modified: pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp
===================================================================
--- pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp 2009-08-06 22:04:58 UTC (rev 20934)
+++ pkg/trunk/highlevel/move_arm/src/move_arm_action.cpp 2009-08-06 22:11:57 UTC (rev 20935)
@@ -246,13 +246,6 @@
private:
- struct AllowedContact
- {
- boost::shared_ptr<bodies::Body> bound;
- std::vector<std::string> links;
- double depth;
- };
-
// construct a list of states with cost
struct CostState
{
@@ -282,41 +275,15 @@
};
- /** \brief The allowed, ccost and display arguments should be bound by the caller. This is a callback function that gets called by the planning
+ /** \brief The ccost and display arguments should be bound by the caller. This is a callback function that gets called by the planning
* environment when a collision is found */
- void contactFound(const std::vector<AllowedContact> &allowed, CollisionCost &ccost, bool display, collision_space::EnvironmentModel::Contact &contact)
+ void contactFound(CollisionCost &ccost, bool display, collision_space::EnvironmentModel::Contact &contact)
{
double cdepth = fabs(contact.depth);
-
- if (contact.link1 && contact.link2) // self colliison
- ccost.cost = INFINITY;
- else
- {
- if (contact.link1 || contact.link2)
- {
- std::string link = contact.link1 ? contact.link1->name : contact.link2->name;
- double thisDepth = INFINITY;
-
- for (unsigned int i = 0 ; i < allowed.size() ; ++i)
- if (allowed[i].bound->containsPoint(contact.pos) && cdepth < allowed[i].depth)
- {
- for (unsigned int j = 0 ; j < allowed[i].links.size() ; ++j)
- if (allowed[i].links[j] == link)
- {
- if (thisDepth > cdepth)
- thisDepth = cdepth;
- break;
- }
- }
-
- if (thisDepth > ccost.cost)
- ccost.cost = thisDepth;
- }
- }
-
+ if (ccost.cost < cdepth)
+ ccost.cost = cdepth;
ccost.sum += cdepth;
-
if (display)
{
static int count = 0;
@@ -348,23 +315,24 @@
/** \brief Evaluate the cost of a state, in terms of collisions */
double computeStateCollisionCost(const planning_models::StateParams *sp)
{
- std::vector<AllowedContact> allowed; // leave this empty
- CollisionCost ccost;
+ CollisionCost ccost;
- planningMonitor_->setOnCollisionContactCallback(boost::bind(&MoveArm::contactFound, this, allowed, ccost, false, _1), 0);
+ std::vector<collision_space::EnvironmentModel::AllowedContact> ac = planningMonitor_->getAllowedContacts();
+ planningMonitor_->clearAllowedContacts();
+ planningMonitor_->setOnCollisionContactCallback(boost::bind(&MoveArm::contactFound, this, ccost, false, _1), 0);
// check for collision, getting all contacts
planningMonitor_->isStateValid(sp, planning_environment::PlanningMonitor::COLLISION_TEST);
planningMonitor_->setOnCollisionContactCallback(NULL);
-
+ planningMonitor_->setAllowedContacts(ac);
+
return ccost.sum;
}
/** \brief If we have a complex goal for which we have not yet found a valid goal state, we use this function*/
- robot_actions::ResultStatus solveGoalComplex(const std::vector<AllowedContact> &allowed,
- std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
+ robot_actions::ResultStatus solveGoalComplex(std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal with unknown valid goal state ...");
@@ -412,7 +380,7 @@
// update the goal constraints for the planning monitor as well
planningMonitor_->setGoalConstraints(req.goal_constraints);
- return runLRplanner(allowed, req, feedback);
+ return runLRplanner(req, feedback);
}
else
{
@@ -430,7 +398,7 @@
// update the goal constraints for the planning monitor as well
planningMonitor_->setGoalConstraints(req.goal_constraints);
- robot_actions::ResultStatus result = runLRplanner(allowed, req, feedback);
+ robot_actions::ResultStatus result = runLRplanner(req, feedback);
req.goal_constraints = kc;
planningMonitor_->setGoalConstraints(req.goal_constraints);
@@ -438,24 +406,24 @@
// if reaching the intermediate state was succesful
if (result == robot_actions::SUCCESS)
// run the short range planner to the original goal
- return runSRplanner(allowed, states, req, feedback);
+ return runSRplanner(states, req, feedback);
else
return result;
}
}
else
- return runLRplanner(allowed, states, req, feedback);
+ return runLRplanner(states, req, feedback);
}
else
{
ROS_ERROR("Service for searching for valid states failed");
- return runLRplanner(allowed, states, req, feedback);
+ return runLRplanner(states, req, feedback);
}
}
/** \brief Extract the state specified by the goal and run a planner towards it, if it is valid */
- robot_actions::ResultStatus solveGoalJoints(const std::vector<AllowedContact> &allowed, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus solveGoalJoints(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal to set of joints ...");
@@ -471,13 +439,13 @@
// try to skip straight to planning
if (planningMonitor_->isStateValidAtGoal(sp.get()))
- return runLRplanner(allowed, req, feedback);
+ return runLRplanner(req, feedback);
else
{
// if we can't, go to the more generic joint solver
std::vector< boost::shared_ptr<planning_models::StateParams> > states;
states.push_back(sp);
- return solveGoalJoints(allowed, states, req, feedback);
+ return solveGoalJoints(states, req, feedback);
}
}
@@ -502,15 +470,14 @@
}
/** \brief Find a plan to given request, given a set of hint states in the goal region */
- robot_actions::ResultStatus solveGoalJoints(const std::vector<AllowedContact> &allowed,
- std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
+ robot_actions::ResultStatus solveGoalJoints(std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal to set of joints pointing to potentially invalid state ...");
// just in case we received no states (this should not happen)
if (states.empty())
- return solveGoalComplex(allowed, states, req, feedback);
+ return solveGoalComplex(states, req, feedback);
std::vector<CostState> cstates(states.size());
@@ -530,7 +497,7 @@
if (planningMonitor_->isStateValidAtGoal(cstates[0].state))
{
updateRequest(req, cstates[0].state);
- return runLRplanner(allowed, req, feedback);
+ return runLRplanner(req, feedback);
}
else
{
@@ -538,7 +505,7 @@
std::vector< boost::shared_ptr<planning_models::StateParams> > backup = states;
for (unsigned int i = 0 ; i < cstates.size() ; ++i)
states[i] = backup[cstates[i].index];
- return solveGoalComplex(allowed, states, req, feedback);
+ return solveGoalComplex(states, req, feedback);
}
}
@@ -552,7 +519,7 @@
reach a maximal number of steps. If we have candidate
solutions, we forward this to the joint-goal solver. If not,
the complex goal solver is to be used. */
- robot_actions::ResultStatus solveGoalPose(const std::vector<AllowedContact> &allowed, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus solveGoalPose(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal to pose ...");
@@ -593,13 +560,13 @@
}
if (states.empty())
- return solveGoalComplex(allowed, states, req, feedback);
+ return solveGoalComplex(states, req, feedback);
else
- return solveGoalJoints(allowed, states, req, feedback);
+ return solveGoalJoints(states, req, feedback);
}
/** \brief Depending on the type of constraint, decide whether or not to use IK, decide which planners to use */
- robot_actions::ResultStatus solveGoal(const std::vector<AllowedContact> &allowed, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus solveGoal(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Acting on goal...");
@@ -609,31 +576,30 @@
req.goal_constraints.pose_constraint[0].type ==
motion_planning_msgs::PoseConstraint::POSITION_X + motion_planning_msgs::PoseConstraint::POSITION_Y + motion_planning_msgs::PoseConstraint::POSITION_Z +
motion_planning_msgs::PoseConstraint::ORIENTATION_R + motion_planning_msgs::PoseConstraint::ORIENTATION_P + motion_planning_msgs::PoseConstraint::ORIENTATION_Y) // that is active on all 6 DOFs
- return solveGoalPose(allowed, req, feedback);
+ return solveGoalPose(req, feedback);
// if we have only joint constraints, we call the method that gets us to a goal state
if (req.goal_constraints.pose_constraint.empty())
- return solveGoalJoints(allowed, req, feedback);
+ return solveGoalJoints(req, feedback);
// otherwise, more complex constraints, run a generic method; we have no hint states
std::vector< boost::shared_ptr<planning_models::StateParams> > states;
- return solveGoalComplex(allowed, states, req, feedback);
+ return solveGoalComplex(states, req, feedback);
}
- robot_actions::ResultStatus runLRplanner(const std::vector<AllowedContact> &allowed, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus runLRplanner(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
std::vector< boost::shared_ptr<planning_models::StateParams> > states;
- return runLRplanner(allowed, states, req, feedback);
+ return runLRplanner(states, req, feedback);
}
- robot_actions::ResultStatus runLRplanner(const std::vector<AllowedContact> &allowed,
- std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
+ robot_actions::ResultStatus runLRplanner(std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Running long range planner...");
ros::ServiceClient clientPlan = core_.nodeHandle_.serviceClient<motion_planning_msgs::GetMotionPlan>(LR_MOTION_PLAN_NAME, true);
- robot_actions::ResultStatus result = runPlanner(clientPlan, allowed, req, feedback);
+ robot_actions::ResultStatus result = runPlanner(clientPlan, req, feedback);
// if the planner aborted and we have an idea about an invalid state that
// may be in the goal region, we make one last try using the short range planner
@@ -642,27 +608,25 @@
// set the goal to be a state
ROS_INFO("Trying again with a state in the goal region (although the state is invalid)...");
updateRequest(req, states[0].get());
- result = runPlanner(clientPlan, allowed, req, feedback);
+ result = runPlanner(clientPlan, req, feedback);
}
return result;
}
- robot_actions::ResultStatus runSRplanner(const std::vector<AllowedContact> &allowed,
- motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus runSRplanner(motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
std::vector< boost::shared_ptr<planning_models::StateParams> > states;
- return runSRplanner(allowed, states, req, feedback);
+ return runSRplanner(states, req, feedback);
}
- robot_actions::ResultStatus runSRplanner(const std::vector<AllowedContact> &allowed,
- std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
+ robot_actions::ResultStatus runSRplanner(std::vector< boost::shared_ptr<planning_models::StateParams> > &states,
motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ROS_DEBUG("Running short range planner...");
ros::ServiceClient clientPlan = core_.nodeHandle_.serviceClient<motion_planning_msgs::GetMotionPlan>(SR_MOTION_PLAN_NAME, true);
- robot_actions::ResultStatus result = runPlanner(clientPlan, allowed, req, feedback);
+ robot_actions::ResultStatus result = runPlanner(clientPlan, req, feedback);
// if the planner aborted and we have an idea about an invalid state that
// may be in the goal region, we make one last try using the short range planner
@@ -671,13 +635,13 @@
// set the goal to be a state
ROS_INFO("Trying again with a state in the goal region (although the state is invalid)...");
updateRequest(req, states[0].get());
- result = runPlanner(clientPlan, allowed, req, feedback);
+ result = runPlanner(clientPlan, req, feedback);
}
return result;
}
- robot_actions::ResultStatus runPlanner(ros::ServiceClient &clientPlan, const std::vector<AllowedContact> &allowed, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
+ robot_actions::ResultStatus runPlanner(ros::ServiceClient &clientPlan, motion_planning_msgs::GetMotionPlan::Request &req, int32_t& feedback)
{
ResultStatus result = robot_actions::SUCCESS;
@@ -785,19 +749,14 @@
}
CollisionCost ccost;
- planningMonitor_->setOnCollisionContactCallback(boost::bind(&MoveArm::contactFound, this, allowed, ccost, true, _1), 0);
- valid = planningMonitor_->isPathValid(currentPath, currentPos, currentPath.states.size() - 1, planning_environment::PlanningMonitor::COLLISION_TEST, false);
+ planningMonitor_->setOnCollisionContactCallback(boost::bind(&MoveArm::contactFound, this, ccost, true, _1), 0);
+ valid = planningMonitor_->isPathValid(currentPath, currentPos, currentPath.states.size() - 1, planning_environment::PlanningMonitor::COLLISION_TEST +
+ planning_environment::PlanningMonitor::PATH_CONSTRAINTS_TEST, false);
+ planningMonitor_->setOnCollisionContactCallback(NULL);
if (!valid)
- {
ROS_INFO("Path contact penetration depth: %f", ccost.cost);
- if (ccost.cost < INFINITY) // this will always be infinity if we have collisions we do not allow
- valid = true;
- }
- // and check the path constraints
- if (valid)
- valid = planningMonitor_->isPathValid(currentPath, currentPos, currentPath.states.size() - 1, planning_environment::PlanningMonitor::PATH_CONSTRAINTS_TEST, false);
}
if (result == robot_actions::PREEMPTED || !safe || !valid)
@@ -913,36 +872,18 @@
robot_actions::ResultStatus execute(const move_arm::MoveArmGoal& goal, int32_t& feedback)
{
+ planningMonitor_->setAllowedContacts(goal.contacts);
- std::vector<AllowedContact> contactRegions;
- for (unsigned int i = 0 ; i < goal.contacts.size() ; ++i)
- {
- shapes::Shape *shape = planning_environment::constructObject(goal.contacts[i].bound);
- if (shape)
- {
- boost::shared_ptr<bodies::Body> body(bodies::createBodyFromShape(shape));
- geometry_msgs::PoseStamped pose;
- tf_->transformPose(planningMonitor_->getFrameId(), goal.contacts[i].pose, pose);
- btTransform tr;
- tf::poseMsgToTF(pose.pose, tr);
- body->setPose(tr);
- AllowedContact ac;
- ac.bound = body;
- ac.links = goal.contacts[i].links;
- ac.depth = goal.contacts[i].depth;
- contactRegions.push_back(ac);
- }
- }
-
motion_planning_msgs::GetMotionPlan::Request req;
req.params.model_id = core_.group_; // the model to plan for (should be defined in planning.yaml)
req.params.distance_metric = "L2Square"; // the metric to be used in the robot's state space
+ req.params.contacts = goal.contacts;
// forward the goal & path constraints
req.goal_constraints = goal.goal_constraints;
req.path_constraints = goal.path_constraints;
-
+
// transform them to the local coordinate frame since we may be updating this request later on
planningMonitor_->transformConstraintsToFrame(req.goal_constraints, planningMonitor_->getFrameId());
planningMonitor_->transformConstraintsToFrame(req.path_constraints, planningMonitor_->getFrameId());
@@ -960,7 +901,7 @@
// fill the starting state
fillStartState(req.start_state);
- robot_actions::ResultStatus result = solveGoal(contactRegions, req, feedback);
+ robot_actions::ResultStatus result = solveGoal(req, feedback);
if (result == robot_actions::SUCCESS)
ROS_INFO("Goal was reached");
Modified: pkg/trunk/motion_planning/planning_environment/include/planning_environment/monitors/collision_space_monitor.h
===================================================================
--- pkg/trunk/motion_planning/planning_environment/include/planning_environment/monitors/collision_space_monitor.h 2009-08-06 22:04:58 UTC (rev 20934)
+++ pkg/trunk/motion_planning/planning_environment/include/planning_environment/monitors/collision_space_monitor.h 2009-08-06 22:11:57 UTC (rev 20935)
@@ -40,6 +40,7 @@
#include "planning_environment/models/collision_models.h"
#include "planning_environment/monitors/kinematic_model_state_monitor.h"
+#include <motion_planning_msgs/AcceptableContact.h>
#include <mapping_msgs/CollisionMap.h>
#include <mapping_msgs/ObjectInMap.h>
#include <boost/thread/mutex.hpp>
@@ -142,11 +143,24 @@
return pointcloud_padd_;
}
- /** \brief If the used modified some instance of an environment model, this function provides the means to obtain a collision map (the set of boxes)
+ /** \brief Convert an allowed contact message into the structure accepted by the collision space */
+ bool computeAllowedContact(const motion_planning_msgs::AcceptableContact &allowedContactMsg, collision_space::EnvironmentModel::AllowedContact &allowedContact) const;
+
+ /** \brief This function provides the means to obtain a collision map (the set of boxes)
+ * from the current environment model */
+ void recoverCollisionMap(mapping_msgs::CollisionMap &cmap);
+
+ /** \brief If the user modified some instance of an environment model, this function provides the means to obtain a collision map (the set of boxes)
* from that environment model */
void recoverCollisionMap(const collision_space::EnvironmentModel *env, mapping_msgs::CollisionMap &cmap);
- /** \brief If the used modified some instance of an
+
+ /** \brief This function provides the means to
+ obtain a set of objects in map (all objects that are not
+ in the namespace the collision map was added to) from the current environment */
+ void recoverObjectsInMap(std::vector<mapping_msgs::ObjectInMap> &omap);
+
+ /** \brief If the user modified some instance of an
environment model, this function provides the means to
obtain a set of objects in map (all objects that are not
in the namespace the collision map was added to) */
Modified: pkg/trunk/motion_planning/planning_environment/include/planning_environment/monitors/planning_monitor.h
===================================================================
--- pkg/trunk/motion_planning/planning_environment/include/planning_environment/monitors/planning_monitor.h 2009-08-06 22:04:58 UTC (rev 20934)
+++ pkg/trunk/motion_planning/planning_environment/include/planning_environment/monitors/planning_monitor.h 2009-08-06 22:11:57 UTC (rev 20935)
@@ -133,6 +133,18 @@
/** \brief Transform the kinematic joint to the frame requested */
bool transformJointToFrame(motion_planning_msgs::KinematicJoint &kj, const std::string &target) const;
+ /** \brief Set the set of contacts allowed when collision checking */
+ void setAllowedContacts(const std::vector<motion_planning_msgs::AcceptableContact> &allowedContacts);
+
+ /** \brief Set the set of contacts allowed when collision checking */
+ void setAllowedContacts(const std::vector<collision_space::EnvironmentModel::AllowedContact> &allowedContacts);
+
+ /** \brief Get the set of contacts allowed when collision checking */
+ const std::vector<collision_space::EnvironmentModel::AllowedContact>& getAllowedContacts(void) const;
+
+ /** \brief Clear the set of allowed contacts */
+ void clearAllowedContacts(void);
+
/** \brief Set a callback to be called when a collision is found */
void setOnCollisionContactCallback(const boost::function<void(collision_space::EnvironmentModel::Contact&)> &callback, unsigned int maxContacts = 1)
{
@@ -158,6 +170,8 @@
boost::function<void(collision_space::EnvironmentModel::Contact&)> onCollisionContact_;
unsigned int maxCollisionContacts_;
+ std::vector<collision_space::EnvironmentModel::AllowedContact> allowedContacts_;
+
motion_planning_msgs::KinematicConstraints kcPath_;
motion_planning_msgs::KinematicConstraints kcGoal_;
Modified: pkg/trunk/motion_planning/planning_environment/src/monitors/collision_space_monitor.cpp
===================================================================
--- pkg/trunk/motion_planning/planning_environment/src/monitors/collision_space_monitor.cpp 2009-08-06 22:04:58 UTC (rev 20934)
+++ pkg/trunk/motion_planning/planning_environment/src/monitors/collision_space_monitor.cpp 2009-08-06 22:11:57 UTC (rev 20935)
@@ -367,6 +367,35 @@
return result;
}
+bool planning_environment::CollisionSpaceMonitor::computeAllowedContact(const motion_planning_msgs::AcceptableContact &allowedContactMsg,
+ collision_space::EnvironmentModel::AllowedContact &allowedContact) const
+{
+ shapes::Shape *shape = constructObject(allowedContactMsg.bound);
+ if (shape)
+ {
+ boost::shared_ptr<bodies::Body> body(bodies::createBodyFromShape(shape));
+ geometry_msgs::PoseStamped pose;
+ tf_->transformPose(getFrameId(), allowedContactMsg.pose, pose);
+ btTransform tr;
+ tf::poseMsgToTF(pose.pose, tr);
+ body->setPose(tr);
+ allowedContact.bound = body;
+ allowedContact.links = allowedContactMsg.links;
+ allowedContact.depth = allowedContactMsg.depth;
+ delete shape;
+ return true;
+ }
+ else
+ return false;
+}
+
+void planning_environment::CollisionSpaceMonitor::recoverCollisionMap(mapping_msgs::CollisionMap &cmap)
+{
+ getEnvironmentModel()->lock();
+ recoverCollisionMap(getEnvironmentModel(), cmap);
+ getEnvironmentModel()->unlock();
+}
+
void planning_environment::CollisionSpaceMonitor::recoverCollisionMap(const collision_space::EnvironmentModel *env, mapping_msgs::CollisionMap &cmap)
{
cmap.header.frame_id = getFrameId();
@@ -398,6 +427,13 @@
}
}
+void planning_environment::CollisionSpaceMonitor::recoverObjectsInMap(std::vector<mapping_msgs::ObjectInMap> &omap)
+{
+ getEnvironmentModel()->lock();
+ recoverObjectsInMap(getEnvironmentModel(), omap);
+ getEnvironmentModel()->unlock();
+}
+
void planning_environment::CollisionSpaceMonitor::recoverObjectsInMap(const collision_space::EnvironmentModel *env, std::vector<mapping_msgs::ObjectInMap> &omap)
{
omap.clear();
Modified: pkg/trunk/motion_planning/planning_environment/src/monitors/planning_monitor.cpp
===================================================================
--- pkg/trunk/motion_planning/planning_environment/src/monitors/planning_monitor.cpp 2009-08-06 22:04:58 UTC (rev 20934)
+++ pkg/trunk/motion_planning/planning_environment/src/monitors/planning_monitor.cpp 2009-08-06 22:11:57 UTC (rev 20935)
@@ -315,7 +315,7 @@
// check for collision
std::vector<collision_space::EnvironmentModel::Contact> contacts;
if (test & COLLISION_TEST)
- valid = !getEnvironmentModel()->getCollisionContacts(contacts, maxCollisionContacts_);
+ valid = !getEnvironmentModel()->getCollisionContacts(allowedContacts_, contacts, maxCollisionContacts_);
if (valid && (test & (PATH_CONSTRAINTS_TEST | GOAL_CONSTRAINTS_TEST)))
{
@@ -506,7 +506,7 @@
// check for collision
std::vector<collision_space::EnvironmentModel::Contact> contacts;
if (test & COLLISION_TEST)
- valid = !getEnvironmentModel()->getCollisionContacts(contacts, remainingContacts);
+ valid = !getEnvironmentModel()->getCollisionContacts(allowedContacts_, contacts, remainingContacts);
if (onCollisionContact_)
for (unsigned int i = 0 ; i < contacts.size() ; ++i)
@@ -548,3 +548,31 @@
return valid;
}
+
+void planning_environment::PlanningMonitor::setAllowedContacts(const std::vector<collision_space::EnvironmentModel::AllowedContact> &allowedContacts)
+{
+ allowedContacts_ = allowedContacts;
+}
+
+void planning_environment::PlanningMonitor::setAllowedContacts(const std::vector<motion_planning_msgs::AcceptableContact> &allowedContacts)
+{
+ allowedContacts_.clear();
+ for (unsigned int i = 0 ; i < allowedContacts.size() ; ++i)
+ {
+ collision_space::EnvironmentModel::AllowedContact ac;
+ if (computeAllowedContact(allowedContacts[i], ac))
+ allowedContacts_.push_back(ac);
+ }
+}
+
+const std::vector<collision_space::EnvironmentModel::AllowedContact>& planning_environment::PlanningMonitor::getAllowedContacts(void) const
+{
+ return allowedContacts_;
+}
+
+void planning_environment::PlanningMonitor::clearAllowedContacts(void)
+{
+ allowedContacts_.clear();
+}
+
+
Modified: pkg/trunk/world_models/collision_space/include/collision_space/environment.h
===================================================================
--- pkg/trunk/world_models/collision_space/include/collision_space/environment.h 2009-08-06 22:04:58 UTC (rev 20934)
+++ pkg/trunk/world_models/collision_space/include/collision_space/environment.h 2009-08-06 22:11:57 UTC (rev 20935)
@@ -40,6 +40,7 @@
#include "collision_spac...
[truncated message content] |
|
From: <ei...@us...> - 2009-08-07 01:47:30
|
Revision: 20982
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20982&view=rev
Author: eitanme
Date: 2009-08-07 01:47:21 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
Merging the plugin branch back into trunk with move_base and its associated plugins (navfn, carrot_planner, navfn_constrained, base_local_planner) as examples. The plugin tools are available in the pluginlib package.
r30318@att (orig r20810): eitanme | 2009-08-05 13:19:38 -0700
Creating a branch for ROS plugins
r30362@att (orig r20848): eitanme | 2009-08-05 15:25:41 -0700
Moving navfn to the new plugin model
r30370@att (orig r20854): eitanme | 2009-08-05 15:51:48 -0700
Base local planner now works with plugin model
r30393@att (orig r20868): eitanme | 2009-08-05 19:23:50 -0700
Now works with the new plugin model and move_base
r30394@att (orig r20869): eitanme | 2009-08-05 19:24:35 -0700
Now works with the new plugin model and move_base
r30395@att (orig r20870): eitanme | 2009-08-05 19:25:18 -0700
Changed to differentiate between the name of a plugin and the name of the class that it refers to
r30396@att (orig r20871): eitanme | 2009-08-05 19:33:09 -0700
Working version of move_base with the new plugin model
r30398@att (orig r20872): eitanme | 2009-08-05 19:34:12 -0700
Working version of move_base with the new plugin model
r30400@att (orig r20874): eitanme | 2009-08-05 19:36:42 -0700
Checking in nav_core which holds the interfaces used by the plugins for the navigation stack
r30403@att (orig r20877): eitanme | 2009-08-05 19:48:36 -0700
Carrot planner now works with the new plugin model
r30460@att (orig r20930): eitanme | 2009-08-06 14:26:12 -0700
Working towards a cleaner imp. Also, no linking necessary on the user's part
r30461@att (orig r20931): eitanme | 2009-08-06 14:28:39 -0700
Creating include dir
r30462@att (orig r20932): eitanme | 2009-08-06 14:31:07 -0700
Moving plugin_user package to pluginlib package
r30487@att (orig r20952): eitanme | 2009-08-06 17:00:47 -0700
Separated macros and implementation from PluginLoader class spec
r30491@att (orig r20956): eitanme | 2009-08-06 17:03:10 -0700
Removing old example
r30492@att (orig r20957): eitanme | 2009-08-06 17:13:30 -0700
Moving .hpp to .h for polygon
r30493@att (orig r20958): eitanme | 2009-08-06 17:14:28 -0700
Working version of a plugin provider with new plugin model
r30496@att (orig r20960): eitanme | 2009-08-06 17:29:16 -0700
Working semi-complicated example of plugin use
r30497@att (orig r20961): eitanme | 2009-08-06 17:29:36 -0700
Working example of plugin use.... huzzah\!
r30501@att (orig r20964): eitanme | 2009-08-06 17:38:30 -0700
Now throws an exception
r30504@att (orig r20967): eitanme | 2009-08-06 17:52:41 -0700
Carrot Planner works with new plugin model
r30505@att (orig r20968): eitanme | 2009-08-06 17:55:17 -0700
Working navfn plugin
r30506@att (orig r20969): eitanme | 2009-08-06 17:55:44 -0700
Working version of base_local_planner plugin for move_base
r30509@att (orig r20971): eitanme | 2009-08-06 18:20:25 -0700
Moving navfn_constrained over to the new plugin model
r30511@att (orig r20973): eitanme | 2009-08-06 18:21:36 -0700
Making initialized_ protected
r30512@att (orig r20974): eitanme | 2009-08-06 18:23:35 -0700
Working version of move_base_old with new plugin model
r30513@att (orig r20975): eitanme | 2009-08-06 18:30:07 -0700
Adding checks for proper initialization
r30515@att (orig r20977): eitanme | 2009-08-06 18:30:48 -0700
Adding checks for proper initialization
r30520@att (orig r20980): eitanme | 2009-08-06 18:38:42 -0700
Removing blacklist on the pluginlib package now that it is tested and should be expected to compile
Modified Paths:
--------------
pkg/trunk/nav/people_aware_nav/include/people_aware_nav/navfn_constrained.h
pkg/trunk/nav/people_aware_nav/manifest.xml
pkg/trunk/nav/people_aware_nav/src/move_base_constrained.cpp
pkg/trunk/nav/people_aware_nav/src/navfn_constrained.cpp
pkg/trunk/sandbox/plugin_provider/CMakeLists.txt
pkg/trunk/sandbox/plugin_provider/line.cpp
pkg/trunk/sandbox/plugin_provider/manifest.xml
pkg/trunk/sandbox/plugin_provider/polygon_plugins.xml
pkg/trunk/sandbox/plugin_provider/shape_plugins.xml
pkg/trunk/sandbox/plugin_provider/square.cpp
pkg/trunk/sandbox/pluginlib/CMakeLists.txt
pkg/trunk/sandbox/pluginlib/example.cpp
pkg/trunk/sandbox/pluginlib/manifest.xml
pkg/trunk/stacks/navigation/base_local_planner/include/base_local_planner/trajectory_planner_ros.h
pkg/trunk/stacks/navigation/base_local_planner/manifest.xml
pkg/trunk/stacks/navigation/base_local_planner/src/trajectory_planner_ros.cpp
pkg/trunk/stacks/navigation/carrot_planner/include/carrot_planner/carrot_planner.h
pkg/trunk/stacks/navigation/carrot_planner/manifest.xml
pkg/trunk/stacks/navigation/carrot_planner/src/carrot_planner.cpp
pkg/trunk/stacks/navigation/move_base/CMakeLists.txt
pkg/trunk/stacks/navigation/move_base/include/move_base/move_base.h
pkg/trunk/stacks/navigation/move_base/include/move_base/move_base_old.h
pkg/trunk/stacks/navigation/move_base/manifest.xml
pkg/trunk/stacks/navigation/move_base/src/move_base.cpp
pkg/trunk/stacks/navigation/move_base/src/move_base_old.cpp
pkg/trunk/stacks/navigation/navfn/include/navfn/navfn_ros.h
pkg/trunk/stacks/navigation/navfn/manifest.xml
pkg/trunk/stacks/navigation/navfn/src/navfn_node.cpp
pkg/trunk/stacks/navigation/navfn/src/navfn_ros.cpp
Added Paths:
-----------
pkg/trunk/nav/people_aware_nav/bgp_plugin.xml
pkg/trunk/sandbox/plugin_provider/manifest.cpp
pkg/trunk/sandbox/plugin_provider/square.h
pkg/trunk/sandbox/plugin_provider/triangle.cpp
pkg/trunk/sandbox/plugin_provider/triangle.h
pkg/trunk/sandbox/pluginlib/
pkg/trunk/sandbox/pluginlib/include/
pkg/trunk/sandbox/pluginlib/include/pluginlib/
pkg/trunk/sandbox/pluginlib/include/pluginlib/plugin_loader.h
pkg/trunk/sandbox/pluginlib/include/pluginlib/plugin_loader_imp.h
pkg/trunk/sandbox/pluginlib/include/pluginlib/plugin_macros.h
pkg/trunk/sandbox/pluginlib/polygon.h
pkg/trunk/sandbox/pluginlib/shape.h
pkg/trunk/stacks/navigation/base_local_planner/blp_plugin.xml
pkg/trunk/stacks/navigation/nav_core/
pkg/trunk/stacks/navigation/nav_core/CMakeLists.txt
pkg/trunk/stacks/navigation/nav_core/Makefile
pkg/trunk/stacks/navigation/nav_core/include/
pkg/trunk/stacks/navigation/nav_core/include/nav_core/
pkg/trunk/stacks/navigation/nav_core/include/nav_core/base_global_planner.h
pkg/trunk/stacks/navigation/nav_core/include/nav_core/base_local_planner.h
pkg/trunk/stacks/navigation/nav_core/mainpage.dox
pkg/trunk/stacks/navigation/nav_core/manifest.xml
pkg/trunk/stacks/navigation/navfn/bgp_plugin.xml
Removed Paths:
-------------
pkg/trunk/sandbox/plugin_user/
Property Changed:
----------------
pkg/trunk/
Property changes on: pkg/trunk
___________________________________________________________________
Modified: svk:merge
- 637b03a7-42c1-4bbd-8d43-e365e379942c:/prfilters:13971
637b03a7-42c1-4bbd-8d43-e365e379942c:/rosTF_to_tf:9746
920d6130-5740-4ec1-bb1a-45963d5fd813:/costmap_rework_branch:20583
920d6130-5740-4ec1-bb1a-45963d5fd813:/frameidpr:7015
920d6130-5740-4ec1-bb1a-45963d5fd813:/nav_rework:21482
920d6130-5740-4ec1-bb1a-45963d5fd813:/users/josh-pr:11755
920d6130-5740-4ec1-bb1a-45963d5fd813:/wgpkgtrunk:5865
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/action_branch:20116
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/common_msgs-0.1-v2:20514
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/common_msgs-0.1-v3:20628
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/common_msgs_0.1:20375
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/josh:10136
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/milestone2:16602
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/nav_rework:17337
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/rosbus:261
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/tags/milestone2_tags/milestone2_final:16577
+ 637b03a7-42c1-4bbd-8d43-e365e379942c:/prfilters:13971
637b03a7-42c1-4bbd-8d43-e365e379942c:/rosTF_to_tf:9746
920d6130-5740-4ec1-bb1a-45963d5fd813:/costmap_rework_branch:20583
920d6130-5740-4ec1-bb1a-45963d5fd813:/frameidpr:7015
920d6130-5740-4ec1-bb1a-45963d5fd813:/nav_rework:21482
920d6130-5740-4ec1-bb1a-45963d5fd813:/users/josh-pr:11755
920d6130-5740-4ec1-bb1a-45963d5fd813:/wgpkgtrunk:5865
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/action_branch:20116
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/common_msgs-0.1-v2:20514
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/common_msgs-0.1-v3:20628
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/common_msgs_0.1:20375
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/josh:10136
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/milestone2:16602
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/nav_rework:17337
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/plugin_branch:20980
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/branches/rosbus:261
f5854215-dd47-0410-b2c4-cdd35faa7885:/pkg/tags/milestone2_tags/milestone2_final:16577
Added: pkg/trunk/nav/people_aware_nav/bgp_plugin.xml
===================================================================
--- pkg/trunk/nav/people_aware_nav/bgp_plugin.xml (rev 0)
+++ pkg/trunk/nav/people_aware_nav/bgp_plugin.xml 2009-08-07 01:47:21 UTC (rev 20982)
@@ -0,0 +1,7 @@
+<library path="lib/libnavfn_constrained">
+ <plugin name="NavfnROSConstrained" class="people_aware_nav::NavfnROSConstrained" type="nav_core::BaseGlobalPlanner">
+ <description>
+ A constrained version of the navfn planner
+ </description>
+ </plugin>
+</library>
Modified: pkg/trunk/nav/people_aware_nav/include/people_aware_nav/navfn_constrained.h
===================================================================
--- pkg/trunk/nav/people_aware_nav/include/people_aware_nav/navfn_constrained.h 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/nav/people_aware_nav/include/people_aware_nav/navfn_constrained.h 2009-08-07 01:47:21 UTC (rev 20982)
@@ -46,7 +46,9 @@
public:
- NavfnROSConstrained (std::string name, costmap_2d::Costmap2DROS& cmap);
+ NavfnROSConstrained ();
+ NavfnROSConstrained (std::string name, costmap_2d::Costmap2DROS* cmap);
+ void initialize (std::string name, costmap_2d::Costmap2DROS* cmap);
bool setConstraint (SetNavConstraint::Request& req, SetNavConstraint::Response& resp);
protected:
Modified: pkg/trunk/nav/people_aware_nav/manifest.xml
===================================================================
--- pkg/trunk/nav/people_aware_nav/manifest.xml 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/nav/people_aware_nav/manifest.xml 2009-08-07 01:47:21 UTC (rev 20982)
@@ -6,6 +6,7 @@
<depend package="roslisp" />
<depend package="roslib" />
<depend package="people" />
+<depend package="pluginlib" />
<depend package="hallway_tracker" />
<depend package="topic_synchronizer" />
<depend package="tf" />
@@ -13,6 +14,7 @@
<depend package="base_local_planner"/>
<depend package="costmap_2d"/>
<depend package="angles"/>
+<depend package="nav_core"/>
<depend package="navfn"/>
<depend package="nav_msgs"/>
<depend package="robot_msgs" />
@@ -24,6 +26,7 @@
<depend package="visualization_msgs"/>
<export>
<cpp cflags="-I${prefix}/include -I${prefix}/srv/cpp -I${prefix}/msg/cpp" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lnavfn_constrained"/>
+ <nav_core BaseGlobalPlanner="${prefix}/bgp_plugin.xml" />
</export>
</package>
Modified: pkg/trunk/nav/people_aware_nav/src/move_base_constrained.cpp
===================================================================
--- pkg/trunk/nav/people_aware_nav/src/move_base_constrained.cpp 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/nav/people_aware_nav/src/move_base_constrained.cpp 2009-08-07 01:47:21 UTC (rev 20982)
@@ -73,14 +73,14 @@
planner_costmap_ros_->getCostmapCopy(planner_costmap_);
//initialize the NavFn planner
- planner_ = new NavfnROS("NavfnROS", *planner_costmap_ros_);
+ planner_ = new NavfnROS("NavfnROS", planner_costmap_ros_);
ROS_INFO("MAP SIZE: %d, %d", planner_costmap_.getSizeInCellsX(), planner_costmap_.getSizeInCellsY());
//create the ros wrapper for the controller's costmap... and initializer a pointer we'll use with the underlying map
controller_costmap_ros_ = new Costmap2DROS("local_costmap", tf_);
//create a trajectory controller
- tc_ = new TrajectoryPlannerROS("TrajectoryPlannerROS", tf_, *controller_costmap_ros_);
+ tc_ = new TrajectoryPlannerROS("TrajectoryPlannerROS", &tf_, controller_costmap_ros_);
//initially clear any unknown space around the robot
planner_costmap_ros_->clearNonLethalWindow(circumscribed_radius_ * 2, circumscribed_radius_ * 2);
Modified: pkg/trunk/nav/people_aware_nav/src/navfn_constrained.cpp
===================================================================
--- pkg/trunk/nav/people_aware_nav/src/navfn_constrained.cpp 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/nav/people_aware_nav/src/navfn_constrained.cpp 2009-08-07 01:47:21 UTC (rev 20982)
@@ -37,7 +37,12 @@
#include <people_aware_nav/navfn_constrained.h>
#include <visualization_msgs/Marker.h>
#include <ros/ros.h>
+#include <pluginlib/plugin_macros.h>
+BEGIN_PLUGIN_LIST(nav_core::BaseGlobalPlanner);
+REGISTER_PLUGIN(people_aware_nav::NavfnROSConstrained);
+END_PLUGIN_LIST
+
namespace people_aware_nav {
using geometry_msgs::PoseStamped;
@@ -48,17 +53,31 @@
namespace vm=visualization_msgs;
-ROS_REGISTER_BGP(NavfnROSConstrained);
+NavfnROSConstrained::NavfnROSConstrained (){}
-NavfnROSConstrained::NavfnROSConstrained (std::string name, costmap_2d::Costmap2DROS& cmap) :
- navfn::NavfnROS(name, cmap)
+NavfnROSConstrained::NavfnROSConstrained (std::string name, costmap_2d::Costmap2DROS* cmap)
{
+ initialize(name, cmap);
+}
+
+void NavfnROSConstrained::initialize (std::string name, costmap_2d::Costmap2DROS* cmap)
+{
+ if(!initialized_){
+ navfn::NavfnROS::initialize(name, cmap);
service_ = node_.advertiseService("~set_nav_constraint", &NavfnROSConstrained::setConstraint, this);
vis_pub_add_ = node_.advertise<visualization_msgs::Marker>("visualization_marker", 0);
+ }
+ else
+ ROS_WARN("You are attempting to initialize a planner that has already been initialized, doing nothing");
}
bool NavfnROSConstrained::setConstraint (SetNavConstraint::Request& req, SetNavConstraint::Response& resp)
{
+ if(!initialized_){
+ ROS_ERROR("This planner has not been initialized, please call initialize() before attempting to use it.");
+ return false;
+ }
+
forbidden_ = req.forbidden;
ROS_DEBUG_STREAM_NAMED("navfn", "Setting constraint polygon with " << forbidden_.points.size() << " points");
return true;
@@ -67,9 +86,14 @@
void NavfnROSConstrained::getCostmap (costmap_2d::Costmap2D& cmap)
{
- costmap_ros_.clearRobotFootprint();
- costmap_ros_.getCostmapCopy(cmap);
+ if(!initialized_){
+ ROS_ERROR("This planner has not been initialized, please call initialize() before attempting to use it.");
+ return;
+ }
+ costmap_ros_->clearRobotFootprint();
+ costmap_ros_->getCostmapCopy(cmap);
+
// Set cost of forbidden region
vector<Point> polygon;
for (vector<Point32>::const_iterator iter = forbidden_.points.begin(); iter!=forbidden_.points.end(); ++iter) {
Modified: pkg/trunk/sandbox/plugin_provider/CMakeLists.txt
===================================================================
--- pkg/trunk/sandbox/plugin_provider/CMakeLists.txt 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/sandbox/plugin_provider/CMakeLists.txt 2009-08-07 01:47:21 UTC (rev 20982)
@@ -29,8 +29,6 @@
#rospack_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
-rospack_add_library(square square.cpp)
-target_link_libraries(square PocoUtil)
+rospack_add_library(square square.cpp triangle.cpp manifest.cpp)
-rospack_add_library(line line.cpp)
-target_link_libraries(line PocoUtil)
\ No newline at end of file
+rospack_add_library(line line.cpp shape_manifest.cpp)
Modified: pkg/trunk/sandbox/plugin_provider/line.cpp
===================================================================
--- pkg/trunk/sandbox/plugin_provider/line.cpp 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/sandbox/plugin_provider/line.cpp 2009-08-07 01:47:21 UTC (rev 20982)
@@ -27,21 +27,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "shape.hpp"
-#include "Poco/ClassLibrary.h"
+#include "line.h"
#include <cmath>
-class line : public shape {
-public:
- virtual double area() const {
- return 0;
- }
-};
+double line::area() const {
+ return 0;
+}
-
-POCO_BEGIN_MANIFEST(shape)
-
-POCO_EXPORT_CLASS(line)
-
-POCO_END_MANIFEST
Added: pkg/trunk/sandbox/plugin_provider/manifest.cpp
===================================================================
--- pkg/trunk/sandbox/plugin_provider/manifest.cpp (rev 0)
+++ pkg/trunk/sandbox/plugin_provider/manifest.cpp 2009-08-07 01:47:21 UTC (rev 20982)
@@ -0,0 +1,48 @@
+/*********************************************************************
+*
+* Software License Agreement (BSD License)
+*
+* Copyright (c) 2008, Willow Garage, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above
+* copyright notice, this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided
+* with the distribution.
+* * Neither the name of Willow Garage, Inc. nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*
+* Author: Eitan Marder-Eppstein
+*********************************************************************/
+#include "pluginlib/plugin_macros.h"
+#include "polygon.h"
+#include "square.h"
+#include "triangle.h"
+
+//polygon plugin list
+BEGIN_PLUGIN_LIST(polygon)
+
+REGISTER_PLUGIN(triangle)
+REGISTER_PLUGIN(square)
+
+END_PLUGIN_LIST
Modified: pkg/trunk/sandbox/plugin_provider/manifest.xml
===================================================================
--- pkg/trunk/sandbox/plugin_provider/manifest.xml 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/sandbox/plugin_provider/manifest.xml 2009-08-07 01:47:21 UTC (rev 20982)
@@ -8,10 +8,10 @@
<license>BSD</license>
<review status="experimental" notes=""/>
<url>http://pr.willowgarage.com/wiki/pluging_provider</url>
- <depend package="plugin_user"/>
+ <depend package="pluginlib"/>
<export>
- <plugin_user polygon="${prefix}/polygon_plugins.xml" shape="${prefix}/shape_plugins.xml"/>
+ <pluginlib polygon="${prefix}/polygon_plugins.xml" shape="${prefix}/shape_plugins.xml"/>
</export>
</package>
Modified: pkg/trunk/sandbox/plugin_provider/polygon_plugins.xml
===================================================================
--- pkg/trunk/sandbox/plugin_provider/polygon_plugins.xml 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/sandbox/plugin_provider/polygon_plugins.xml 2009-08-07 01:47:21 UTC (rev 20982)
@@ -1,11 +1,11 @@
<library path="lib/libsquare">
- <plugin name="square" type="polygon">
+ <plugin name="square" class="square" type="polygon">
<description>
this is a square plugin
</description>
</plugin>
- <plugin name="triangle" type="polygon">
+ <plugin name="triangle" class="triangle" type="polygon">
<description>
this is a triangle plugin
</description>
Modified: pkg/trunk/sandbox/plugin_provider/shape_plugins.xml
===================================================================
--- pkg/trunk/sandbox/plugin_provider/shape_plugins.xml 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/sandbox/plugin_provider/shape_plugins.xml 2009-08-07 01:47:21 UTC (rev 20982)
@@ -1,5 +1,5 @@
<library path="lib/libline">
- <plugin name="line" type="shape">
+ <plugin name="line" class="line" type="shape">
<description>
this is a line plugin
</description>
Modified: pkg/trunk/sandbox/plugin_provider/square.cpp
===================================================================
--- pkg/trunk/sandbox/plugin_provider/square.cpp 2009-08-07 01:44:50 UTC (rev 20981)
+++ pkg/trunk/sandbox/plugin_provider/square.cpp 2009-08-07 01:47:21 UTC (rev 20982)
@@ -27,30 +27,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "polygon.hpp"
-#include "Poco/ClassLibrary.h"
+#include "square.h"
#include <cmath>
-class square : public polygon {
-public:
- virtual double area() const {
- return side_length_ * side_length_;
- }
-};
+square::square() : name_("my_square") {}
-class triangle : public polygon {
-public:
- virtual double area() const {
- return side_length_ * side_length_ * sqrt(3) / 2;
- }
-};
+double square::area() const {
+ return side_length_ * side_length_;
+}
-
-
-POCO_BEGIN_MANIFEST(polygon)
-
-POCO_EXPORT_CLASS(square)
-POCO_EXPORT_CLASS(triangle)
-
-POCO_END_MANIFEST
Added: pkg/trunk/sandbox/plugin_provider/square.h
===================================================================
--- pkg/trunk/sandbox/plugin_provider/square.h (rev 0)
+++ pkg/trunk/sandbox/plugin_provider/square.h 2009-08-07 01:47:21 UTC (rev 20982)
@@ -0,0 +1,49 @@
+/*********************************************************************
+*
+* Software License Agreement (BSD License)
+*
+* Copyright (c) 2008, Willow Garage, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above
+* copyright notice, this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided
+* with the distribution.
+* * Neither the name of Willow Garage, Inc. nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*
+* Author: Eitan Marder-Eppstein
+*********************************************************************/
+#ifndef SQUARE_H_
+#define SQUARE_H_
+
+#include "polygon.h"
+
+class square : public polygon {
+public:
+ square();
+ virtual double area() const;
+private:
+ std::string name_;
+};
+#endif
Added: pkg/trunk/sandbox/plugin_provider/triangle.cpp
===================================================================
--- pkg/trunk/sandbox/plugin_provider/triangle.cpp (rev 0)
+++ pkg/trunk/sandbox/plugin_provider/triangle.cpp 2009-08-07 01:47:21 UTC (rev 20982)
@@ -0,0 +1,44 @@
+/*********************************************************************
+*
+* Software License Agreement (BSD License)
+*
+* Copyright (c) 2008, Willow Garage, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above
+* copyright notice, this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided
+* with the distribution.
+* * Neither the name of Willow Garage, Inc. nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*
+* Author: Eitan Marder-Eppstein
+*********************************************************************/
+#include "triangle.h"
+#include <cmath>
+
+triangle::triangle(){}
+
+double triangle::area() const {
+ return side_length_ * side_length_ * sqrt(3) / 2;
+}
Added: pkg/trunk/sandbox/plugin_provider/triangle.h
===================================================================
--- pkg/trunk/sandbox/plugin_provider/triangle.h (rev 0)
+++ pkg/trunk/sandbox/plugin_provider/triangle.h 2009-08-07 01:47:21 UTC (rev 20982)
@@ -0,0 +1,47 @@
+/*********************************************************************
+*
+* Software License Agreement (BSD License)
+*
+* Copyright (c) 2008, Willow Garage, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above
+* copyright notice, this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided
+* with the distribution.
+* * Neither the name of Willow Garage, Inc. nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*
+* Author: Eitan Marder-Eppstein
+*********************************************************************/
+#ifndef TRIANGLE_H_
+#define TRIANGLE_H_
+
+#include "polygon.h"
+
+class triangle : public polygon {
+public:
+ triangle();
+ virtual double area() const;
+};
+#endif
Modified: pkg/trunk/sandbox/pluginlib/CMakeLists.txt
===================================================================
--- pkg/trunk/sandbox/plugin_user/CMakeLists.txt 2009-08-07 01:30:35 UTC (rev 20976)
+++ pkg/trunk/sandbox/pluginlib/CMakeLists.txt 2009-08-07 01:47:21 UTC (rev 20982)
@@ -9,30 +9,15 @@
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)
-rospack(plugin_user)
+rospack(pluginlib)
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
-#uncomment if you have defined messages
-#genmsg()
-#uncomment if you have defined services
-#gensrv()
-
-#common commands for building c++ executables and libraries
-#rospack_add_library(${PROJECT_NAME} src/example.cpp)
-#target_link_libraries(${PROJECT_NAME} another_library)
rospack_add_boost_directories()
-#rospack_link_boost(example system)
-#rospack_add_executable(examp...
[truncated message content] |
|
From: <wa...@us...> - 2009-08-07 02:04:06
|
Revision: 20990
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20990&view=rev
Author: wattsk
Date: 2009-08-07 02:03:52 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
Docs to control_toolbox/dither and fix to runtime monitor
Modified Paths:
--------------
pkg/trunk/controllers/control_toolbox/include/control_toolbox/dither.h
pkg/trunk/stacks/hardware_test/runtime_monitor/src/runtime_monitor/monitor_panel.py
Modified: pkg/trunk/controllers/control_toolbox/include/control_toolbox/dither.h
===================================================================
--- pkg/trunk/controllers/control_toolbox/include/control_toolbox/dither.h 2009-08-07 02:02:34 UTC (rev 20989)
+++ pkg/trunk/controllers/control_toolbox/include/control_toolbox/dither.h 2009-08-07 02:03:52 UTC (rev 20990)
@@ -42,7 +42,10 @@
/***************************************************/
/*! \class Dither
+ \brief Gives white noise at specified amplitude.
+ This class gives white noise at the given amplitude when
+ update() is called. Gets parameter "~amplitude".
*/
/***************************************************/
@@ -68,8 +71,7 @@
/*!
* \brief Intializes everything and calculates the constants for the sweep.
- *
- * \param amplitude The amplitude of the dither, \f$A\f$.
+ * \param n NodeHandle to look for parameters with
*/
bool init(const ros::NodeHandle &n);
@@ -79,6 +81,9 @@
double x_;
long idum; // Random seed
+ /*
+ *\brief Returns uniform deviate between 0.0 and 1.0.
+ */
double uni();
};
}
Modified: pkg/trunk/stacks/hardware_test/runtime_monitor/src/runtime_monitor/monitor_panel.py
===================================================================
--- pkg/trunk/stacks/hardware_test/runtime_monitor/src/runtime_monitor/monitor_panel.py 2009-08-07 02:02:34 UTC (rev 20989)
+++ pkg/trunk/stacks/hardware_test/runtime_monitor/src/runtime_monitor/monitor_panel.py 2009-08-07 02:03:52 UTC (rev 20990)
@@ -101,7 +101,6 @@
self._used_items = 0
def __del__(self):
- print 'Unregistering from /diagnostics'
self._subscriber.unregister()
def change_diagnostic_topic(self, topic):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pmi...@us...> - 2009-08-07 02:17:04
|
Revision: 20992
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=20992&view=rev
Author: pmihelich
Date: 2009-08-07 02:16:56 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
sensor_msgs: Cleaned up CompressedImage. Updated image_publisher. Blacklisted jpeg.
Modified Paths:
--------------
pkg/trunk/sandbox/image_publisher/include/image_publisher/image_publisher.h
pkg/trunk/sandbox/image_publisher/src/decoder.cpp
pkg/trunk/sandbox/image_publisher/src/encoder.cpp
pkg/trunk/sandbox/image_publisher/src/image_publisher.cpp
pkg/trunk/sandbox/image_publisher/src/test_publisher.cpp
pkg/trunk/stacks/common_msgs/sensor_msgs/msg/CompressedImage.msg
Added Paths:
-----------
pkg/trunk/vision/jpeg/ROS_BUILD_BLACKLIST
Modified: pkg/trunk/sandbox/image_publisher/include/image_publisher/image_publisher.h
===================================================================
--- pkg/trunk/sandbox/image_publisher/include/image_publisher/image_publisher.h 2009-08-07 02:08:56 UTC (rev 20991)
+++ pkg/trunk/sandbox/image_publisher/include/image_publisher/image_publisher.h 2009-08-07 02:16:56 UTC (rev 20992)
@@ -81,35 +81,35 @@
*
* Returns the total number of subscribers to the raw, thumbnail and compressed topics.
*/
- uint32_t getNumSubscribers() /*const*/;
+ uint32_t getNumSubscribers() const;
/*!
* \brief Returns the topic that this ImagePublisher will publish the raw
* image on.
*/
- std::string getTopic() /*const*/;
+ std::string getTopic() const;
/*!
* \brief Returns the topic that this ImagePublisher will publish the thumbnail
* image on.
*/
- std::string getTopicThumbnail() /*const*/;
+ std::string getTopicThumbnail() const;
/*!
* \brief Returns the topic that this ImagePublisher will publish the compressed
* image on.
*/
- std::string getTopicCompressed() /*const*/;
+ std::string getTopicCompressed() const;
/*!
* \brief Publish an image on the topics associated with this ImagePublisher.
*/
- void publish(const sensor_msgs::Image& message) /*const*/;
+ void publish(const sensor_msgs::Image& message) const;
/*!
* \brief Publish an image on the topics associated with this ImagePublisher.
*/
- void publish(const sensor_msgs::ImageConstPtr& message) /*const*/;
+ void publish(const sensor_msgs::ImageConstPtr& message) const;
/*!
* \brief Shutdown the advertisements associated with this ImagePublisher.
@@ -117,8 +117,8 @@
void shutdown();
private:
- void publishThumbnailImage(sensor_msgs::Image& thumbnail) /*const*/;
- void publishCompressedImage(sensor_msgs::CompressedImage& compressed) /*const*/;
+ void publishThumbnailImage(sensor_msgs::Image& thumbnail) const;
+ void publishCompressedImage(sensor_msgs::CompressedImage& compressed) const;
ros::NodeHandle node_handle_;
ros::Publisher image_pub_;
Modified: pkg/trunk/sandbox/image_publisher/src/decoder.cpp
===================================================================
--- pkg/trunk/sandbox/image_publisher/src/decoder.cpp 2009-08-07 02:08:56 UTC (rev 20991)
+++ pkg/trunk/sandbox/image_publisher/src/decoder.cpp 2009-08-07 02:16:56 UTC (rev 20992)
@@ -43,13 +43,22 @@
void imageCB(const sensor_msgs::CompressedImageConstPtr &msg)
{
- const CvMat compressed = cvMat(1, msg->uint8_data.data.size(), CV_8UC1,
- const_cast<unsigned char*>(&msg->uint8_data.data[0]));
+ const CvMat compressed = cvMat(1, msg->data.size(), CV_8UC1,
+ const_cast<unsigned char*>(&msg->data[0]));
cv::WImageBuffer_b decompressed( cvDecodeImage(&compressed, CV_LOAD_IMAGE_ANYCOLOR) );
sensor_msgs::Image image;
if ( sensor_msgs::CvBridge::fromIpltoRosImage(decompressed.Ipl(), image) ) {
image.header = msg->header;
- image.encoding = msg->encoding;
+ if (decompressed.Channels() == 1) {
+ image.encoding = "mono";
+ }
+ else if (decompressed.Channels() == 3) {
+ image.encoding = "rgb";
+ }
+ else {
+ ROS_ERROR("Unsupported number of channels: %i", decompressed.Channels());
+ return;
+ }
g_decompressed_pub.publish(image);
}
else {
Modified: pkg/trunk/sandbox/image_publisher/src/encoder.cpp
===================================================================
--- pkg/trunk/sandbox/image_publisher/src/encoder.cpp 2009-08-07 02:08:56 UTC (rev 20991)
+++ pkg/trunk/sandbox/image_publisher/src/encoder.cpp 2009-08-07 02:16:56 UTC (rev 20992)
@@ -41,8 +41,11 @@
std::string topic = n.resolveName("image");
ImagePublisher image_pub(topic, n, true);
- ros::Subscriber raw_sub = n.subscribe(topic, 1, &ImagePublisher::publish, &image_pub);
-
+
+ typedef void (ImagePublisher::*PublishMemFn)(const sensor_msgs::ImageConstPtr& message) const;
+ PublishMemFn pub_mem_fn = &ImagePublisher::publish;
+ ros::Subscriber raw_sub = n.subscribe<sensor_msgs::Image>(topic, 1,
+ boost::bind(pub_mem_fn, &image_pub, _1));
ros::spin();
return 0;
Modified: pkg/trunk/sandbox/image_publisher/src/image_publisher.cpp
===================================================================
--- pkg/trunk/sandbox/image_publisher/src/image_publisher.cpp 2009-08-07 02:08:56 UTC (rev 20991)
+++ pkg/trunk/sandbox/image_publisher/src/image_publisher.cpp 2009-08-07 02:16:56 UTC (rev 20992)
@@ -62,28 +62,28 @@
compressed_pub_ = node_handle_.advertise<sensor_msgs::CompressedImage>(topic + "_compressed", 1);
}
-uint32_t ImagePublisher::getNumSubscribers() //const
+uint32_t ImagePublisher::getNumSubscribers() const
{
return image_pub_.getNumSubscribers() + thumbnail_pub_.getNumSubscribers()
+ compressed_pub_.getNumSubscribers();
}
-std::string ImagePublisher::getTopic() //const
+std::string ImagePublisher::getTopic() const
{
return image_pub_.getTopic();
}
-std::string ImagePublisher::getTopicThumbnail() //const
+std::string ImagePublisher::getTopicThumbnail() const
{
return thumbnail_pub_.getTopic();
}
-std::string ImagePublisher::getTopicCompressed() //const
+std::string ImagePublisher::getTopicCompressed() const
{
return compressed_pub_.getTopic();
}
-void ImagePublisher::publish(const sensor_msgs::Image& message) //const
+void ImagePublisher::publish(const sensor_msgs::Image& message) const
{
if (!republishing_)
image_pub_.publish(message);
@@ -105,7 +105,7 @@
if (channels == 1)
encoding = "mono";
else if (channels == 3)
- encoding = "rgb"; /** @todo: avoid BGR->RGB conversion? */
+ encoding = "rgb";
else {
/** @todo: RGBA, BGRA. Can we do anything with other encodings? */
ROS_ERROR("Unsupported number of image channels: %d", channels);
@@ -127,13 +127,11 @@
if (compressed_subscribers > 0) {
sensor_msgs::CompressedImage compressed;
compressed.header = message.header;
- compressed.label = message.label;
- compressed.encoding = encoding;
publishCompressedImage(compressed);
}
}
-void ImagePublisher::publish(const sensor_msgs::ImageConstPtr& message) //const
+void ImagePublisher::publish(const sensor_msgs::ImageConstPtr& message) const
{
publish(*message);
}
@@ -145,7 +143,7 @@
compressed_pub_.shutdown();
}
-void ImagePublisher::publishThumbnailImage(sensor_msgs::Image& thumbnail) //const
+void ImagePublisher::publishThumbnailImage(sensor_msgs::Image& thumbnail) const
{
// Update settings from parameter server
int thumbnail_size = 128;
@@ -170,7 +168,7 @@
}
}
-void ImagePublisher::publishCompressedImage(sensor_msgs::CompressedImage& compressed) //const
+void ImagePublisher::publishCompressedImage(sensor_msgs::CompressedImage& compressed) const
{
// Update settings from parameter server
int params[3] = {0};
@@ -198,18 +196,8 @@
CvMat* buf = cvEncodeImage(extension.c_str(), image, params);
// Set up message and publish
- compressed.format = format;
- compressed.uint8_data.layout.dim.resize(2);
- compressed.uint8_data.layout.dim[0].label = "height";
- compressed.uint8_data.layout.dim[0].size = image->height;
- compressed.uint8_data.layout.dim[0].stride = 0;
-
- compressed.uint8_data.layout.dim[1].label = "width";
- compressed.uint8_data.layout.dim[1].size = image->width;
- compressed.uint8_data.layout.dim[1].stride = 0;
-
- compressed.uint8_data.data.resize(buf->width);
- memcpy(&compressed.uint8_data.data[0], buf->data.ptr, buf->width);
+ compressed.data.resize(buf->width);
+ memcpy(&compressed.data[0], buf->data.ptr, buf->width);
cvReleaseMat(&buf);
compressed_pub_.publish(compressed);
Modified: pkg/trunk/sandbox/image_publisher/src/test_publisher.cpp
===================================================================
--- pkg/trunk/sandbox/image_publisher/src/test_publisher.cpp 2009-08-07 02:08:56 UTC (rev 20991)
+++ pkg/trunk/sandbox/image_publisher/src/test_publisher.cpp 2009-08-07 02:16:56 UTC (rev 20992)
@@ -9,10 +9,11 @@
//ImagePublisher image_pub("raw_image", n);
ros::Publisher image_pub = n.advertise<sensor_msgs::Image>("raw_image", 1);
- cv::WImageBuffer3_b image( cvLoadImage(argv[1], CV_LOAD_IMAGE_COLOR) );
+ //cv::WImageBuffer3_b image( cvLoadImage(argv[1], CV_LOAD_IMAGE_COLOR) );
+ cv::WImageBuffer1_b image( cvLoadImage(argv[1], CV_LOAD_IMAGE_GRAYSCALE) );
sensor_msgs::Image msg;
sensor_msgs::CvBridge::fromIpltoRosImage(image.Ipl(), msg);
- msg.encoding = "bgr";
+ //msg.encoding = "bgr";
msg.header.frame_id = "base_link";
ros::Rate loop_rate(5);
Modified: pkg/trunk/stacks/common_msgs/sensor_msgs/msg/CompressedImage.msg
===================================================================
--- pkg/trunk/stacks/common_msgs/sensor_msgs/msg/CompressedImage.msg 2009-08-07 02:08:56 UTC (rev 20991)
+++ pkg/trunk/stacks/common_msgs/sensor_msgs/msg/CompressedImage.msg 2009-08-07 02:16:56 UTC (rev 20992)
@@ -1,13 +1,5 @@
Header header # Header
-string label # Label for the image
-string encoding # Specifies the color encoding of the data
- # Acceptable values are:
- # 1 channel types:
- # mono
- # 3 channel types:
- # rgb, bgr
string format # Specifies the format of the data
# Acceptable values:
- # jpeg
-
-std_msgs/UInt8MultiArray uint8_data
+ # jpeg, png
+uint8[] data # Compressed image buffer
Added: pkg/trunk/vision/jpeg/ROS_BUILD_BLACKLIST
===================================================================
--- pkg/trunk/vision/jpeg/ROS_BUILD_BLACKLIST (rev 0)
+++ pkg/trunk/vision/jpeg/ROS_BUILD_BLACKLIST 2009-08-07 02:16:56 UTC (rev 20992)
@@ -0,0 +1 @@
+Deprecated, and hasn't been updated to new CompressedImage message.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bla...@us...> - 2009-08-07 03:48:17
|
Revision: 21006
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21006&view=rev
Author: blaisegassend
Date: 2009-08-07 03:48:05 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
Finished move of forearm_cam
Modified Paths:
--------------
pkg/trunk/stacks/camera_drivers/forearm_cam/include/forearm_cam/ipcam_packet.h
pkg/trunk/stacks/camera_drivers/forearm_cam/src/fcamlib/fcamlib.c
pkg/trunk/stacks/camera_drivers/forearm_cam/src/nodes/forearm_node.cpp
pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/CMakeLists.txt
pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/set_name.cpp
pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/upload_mcs.cpp
Removed Paths:
-------------
pkg/trunk/drivers/cam/forearm_cam/
Modified: pkg/trunk/stacks/camera_drivers/forearm_cam/include/forearm_cam/ipcam_packet.h
===================================================================
--- pkg/trunk/stacks/camera_drivers/forearm_cam/include/forearm_cam/ipcam_packet.h 2009-08-07 03:37:38 UTC (rev 21005)
+++ pkg/trunk/stacks/camera_drivers/forearm_cam/include/forearm_cam/ipcam_packet.h 2009-08-07 03:48:05 UTC (rev 21006)
@@ -26,6 +26,7 @@
#define FLASH_PAGE_SIZE 264
#define FLASH_NAME_PAGENO FLASH_MAX_PAGENO
+#define FLASH_CALIBRATION_PAGENO (FLASH_MAX_PAGENO - 2)
#define CAMERA_NAME_LEN 40
#ifdef LIBRARY_BUILD
@@ -583,8 +584,6 @@
/**
* The PacketAnnounce is generated by the camera in response to a PacketDiscover or PacketConfigure.
* It provides complete information about the camera and the versions of its subcomponents.
- *
- * The system's IP address is not explicitly encoded in the PacketAnnounce since it is present in the IP headers.
*/
typedef struct PACKED_ATTRIBUTE {
/// Generic Command Packet Headers
@@ -596,7 +595,7 @@
uint32_t ser_no; ///< The unique four-byte serial number assigned to this camera
char product_name[40]; ///< The fixed product name assigned to the FCAM camera by Willow Garage. Null terminated string.
char camera_name[40]; ///< The name assigned to this particular camera. Null terminated string.
- IPAddress camera_ip; ///< The currently configured camera name.
+ IPAddress camera_ip; ///< The default power-up IP address for the camera.
/**
* FPGA and system board revision, formatted as follows:
Modified: pkg/trunk/stacks/camera_drivers/forearm_cam/src/fcamlib/fcamlib.c
===================================================================
--- pkg/trunk/stacks/camera_drivers/forearm_cam/src/fcamlib/fcamlib.c 2009-08-07 03:37:38 UTC (rev 21005)
+++ pkg/trunk/stacks/camera_drivers/forearm_cam/src/fcamlib/fcamlib.c 2009-08-07 03:48:05 UTC (rev 21006)
@@ -13,7 +13,7 @@
#include "forearm_cam/ipcam_packet.h"
/// Amount of time in microseconds that the host should wait for packet replies
-#define STD_REPLY_TIMEOUT SEC_TO_USEC(0.2)
+#define STD_REPLY_TIMEOUT SEC_TO_USEC(0.5)
#define STOP_REPLY_TIMEOUT SEC_TO_USEC(0.001)
#define VMODEDEF(width, height, fps, hblank, vblank) { #width"x"#height"x"#fps, width, height, fps, hblank, vblank }
@@ -515,9 +515,6 @@
cPkt.ser_no = htonl(camInfo->serial);
- struct in_addr newIP;
- inet_aton(ipAddress, &newIP);
- cPkt.ip_addr = newIP.s_addr;
// Create and send the Configure broadcast packet. It is sent broadcast
@@ -531,16 +528,33 @@
perror("fcamConfigure socket creation failed");
return -1;
}
+
+ if (!ipAddress)
+ {
+ cPkt.ip_addr = camInfo->ip;
+
+ if(wgSendUDP(s, &camInfo->ip, &cPkt, sizeof(cPkt)) == -1) {
+ debug("Unable to send packet\n");
+ close(s);
+ return -1;
+ }
+ }
+ else
+ {
+ struct in_addr newIP;
+ inet_aton(ipAddress, &newIP);
+ cPkt.ip_addr = newIP.s_addr;
- if(wgSendUDPBcast(s, camInfo->ifName, &cPkt, sizeof(cPkt)) == -1) {
- debug("Unable to send broadcast\n");
- close(s);
- return -1;
- }
+ if(wgSendUDPBcast(s, camInfo->ifName, &cPkt, sizeof(cPkt)) == -1) {
+ debug("Unable to send broadcast\n");
+ close(s);
+ return -1;
+ }
+ }
// 'Connect' insures we will only receive datagram replies from the camera's new IP
- IPAddress camIP = newIP.s_addr;
+ IPAddress camIP = cPkt.ip_addr;
if( wgSocketConnect(s, &camIP) ) {
close(s);
return -1;
@@ -873,6 +887,8 @@
if (!retval)
return 0;
+
+ debug("Flash read failed.");
}
return retval;
@@ -979,6 +995,7 @@
retval = fcamFlashWrite( camInfo, address, pageDataIn );
if (retval)
{
+ debug("Failed write, retries left: %i.", *retries);
//printf("Failed compare write.\n");
continue;
}
@@ -986,12 +1003,14 @@
retval = fcamReliableFlashRead( camInfo, address, buffer, retries );
if (retval)
{
+ debug("Failed compare read.");
//printf("Failed compare read.\n");
continue;
}
if (!memcmp(buffer, pageDataIn, FLASH_PAGE_SIZE))
return 0;
+ debug("Failed compare.");
//printf("Failed compare.\n");
if (*retries == 0) // In case retries ran out during the read.
@@ -1822,7 +1841,7 @@
return 1;
}
- debug("fcamVidReceive ready to receive on %s (%s:%u)\n", ifName, inet_ntoa(localIp), port);
+ debug("fcamVidReceive ready to receive on %s (%s:%u)\n", camera->ifName, inet_ntoa(localIp), port);
s = wgSocketCreate( &localIp, 0 );
if( s == -1 ) {
Modified: pkg/trunk/stacks/camera_drivers/forearm_cam/src/nodes/forearm_node.cpp
===================================================================
--- pkg/trunk/stacks/camera_drivers/forearm_cam/src/nodes/forearm_node.cpp 2009-08-07 03:37:38 UTC (rev 21005)
+++ pkg/trunk/stacks/camera_drivers/forearm_cam/src/nodes/forearm_node.cpp 2009-08-07 03:48:05 UTC (rev 21006)
@@ -199,7 +199,6 @@
ros::ServiceServer config_bord_service_;
// Video mode
-
int video_mode_;
int width_;
int height_;
@@ -225,6 +224,7 @@
// Camera information
std::string hwinfo_;
IpCamList camera_;
+ double last_camera_ok_time_;
// Trigger information
std::string trig_controller_cmd_;
@@ -249,6 +249,7 @@
// fcamCamListInit(&camList);
// Clear statistics
+ last_camera_ok_time_ = 0;
last_image_time_ = 0;
missed_line_count_ = 0;
missed_eof_count_ = 0;
@@ -321,14 +322,24 @@
ROS_WARN("rmem_max is %i. Buffer overflows and packet loss may occur. Minimum recommended value is 20000000. Updates may not take effect until the driver is restarted. See http://pr.willowgarage.com/wiki/errors/Dropped_Frames_and_rmem_max for details.", rmem_max_);
}
- const char *errmsg;
- int findResult = fcamFindByUrl(config_.camera_url.c_str(), &camera_, SEC_TO_USEC(0.2), &errmsg);
+ double thresh_time = ros::Time::now().toSec() - 10;
+ double last_time = last_image_time_ < last_camera_ok_time_ ?
+ last_camera_ok_time_ : last_image_time_;
+ if (last_time < thresh_time)
+ { // Haven't heard from the camera in a while, redo discovery.
+ ROS_DEBUG("Redoing discovery.");
+ const char *errmsg;
+ int findResult = fcamFindByUrl(config_.camera_url.c_str(), &camera_, SEC_TO_USEC(0.2), &errmsg);
- if (findResult)
- {
- ROS_ERROR("Matching URL %s : %s", config_.camera_url.c_str(), errmsg);
- return;
+ if (findResult)
+ {
+ ROS_ERROR("Matching URL %s : %s", config_.camera_url.c_str(), errmsg);
+ return;
+ }
+ retval = fcamConfigure(&camera_, camera_.ip_str, SEC_TO_USEC(0.5));
}
+ else
+ retval = fcamConfigure(&camera_, NULL, SEC_TO_USEC(0.5));
retval = fcamConfigure(&camera_, camera_.ip_str, SEC_TO_USEC(0.5));
if (retval != 0) {
@@ -453,6 +464,7 @@
config_bord_service_ = node_handle_.advertiseService("~board_config", &ForearmCamDriver::boardConfig, this);
state_ = OPENED;
+ last_camera_ok_time_ = ros::Time::now().toSec(); // If we get here we are communicating with the camera well.
}
void doClose()
@@ -562,7 +574,7 @@
fcamVidReceiveAuto( &camera_, height_, width_, &ForearmCamDriver::frameHandler, this);
- // Stop Triggering
+ /*// Stop Triggering
if (!trig_controller_cmd_.empty())
{
ROS_DEBUG("Stopping triggering.");
@@ -575,7 +587,7 @@
// so we don't really care.
ROS_DEBUG("Was not able to stop triggering.");
}
- }
+ } */
/*stop_video:
// Stop video
boost::mutex::scoped_lock lock(mutex_);
@@ -786,12 +798,18 @@
return fa_node.frameHandler(frameInfo);
}
+ uint16_t intrinsicsChecksum(uint16_t *data, int words)
+ {
+ uint16_t sum = 0;
+ for (int i = 0; i < words; i++)
+ sum += htons(data[i]);
+ return htons(0xFFFF - sum);
+ }
+
// TODO: parsing is basically duplicated in prosilica_node
bool loadIntrinsics(double* D, double* K, double* R, double* P)
{
- // FIXME: Hardcoding these until we get a response on flash read/write bug.
- // These values are good for PRF and possibly OK for the other cameras.
-#define FOREARM_FLASH_IS_BUGGY
+//#define FOREARM_FLASH_IS_BUGGY
#ifdef FOREARM_FLASH_IS_BUGGY
static const double D_[] = {-0.34949, 0.13668, 0.00039, -0.00110, 0.00000};
static const double K_[] = {427.31441, 0.00000, 275.80804,
@@ -810,17 +828,25 @@
return true;
#else
// Retrieve contents of user memory
- static const int CALIBRATION_PAGE = 0;
- std::string buffer(FLASH_PAGE_SIZE, '\0');
- if (fcamReliableFlashRead(camera_, CALIBRATION_PAGE, (uint8_t*)&buffer[0], NULL) != 0) {
- ROS_WARN("Flash read error");
+ std::string calbuff(2 * FLASH_PAGE_SIZE, 0);
+
+ if(fcamReliableFlashRead(&camera_, FLASH_CALIBRATION_PAGENO, (uint8_t *) &calbuff[0], NULL) != 0 ||
+ fcamReliableFlashRead(&camera_, FLASH_CALIBRATION_PAGENO+1, (uint8_t *) &calbuff[FLASH_PAGE_SIZE], NULL) != 0)
+ {
+ ROS_ERROR("Error reading camera intrinsics.\n");
return false;
}
+ uint16_t chk = intrinsicsChecksum((uint16_t *) &calbuff[0], calbuff.length() / 2);
+ if (chk)
+ {
+ ROS_WARN("Camera intrinsics have a bad checksum. They have probably never been set.\n");
+ }
+
// Separate into lines
typedef boost::tokenizer<boost::char_separator<char> > Tok;
boost::char_separator<char> sep("\n");
- Tok tok(buffer, sep);
+ Tok tok(calbuff, sep);
// Check "header"
Tok::iterator iter = tok.begin();
@@ -913,6 +939,7 @@
calibrated_(false)
{
driver_.useFrame_ = boost::bind(&ForearmCamNode::publishImage, this, _1, _2, _3, _4);
+ driver_.setPostOpenHook(boost::bind(&ForearmCamNode::postOpenHook, this));
}
private:
@@ -948,23 +975,26 @@
cam_info_.height = driver_.height_;
image_.header.frame_id = driver_.config_.frame_id;
cam_info_.header.frame_id = driver_.config_.frame_id;
-
- // Try to load camera intrinsics from flash memory
- calibrated_ = driver_.loadIntrinsics(&cam_info_.D[0], &cam_info_.K[0],
- &cam_info_.R[0], &cam_info_.P[0]);
- if (calibrated_)
- ROS_INFO("Loaded intrinsics from camera");
- else
- ROS_WARN("Failed to load intrinsics from camera");
-
- // Receive frames through callback
- if (calibrated_)
- cam_info_pub_.set_publisher(node_handle_.advertise<sensor_msgs::CameraInfo>("~cam_info", 1));
- else
- cam_info_pub_.set_publisher(ros::Publisher());
}
}
+ void postOpenHook()
+ {
+ // Try to load camera intrinsics from flash memory
+ calibrated_ = driver_.loadIntrinsics(&cam_info_.D[0], &cam_info_.K[0],
+ &cam_info_.R[0], &cam_info_.P[0]);
+ if (calibrated_)
+ ROS_INFO("Loaded intrinsics from camera");
+ else
+ ROS_WARN("Failed to load intrinsics from camera");
+
+ // Receive frames through callback
+ if (calibrated_)
+ cam_info_pub_.set_publisher(node_handle_.advertise<sensor_msgs::CameraInfo>("~cam_info", 1));
+ else
+ cam_info_pub_.set_publisher(ros::Publisher());
+ }
+
virtual void addDiagnostics()
{
// Set up diagnostics
Modified: pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/CMakeLists.txt
===================================================================
--- pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/CMakeLists.txt 2009-08-07 03:37:38 UTC (rev 21005)
+++ pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/CMakeLists.txt 2009-08-07 03:48:05 UTC (rev 21006)
@@ -1,6 +1,9 @@
rospack_add_executable(access_register access_register.cpp)
target_link_libraries(access_register forearmcam)
+rospack_add_executable(set_calibration set_calibration.cpp)
+target_link_libraries(set_calibration forearmcam)
+
rospack_add_executable(set_name set_name.cpp)
target_link_libraries(set_name forearmcam)
Modified: pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/set_name.cpp
===================================================================
--- pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/set_name.cpp 2009-08-07 03:37:38 UTC (rev 21005)
+++ pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/set_name.cpp 2009-08-07 03:48:05 UTC (rev 21006)
@@ -58,7 +58,7 @@
int read_name(IpCamList *camera)
{
- unsigned char namebuff[FLASH_PAGE_SIZE];
+ uint8_t namebuff[FLASH_PAGE_SIZE];
IdentityFlashPage *id = (IdentityFlashPage *) &namebuff;
if(fcamReliableFlashRead(camera, FLASH_NAME_PAGENO, (uint8_t *) namebuff, NULL) != 0)
@@ -70,7 +70,7 @@
uint16_t chk = checksum((uint16_t *) namebuff);
if (chk)
{
- fprintf(stderr, "Previous camera name had bad checksum. Error: %04x\n", chk);
+ fprintf(stderr, "Previous camera name had bad checksum.\n");
}
id->cam_name[sizeof(id->cam_name) - 1] = 0;
@@ -83,7 +83,7 @@
int write_name(IpCamList *camera, char *name, char *new_ip)
{
- unsigned char namebuff[FLASH_PAGE_SIZE];
+ uint8_t namebuff[FLASH_PAGE_SIZE];
IdentityFlashPage *id = (IdentityFlashPage *) &namebuff;
if (strlen(name) > sizeof(id->cam_name) - 1)
@@ -111,7 +111,7 @@
fprintf(stderr, "Success! Restarting camera, should take about 10 seconds to come back up after this.\n");
- fcamReconfigureFPGA(camera);
+ fcamReset(camera);
return 0;
}
Modified: pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/upload_mcs.cpp
===================================================================
--- pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/upload_mcs.cpp 2009-08-07 03:37:38 UTC (rev 21005)
+++ pkg/trunk/stacks/camera_drivers/forearm_cam/src/utilities/upload_mcs.cpp 2009-08-07 03:48:05 UTC (rev 21006)
@@ -267,7 +267,7 @@
}
int addr = page * FLASH_PAGE_SIZE;
- int startretries = 1;
+ int startretries = 10;
int retries = startretries;
if (fcamReliableFlashWrite(&camera, page, (uint8_t *) firmware + addr, &retries) != 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tf...@us...> - 2009-08-07 04:37:35
|
Revision: 21013
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21013&view=rev
Author: tfoote
Date: 2009-08-07 04:37:27 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
moving manipulation msgs out of common stack for #1911
Added Paths:
-----------
pkg/trunk/sandbox/manipulation_msgs/
Removed Paths:
-------------
pkg/trunk/stacks/common/manipulation_msgs/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tf...@us...> - 2009-08-07 04:38:14
|
Revision: 21014
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21014&view=rev
Author: tfoote
Date: 2009-08-07 04:38:02 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
moving manipulation srvs out of common stack for #1911
Added Paths:
-----------
pkg/trunk/sandbox/manipulation_srvs/
Removed Paths:
-------------
pkg/trunk/stacks/common/manipulation_srvs/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <stu...@us...> - 2009-08-07 17:54:50
|
Revision: 21031
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21031&view=rev
Author: stuglaser
Date: 2009-08-07 17:54:43 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
Removed robot_srvs/GetValue for issue #1948
Modified Paths:
--------------
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_smoothing_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/src/joint_position_controller.cpp
pkg/trunk/controllers/robot_mechanism_controllers/src/joint_position_smoothing_controller.cpp
pkg/trunk/controllers/robot_mechanism_controllers/src/joint_velocity_controller.cpp
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h
Removed Paths:
-------------
pkg/trunk/stacks/common_msgs/robot_srvs/srv/GetValue.srv
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h 2009-08-07 17:42:00 UTC (rev 21030)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h 2009-08-07 17:54:43 UTC (rev 21031)
@@ -56,9 +56,7 @@
#include "misc_utils/advertised_service_guard.h"
#include "misc_utils/subscription_guard.h"
-// Services
#include <std_msgs/Float64.h>
-#include <robot_srvs/GetValue.h>
namespace controller
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h 2009-08-07 17:42:00 UTC (rev 21030)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h 2009-08-07 17:54:43 UTC (rev 21031)
@@ -62,7 +62,6 @@
// Services
#include <std_msgs/Float64.h>
-#include <robot_srvs/GetValue.h>
//Realtime publisher
#include <robot_mechanism_controllers/JointControllerState.h>
@@ -115,8 +114,8 @@
mechanism::RobotState *robot_; /**< Pointer to robot structure. */
control_toolbox::Pid pid_controller_; /**< Internal PID controller. */
double last_time_; /**< Last time stamp of update. */
-
+
ros::NodeHandle node_;
boost::scoped_ptr<
@@ -148,19 +147,13 @@
void update();
bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
- // Topics
void setCommand();
- //Sevices
- bool getCommand(robot_srvs::GetValue::Request &req,
- robot_srvs::GetValue::Response &resp);
-
private:
//node stuff
std::string service_prefix_; /**< The name of the controller. */
ros::Node *node_;
- AdvertisedServiceGuard guard_get_command_; /**< Makes sure the advertise goes down neatly. */
SubscriptionGuard guard_set_command_; /**< Makes sure the subscription goes down neatly. */
//msgs
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_smoothing_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_smoothing_controller.h 2009-08-07 17:42:00 UTC (rev 21030)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_smoothing_controller.h 2009-08-07 17:54:43 UTC (rev 21031)
@@ -60,7 +60,6 @@
// Services
#include <std_msgs/Float64.h>
-#include <robot_srvs/GetValue.h>
namespace controller
{
@@ -110,7 +109,7 @@
control_toolbox::Pid pid_controller_; /**< Internal PID controller. */
double last_time_; /**< Last time stamp of update. */
double command_; /**< Last commanded position. */
- double smoothed_error_;
+ double smoothed_error_;
double smoothing_factor_;
};
@@ -133,19 +132,13 @@
void update();
bool initXml(mechanism::RobotState *robot, TiXmlElement *config);
- // Topics
void setCommand();
- //Sevices
- bool getCommand(robot_srvs::GetValue::Request &req,
- robot_srvs::GetValue::Response &resp);
-
private:
//node stuff
std::string service_prefix_; /**< The name of the controller. */
ros::Node *node_;
- AdvertisedServiceGuard guard_get_command_; /**< Makes sure the advertise goes down neatly. */
SubscriptionGuard guard_set_command_; /**< Makes sure the subscription goes down neatly. */
//msgs
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h 2009-08-07 17:42:00 UTC (rev 21030)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h 2009-08-07 17:54:43 UTC (rev 21031)
@@ -71,7 +71,6 @@
// Services
#include <std_msgs/Float64.h>
-#include <robot_srvs/GetValue.h>
//Realtime publisher
#include <robot_mechanism_controllers/JointControllerState.h>
@@ -131,7 +130,7 @@
control_toolbox::Pid pid_controller_; /**< Internal PID controller. */
double last_time_; /**< Last time stamp of update. */
int loop_count_;
-
+
friend class JointVelocityControllerNode;
boost::scoped_ptr<
@@ -161,18 +160,13 @@
void update();
bool initXml(mechanism::RobotState *robot_state, TiXmlElement *config);
- // Topics
void setCommand();
- //Services
- bool getCommand(robot_srvs::GetValue::Request &req,
- robot_srvs::GetValue::Response &resp);
private:
//node stuff
std::string service_prefix_; /**< The name of the controller. */
ros::Node *node_;
- AdvertisedServiceGuard guard_get_command_; /**< Makes sure the advertise goes down neatly. */
SubscriptionGuard guard_set_command_; /**< Makes sure the subscription goes down neatly. */
//msgs
Modified: pkg/trunk/controllers/robot_mechanism_controllers/src/joint_position_controller.cpp
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/src/joint_position_controller.cpp 2009-08-07 17:42:00 UTC (rev 21030)
+++ pkg/trunk/controllers/robot_mechanism_controllers/src/joint_position_controller.cpp 2009-08-07 17:54:43 UTC (rev 21031)
@@ -304,9 +304,6 @@
//subscriptions
node_->subscribe(service_prefix_ + "/set_command", cmd_, &JointPositionControllerNode::setCommand, this, 1);
guard_set_command_.set(service_prefix_ + "/set_command");
- //services
- node_->advertiseService(service_prefix_ + "/get_command", &JointPositionControllerNode::getCommand, this);
- guard_get_command_.set(service_prefix_ + "/get_command");
pid_tuner_.add(&c_->pid_controller_);
@@ -320,13 +317,4 @@
c_->setCommand(cmd_.data);
}
-bool JointPositionControllerNode::getCommand(robot_srvs::GetValue::Request &req,
- robot_srvs::GetValue::Response &resp)
-{
- double cmd;
- c_->getCommand(cmd);
- resp.v = cmd;
- return true;
}
-
-}
Modified: pkg/trunk/controllers/robot_mechanism_controllers/src/joint_position_smoothing_controller.cpp
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/src/joint_position_smoothing_controller.cpp 2009-08-07 17:42:00 UTC (rev 21030)
+++ pkg/trunk/controllers/robot_mechanism_controllers/src/joint_position_smoothing_controller.cpp 2009-08-07 17:54:43 UTC (rev 21031)
@@ -191,9 +191,6 @@
//subscriptions
node_->subscribe(service_prefix_ + "/set_command", cmd_, &JointPositionSmoothControllerNode::setCommand, this, 1);
guard_set_command_.set(service_prefix_ + "/set_command");
- //services
- node_->advertiseService(service_prefix_ + "/get_command", &JointPositionSmoothControllerNode::getCommand, this);
- guard_get_command_.set(service_prefix_ + "/get_command");
return true;
}
@@ -203,15 +200,5 @@
c_->setCommand(cmd_.data);
}
-bool JointPositionSmoothControllerNode::getCommand(robot_srvs::GetValue::Request &req,
- robot_srvs::GetValue::Response &resp)
-{
- double cmd;
- c_->getCommand(cmd);
- resp.v = cmd;
- return true;
-}
-
-
Modified: pkg/trunk/controllers/robot_mechanism_controllers/src/joint_velocity_controller.cpp
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/src/joint_velocity_controller.cpp 2009-08-07 17:42:00 UTC (rev 21030)
+++ pkg/trunk/controllers/robot_mechanism_controllers/src/joint_velocity_controller.cpp 2009-08-07 17:54:43 UTC (rev 21031)
@@ -254,9 +254,6 @@
//subscriptions
node_->subscribe(service_prefix_ + "/set_command", cmd_, &JointVelocityControllerNode::setCommand, this, 1);
guard_set_command_.set(service_prefix_ + "/set_command");
- //services
- node_->advertiseService(service_prefix_ + "/get_command", &JointVelocityControllerNode::getCommand, this);
- guard_get_command_.set(service_prefix_ + "/get_command");
pid_tuner_.add(&c_->pid_controller_);
pid_tuner_.advertise(service_prefix_);
@@ -268,13 +265,4 @@
c_->setCommand(cmd_.data);
}
-bool JointVelocityControllerNode::getCommand(robot_srvs::GetValue::Request &req,
- robot_srvs::GetValue::Response &resp)
-{
- double cmd;
- c_->getCommand(cmd);
- resp.v = cmd;
- return true;
-}
-
} // namespace
Modified: pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h 2009-08-07 17:42:00 UTC (rev 21030)
+++ pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h 2009-08-07 17:54:43 UTC (rev 21031)
@@ -71,7 +71,6 @@
// Services
#include <std_msgs/Float64.h>
-#include <robot_srvs/GetValue.h>
//Realtime publisher
#include <robot_mechanism_controllers/JointControllerState.h>
Deleted: pkg/trunk/stacks/common_msgs/robot_srvs/srv/GetValue.srv
===================================================================
--- pkg/trunk/stacks/common_msgs/robot_srvs/srv/GetValue.srv 2009-08-07 17:42:00 UTC (rev 21030)
+++ pkg/trunk/stacks/common_msgs/robot_srvs/srv/GetValue.srv 2009-08-07 17:54:43 UTC (rev 21031)
@@ -1,2 +0,0 @@
----
-float64 v
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rob...@us...> - 2009-08-07 18:38:35
|
Revision: 21034
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21034&view=rev
Author: rob_wheeler
Date: 2009-08-07 18:38:25 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
Kill old realtime_tools.h wrapper for Xenomai.
Modified Paths:
--------------
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/src/arm_trajectory_controller.cpp
pkg/trunk/controllers/pr2_mechanism_controllers/src/joint_trajectory_controller.cpp
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/probe.h
pkg/trunk/drivers/cam/camera_trigger_test/src/led_flash_record.cpp
pkg/trunk/drivers/cam/camera_trigger_test/src/timestamp_test.cpp
pkg/trunk/drivers/cam/camera_trigger_test/src/trigger_test.cpp
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/recorder.h
pkg/trunk/stacks/mechanism/mechanism_control/src/mechanism_control.cpp
pkg/trunk/stacks/mechanism/mechanism_control/src/recorder.cpp
pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/ethercat_hardware.cpp
pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg0x.cpp
pkg/trunk/util/realtime_tools/CMakeLists.txt
pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_publisher.h
pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_srv_call.h
Removed Paths:
-------------
pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_tools.h
pkg/trunk/util/realtime_tools/include/realtime_tools/xenomai_prototypes.h
pkg/trunk/util/realtime_tools/src/
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -68,7 +68,6 @@
#include <pr2_mechanism_controllers/ControllerState.h>
#include <realtime_tools/realtime_publisher.h>
-#include <realtime_tools/realtime_tools.h>
#include <std_msgs/String.h>
namespace controller
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -54,7 +54,6 @@
#include <pr2_mechanism_controllers/ControllerState.h>
#include <realtime_tools/realtime_publisher.h>
-#include <realtime_tools/realtime_tools.h>
#include <std_msgs/String.h>
#include <angles/angles.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/src/arm_trajectory_controller.cpp
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/src/arm_trajectory_controller.cpp 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/src/arm_trajectory_controller.cpp 2009-08-07 18:38:25 UTC (rev 21034)
@@ -191,7 +191,7 @@
{
#ifdef PUBLISH_MAX_TIME
- double start_time = realtime_gettime();
+ double start_time = ros::Time::now().toSec();
#endif
double sample_time(0.0);
@@ -238,7 +238,7 @@
updateJointControllers();
#ifdef PUBLISH_MAX_TIME
- double end_time = realtime_gettime();
+ double end_time = ros::Time::now().toSec();
max_update_time_ = std::max(max_update_time_,end_time-start_time);
if (controller_state_publisher_->trylock())
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/src/joint_trajectory_controller.cpp
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/src/joint_trajectory_controller.cpp 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/src/joint_trajectory_controller.cpp 2009-08-07 18:38:25 UTC (rev 21034)
@@ -460,7 +460,7 @@
void JointTrajectoryController::update(void)
{
#ifdef PUBLISH_MAX_TIME
- double start_time = realtime_gettime();
+ double start_time = ros::Time::now().toSec();
#endif
current_time_ = robot_->hw_->current_time_;
updateJointValues();
@@ -531,7 +531,7 @@
#ifdef PUBLISH_MAX_TIME
- double end_time = realtime_gettime();
+ double end_time = ros::Time::now().toSec();
max_update_time_ = std::max(max_update_time_,end_time-start_time);
if (controller_state_publisher_->trylock())
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -67,7 +67,6 @@
#include <robot_mechanism_controllers/JointControllerState.h>
#include <robot_mechanism_controllers/JointTuningMsg.h>
#include <realtime_tools/realtime_publisher.h>
-#include <realtime_tools/realtime_tools.h>
namespace controller
{
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -75,7 +75,6 @@
//Realtime publisher
#include <robot_mechanism_controllers/JointControllerState.h>
#include <realtime_tools/realtime_publisher.h>
-#include <realtime_tools/realtime_tools.h>
namespace controller
{
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/probe.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/probe.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/probe.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -39,8 +39,6 @@
#include <robot_mechanism_controllers/JointControllerState.h>
#include <robot_mechanism_controllers/JointTuningMsg.h>
-#include <realtime_tools/realtime_publisher.h>
-#include <realtime_tools/realtime_tools.h>
namespace controller
{
Modified: pkg/trunk/drivers/cam/camera_trigger_test/src/led_flash_record.cpp
===================================================================
--- pkg/trunk/drivers/cam/camera_trigger_test/src/led_flash_record.cpp 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/drivers/cam/camera_trigger_test/src/led_flash_record.cpp 2009-08-07 18:38:25 UTC (rev 21034)
@@ -38,7 +38,6 @@
#include <stdio.h>
#include <signal.h>
#include <robot_mechanism_controllers/SetWaveform.h>
-#include <realtime_tools/realtime_tools.h>
#include <robot_mechanism_controllers/trigger_controller.h>
#include <algorithm>
#include <boost/format.hpp>
Modified: pkg/trunk/drivers/cam/camera_trigger_test/src/timestamp_test.cpp
===================================================================
--- pkg/trunk/drivers/cam/camera_trigger_test/src/timestamp_test.cpp 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/drivers/cam/camera_trigger_test/src/timestamp_test.cpp 2009-08-07 18:38:25 UTC (rev 21034)
@@ -38,7 +38,6 @@
#include <stdio.h>
#include <signal.h>
#include <robot_mechanism_controllers/SetWaveform.h>
-#include <realtime_tools/realtime_tools.h>
#include <robot_mechanism_controllers/trigger_controller.h>
class TimestampTest
Modified: pkg/trunk/drivers/cam/camera_trigger_test/src/trigger_test.cpp
===================================================================
--- pkg/trunk/drivers/cam/camera_trigger_test/src/trigger_test.cpp 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/drivers/cam/camera_trigger_test/src/trigger_test.cpp 2009-08-07 18:38:25 UTC (rev 21034)
@@ -38,7 +38,6 @@
#include <stdio.h>
#include <signal.h>
#include <robot_mechanism_controllers/SetWaveform.h>
-#include <realtime_tools/realtime_tools.h>
class TriggerTest
{
@@ -208,7 +207,7 @@
break;
case 1:
- double curtime = realtime_gettime();
+ double curtime = ros::Time::now().toSec();
double curphase = fmod(curtime * led_config_.rep_rate - led_config_.phase, 1);
fprintf(outfile_, "delay: %f intensity: %f led: %i\n", curphase / led_config_.rep_rate,
intensity, curphase < led_config_.duty_cycle);
Modified: pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -75,7 +75,6 @@
//Realtime publisher
#include <robot_mechanism_controllers/JointControllerState.h>
#include <realtime_tools/realtime_publisher.h>
-#include <realtime_tools/realtime_tools.h>
#include <angles/angles.h>
Modified: pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -47,7 +47,6 @@
#include <manipulation_srvs/QuerySplineTraj.h>
#include <manipulation_srvs/CancelSplineTraj.h>
-#include <realtime_tools/realtime_tools.h>
#include <realtime_tools/realtime_publisher.h>
#include <experimental_controllers/pid_position_velocity_controller.h>
Modified: pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/recorder.h
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/recorder.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/recorder.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -37,7 +37,6 @@
#include "ros/node_handle.h"
#include "mechanism_model/robot.h"
-#include "realtime_tools/realtime_tools.h"
#include "mechanism_msgs/BufferedData.h"
Modified: pkg/trunk/stacks/mechanism/mechanism_control/src/mechanism_control.cpp
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/src/mechanism_control.cpp 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/stacks/mechanism/mechanism_control/src/mechanism_control.cpp 2009-08-07 18:38:25 UTC (rev 21034)
@@ -59,8 +59,8 @@
pub_diagnostics_(node_, "/diagnostics", 1),
pub_joints_(node_, "joint_states", 1),
pub_mech_state_(node_, "mechanism_state", 1),
- last_published_state_(realtime_gettime()),
- last_published_diagnostics_(realtime_gettime())
+ last_published_state_(ros::Time::now().toSec()),
+ last_published_diagnostics_(ros::Time::now().toSec())
{
model_.hw_ = hw;
}
@@ -125,25 +125,25 @@
std::vector<ControllerSpec> &controllers = controllers_lists_[used_by_realtime_];
std::vector<size_t> &scheduling = controllers_scheduling_[used_by_realtime_];
- double start = realtime_gettime();
+ double start = ros::Time::now().toSec();
state_->propagateState();
state_->zeroCommands();
- double start_update = realtime_gettime();
+ double start_update = ros::Time::now().toSec();
pre_update_stats_.acc(start_update - start);
// Update all controllers in scheduling order
for (size_t i=0; i<controllers.size(); i++){
- double start = realtime_gettime();
+ double start = ros::Time::now().toSec();
controllers[scheduling[i]].c->updateRequest();
- double end = realtime_gettime();
+ double end = ros::Time::now().toSec();
controllers[scheduling[i]].stats->acc(end - start);
}
- double end_update = realtime_gettime();
+ double end_update = ros::Time::now().toSec();
update_stats_.acc(end_update - start_update);
state_->enforceSafety();
state_->propagateEffort();
- double end = realtime_gettime();
+ double end = ros::Time::now().toSec();
post_update_stats_.acc(end - end_update);
// publish diagnostics and state
@@ -441,9 +441,9 @@
void MechanismControl::publishDiagnostics()
{
- if (round ((realtime_gettime() - last_published_diagnostics_ - publish_period_diagnostics_)/ (0.000001)) >= 0)
+ if (round ((ros::Time::now().toSec() - last_published_diagnostics_ - publish_period_diagnostics_)/ (0.000001)) >= 0)
{
- last_published_diagnostics_ = realtime_gettime();
+ last_published_diagnostics_ = ros::Time::now().toSec();
if (pub_diagnostics_.trylock())
{
std::vector<ControllerSpec> &controllers = controllers_lists_[used_by_realtime_];
@@ -516,9 +516,9 @@
void MechanismControl::publishState()
{
- if (round ((realtime_gettime() - last_published_state_ - publish_period_state_)/ (0.000001)) >= 0)
+ if (round ((ros::Time::now().toSec() - last_published_state_ - publish_period_state_)/ (0.000001)) >= 0)
{
- last_published_state_ = realtime_gettime();
+ last_published_state_ = ros::Time::now().toSec();
if (pub_mech_state_.trylock())
{
unsigned int j = 0;
@@ -566,8 +566,8 @@
out->motor_voltage = in->motor_voltage_;
out->num_encoder_errors = in->num_encoder_errors_;
}
- pub_mech_state_.msg_.header.stamp.fromSec(realtime_gettime());
- pub_mech_state_.msg_.time = realtime_gettime();
+ pub_mech_state_.msg_.header.stamp = ros::Time::now();
+ pub_mech_state_.msg_.time = ros::Time::now().toSec();
pub_mech_state_.unlockAndPublish();
}
@@ -592,7 +592,7 @@
}
}
- pub_joints_.msg_.header.stamp.fromSec(realtime_gettime());
+ pub_joints_.msg_.header.stamp = ros::Time::now();
pub_joints_.unlockAndPublish();
}
Modified: pkg/trunk/stacks/mechanism/mechanism_control/src/recorder.cpp
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/src/recorder.cpp 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/stacks/mechanism/mechanism_control/src/recorder.cpp 2009-08-07 18:38:25 UTC (rev 21034)
@@ -100,11 +100,6 @@
void Recorder::publishingLoop()
{
- RealtimeTask task;
- int err = realtime_shadow_task(&task);
- if (err)
- ROS_WARN("Unable to shadow task: %d\n", err);
-
ROS_DEBUG("Entering publishing loop (namespace: %s)", node_.getNamespace().c_str());
is_running_ = true;
while (keep_running_)
Modified: pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/ethercat_hardware.cpp
===================================================================
--- pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/ethercat_hardware.cpp 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/ethercat_hardware.cpp 2009-08-07 18:38:25 UTC (rev 21034)
@@ -154,7 +154,7 @@
// Create HardwareInterface
hw_ = new HardwareInterface(num_actuators);
- hw_->current_time_ = realtime_gettime();
+ hw_->current_time_ = ros::Time::now().toSec();
last_published_ = hw_->current_time_;
// Initialize slaves
@@ -305,11 +305,11 @@
}
// Transmit process data
- double start = realtime_gettime();
+ double start = ros::Time::now().toSec();
if (!em_->txandrx_PD(buffer_size_, current_buffer_)) {
++diagnostics_.txandrx_errors_;
}
- diagnostics_.acc_(realtime_gettime() - start);
+ diagnostics_.acc_(ros::Time::now().toSec() - start);
// Convert status back to HW Interface
current = current_buffer_;
@@ -333,7 +333,7 @@
--reset_state_;
// Update current time
- hw_->current_time_ = realtime_gettime();
+ hw_->current_time_ = ros::Time::now().toSec();
unsigned char *tmp = current_buffer_;
current_buffer_ = last_buffer_;
Modified: pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg0x.cpp
===================================================================
--- pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg0x.cpp 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg0x.cpp 2009-08-07 18:38:25 UTC (rev 21034)
@@ -358,7 +358,7 @@
{
if (pressure_publisher_ && pressure_publisher_->trylock())
{
- pressure_publisher_->msg_.header.stamp = ros::Time(realtime_gettime());
+ pressure_publisher_->msg_.header.stamp = ros::Time::now();
pressure_publisher_->msg_.set_data0_size(22);
pressure_publisher_->msg_.set_data1_size(22);
for (int i = 0; i < 22; ++i ) {
Modified: pkg/trunk/util/realtime_tools/CMakeLists.txt
===================================================================
--- pkg/trunk/util/realtime_tools/CMakeLists.txt 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/util/realtime_tools/CMakeLists.txt 2009-08-07 18:38:25 UTC (rev 21034)
@@ -1,8 +1,3 @@
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rospack(realtime_tools)
-
-rospack_add_boost_directories()
-
-rospack_add_library(realtime_tools src/realtime_tools.cpp)
-rospack_link_boost(realtime_tools thread)
Modified: pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_publisher.h
===================================================================
--- pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_publisher.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_publisher.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -42,7 +42,6 @@
#include <ros/node_handle.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
-#include <realtime_tools/realtime_tools.h>
namespace realtime_tools {
@@ -53,17 +52,6 @@
void construct(int queue_size)
{
publisher_ = node_.advertise<Msg>(topic_, queue_size);
-
- if (0 != realtime_cond_create(&updated_cond_))
- {
- perror("realtime_cond_create");
- abort();
- }
- if (0 != realtime_mutex_create(&msg_lock_))
- {
- perror("realtime_mutex_create");
- abort();
- }
keep_running_ = true;
thread_ = boost::thread(&RealtimePublisher::publishingLoop, this);
}
@@ -89,28 +77,24 @@
usleep(100);
publisher_.shutdown();
-
- // Destroy thread resources
- realtime_cond_delete(&updated_cond_);
- realtime_mutex_delete(&msg_lock_);
}
void stop()
{
keep_running_ = false;
- realtime_cond_signal(&updated_cond_); // So the publishing loop can exit
+ updated_cond_.notify_one(); // So the publishing loop can exit
}
Msg msg_;
- int lock()
+ void lock()
{
- return realtime_mutex_lock(&msg_lock_);
+ msg_mutex_.lock();
}
bool trylock()
{
- if (0 == realtime_mutex_trylock(&msg_lock_))
+ if (msg_mutex_.try_lock())
{
if (turn_ == REALTIME)
{
@@ -118,7 +102,7 @@
}
else
{
- realtime_mutex_unlock(&msg_lock_);
+ msg_mutex_.unlock();
return false;
}
}
@@ -128,43 +112,39 @@
void unlock()
{
- realtime_mutex_unlock(&msg_lock_);
+ msg_mutex_.unlock();
}
void unlockAndPublish()
{
turn_ = NON_REALTIME;
- realtime_mutex_unlock(&msg_lock_);
- realtime_cond_signal(&updated_cond_);
+ msg_mutex_.unlock();
+ updated_cond_.notify_one();
}
bool is_running() const { return is_running_; }
void publishingLoop()
{
- RealtimeTask task;
-
- int err = realtime_shadow_task(&task);
- if (err)
- ROS_WARN("Unable to shadow task: %d\n", err);
-
is_running_ = true;
turn_ = REALTIME;
while (keep_running_)
{
+ Msg outgoing;
// Locks msg_ and copies it
- realtime_mutex_lock(&msg_lock_);
- while (turn_ != NON_REALTIME)
{
- if (!keep_running_)
- break;
- realtime_cond_wait(&updated_cond_, &msg_lock_);
+ boost::unique_lock<boost::mutex> lock(msg_mutex_);
+ while (turn_ != NON_REALTIME)
+ {
+ if (!keep_running_)
+ break;
+ updated_cond_.wait(lock);
+ }
+
+ outgoing = msg_;
+ turn_ = REALTIME;
}
- Msg outgoing(msg_);
- turn_ = REALTIME;
- realtime_mutex_unlock(&msg_lock_);
-
// Sends the outgoing message
if (keep_running_)
publisher_.publish(outgoing);
@@ -183,8 +163,8 @@
boost::thread thread_;
- RealtimeMutex msg_lock_; // Protects msg_
- RealtimeCond updated_cond_;
+ boost::mutex msg_mutex_; // Protects msg_
+ boost::condition_variable updated_cond_;
enum {REALTIME, NON_REALTIME};
int turn_; // Who's turn is it to use msg_?
Modified: pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_srv_call.h
===================================================================
--- pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_srv_call.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_srv_call.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -43,7 +43,6 @@
#include <ros/ros.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
-#include <realtime_tools/realtime_tools.h>
namespace realtime_tools {
@@ -56,17 +55,6 @@
{
client_ = node_.serviceClient<SrvReq, SrvRes>(topic);
- if (0 != realtime_cond_create(&updated_cond_))
- {
- perror("realtime_cond_create");
- abort();
- }
- if (0 != realtime_mutex_create(&srv_lock_))
- {
- perror("realtime_mutex_create");
- abort();
- }
-
// Makes the trylock() fail until the service is ready
lock();
ROS_INFO("RealtimeSrvCall is waiting for %s", topic.c_str() );
@@ -85,29 +73,25 @@
usleep(100);
client_.shutdown();
-
- // Destroy thread resources
- realtime_cond_delete(&updated_cond_);
- realtime_mutex_delete(&srv_lock_);
}
void stop()
{
keep_running_ = false;
- realtime_cond_signal(&updated_cond_); // So the call loop can exit
+ updated_cond_.notify_one(); // So the call loop can exit
}
SrvReq srv_req_;
SrvRes srv_res_;
- int lock()
+ void lock()
{
- return realtime_mutex_lock(&srv_lock_);
+ srv_mutex_.lock();
}
bool trylock()
{
- if (0 == realtime_mutex_trylock(&srv_lock_))
+ if (srv_mutex_.try_lock())
{
if (turn_ == REALTIME)
{
@@ -115,7 +99,7 @@
}
else
{
- realtime_mutex_unlock(&srv_lock_);
+ srv_mutex_.unlock();
return false;
}
}
@@ -125,43 +109,40 @@
void unlock()
{
- realtime_mutex_unlock(&srv_lock_);
+ srv_mutex_.unlock();
}
void unlockAndCall()
{
turn_ = NON_REALTIME;
- realtime_mutex_unlock(&srv_lock_);
- realtime_cond_signal(&updated_cond_);
+ srv_mutex_.unlock();
+ updated_cond_.notify_one();
}
bool is_running() const { return is_running_; }
void callLoop()
{
- RealtimeTask task;
-
- int err = realtime_shadow_task(&task);
- if (err)
- ROS_WARN("Unable to shadow task: %d\n", err);
-
is_running_ = true;
turn_ = REALTIME;
while (keep_running_)
{
+ SrvReq outgoing;
+ SrvRes incoming;
// Locks Srv_ and copies it
- realtime_mutex_lock(&srv_lock_);
- while (turn_ != NON_REALTIME)
{
- if (!keep_running_)
- break;
- realtime_cond_wait(&updated_cond_, &srv_lock_);
- }
+ boost::unique_lock<boost::mutex> lock(srv_mutex_);
+ while (turn_ != NON_REALTIME)
+ {
+ if (!keep_running_)
+ break;
+ updated_cond_.wait(lock);
+ }
- SrvReq outgoing(srv_req_);
- SrvRes incoming(srv_res_);
- turn_ = REALTIME;
- realtime_mutex_unlock(&srv_lock_);
+ outgoing = srv_req_;
+ incoming = srv_res_;
+ turn_ = REALTIME;
+ }
// Sends the outgoing message
if (keep_running_)
@@ -181,8 +162,8 @@
boost::thread thread_;
- RealtimeMutex srv_lock_; // Protects srv_
- RealtimeCond updated_cond_;
+ boost::mutex srv_mutex_; // Protects srv_
+ boost::condition_variable updated_cond_;
enum {REALTIME, NON_REALTIME};
int turn_; // Who's turn is it to use srv_?
Deleted: pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_tools.h
===================================================================
--- pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_tools.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/util/realtime_tools/include/realtime_tools/realtime_tools.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -1,79 +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 REALTIME_TOOLS_H
-#define REALTIME_TOOLS_H
-
-#include <pthread.h>
-#include <ros/time.h>
-
-typedef unsigned long xnhandle_t;
-typedef struct {
- xnhandle_t opaque;
-} XN_RT_MUTEX;
-
-typedef struct {
- xnhandle_t opaque;
-} XN_RT_COND;
-
-typedef struct {
- xnhandle_t opaque;
- unsigned long opaque2;
-} XN_RT_TASK;
-
-typedef union {
- XN_RT_MUTEX rt;
- pthread_mutex_t pt;
-} RealtimeMutex;
-
-typedef union {
- XN_RT_COND rt;
- pthread_cond_t pt;
-} RealtimeCond;
-
-typedef union {
- XN_RT_TASK rt;
-} RealtimeTask;
-
-int realtime_mutex_create(RealtimeMutex *mutex);
-int realtime_mutex_delete(RealtimeMutex *mutex);
-int realtime_mutex_lock(RealtimeMutex *mutex);
-int realtime_mutex_trylock(RealtimeMutex *mutex);
-int realtime_mutex_unlock(RealtimeMutex *mutex);
-
-int realtime_cond_create(RealtimeCond *cond);
-int realtime_cond_delete(RealtimeCond *cond);
-int realtime_cond_signal(RealtimeCond *cond);
-int realtime_cond_wait(RealtimeCond *cond, RealtimeMutex *mutex);
-
-int realtime_shadow_task(RealtimeTask *task);
-
-double realtime_gettime(void);
-
-#endif
Deleted: pkg/trunk/util/realtime_tools/include/realtime_tools/xenomai_prototypes.h
===================================================================
--- pkg/trunk/util/realtime_tools/include/realtime_tools/xenomai_prototypes.h 2009-08-07 18:26:25 UTC (rev 21033)
+++ pkg/trunk/util/realtime_tools/include/realtime_tools/xenomai_prototypes.h 2009-08-07 18:38:25 UTC (rev 21034)
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2009, Willow Garage, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the Willow Garage, 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 HOL...
[truncated message content] |
|
From: <hsu...@us...> - 2009-08-07 20:11:27
|
Revision: 21038
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21038&view=rev
Author: hsujohnhsu
Date: 2009-08-07 20:11:16 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
update test grasping testcase.
Modified Paths:
--------------
pkg/trunk/demos/pr2_gazebo/test_grasping.launch
pkg/trunk/robot_descriptions/gazebo_worlds/manifest.xml
pkg/trunk/stacks/pr2/pr2_ogre/Media/materials/scripts/pr2.material
Added Paths:
-----------
pkg/trunk/robot_descriptions/gazebo_worlds/Media/materials/textures/face_texture.jpg
pkg/trunk/robot_descriptions/gazebo_worlds/objects/object101.model
pkg/trunk/robot_descriptions/gazebo_worlds/objects/object102.model
pkg/trunk/robot_descriptions/gazebo_worlds/objects/object103.model
pkg/trunk/robot_descriptions/gazebo_worlds/objects/object104.model
pkg/trunk/robot_descriptions/gazebo_worlds/objects/object105.model
Modified: pkg/trunk/demos/pr2_gazebo/test_grasping.launch
===================================================================
--- pkg/trunk/demos/pr2_gazebo/test_grasping.launch 2009-08-07 20:07:52 UTC (rev 21037)
+++ pkg/trunk/demos/pr2_gazebo/test_grasping.launch 2009-08-07 20:11:16 UTC (rev 21038)
@@ -1,4 +1,5 @@
<launch>
+ <include file="$(find pr2_alpha)/sim.machine"/>
<!-- start up empty world -->
<include file="$(find gazebo)/launch/empty_world.launch"/>
@@ -9,12 +10,25 @@
<param name="desk3" textfile="$(find gazebo_worlds)/objects/desk3.model" />
<node pkg="gazebo_tools" type="xml2factory" args="desk3 1.0 0.0 0.0 0 0 0 desk3" respawn="false" output="screen" />
- <!-- cups -->
+ <!-- cups
<param name="000_580_67" textfile="$(find gazebo_worlds)/objects/000.580.67.model" />
<param name="001_327_79" textfile="$(find gazebo_worlds)/objects/001.327.79.model" />
<param name="701_330_68" textfile="$(find gazebo_worlds)/objects/701.330.68.model" />
<node pkg="gazebo_tools" type="xml2factory" args="000_580_67 1.0 0.0 0.56 0 0 0 000_580_67" respawn="false" output="screen" />
<node pkg="gazebo_tools" type="xml2factory" args="001_327_79 1.0 -0.5 0.56 0 0 0 001_327_79" respawn="false" output="screen" />
<node pkg="gazebo_tools" type="xml2factory" args="701_330_68 1.0 0.5 0.56 0 0 0 701_330_68" respawn="false" output="screen" />
+ -->
+ <!-- things -->
+ <param name="object101" textfile="$(find gazebo_worlds)/objects/object101.model" />
+ <param name="object102" textfile="$(find gazebo_worlds)/objects/object102.model" />
+ <param name="object103" textfile="$(find gazebo_worlds)/objects/object103.model" />
+ <param name="object104" textfile="$(find gazebo_worlds)/objects/object104.model" />
+ <param name="object105" textfile="$(find gazebo_worlds)/objects/object105.model" />
+ <node pkg="gazebo_tools" type="xml2factory" args="object101 1.0 0.0 0.369 0 0 0 object101" respawn="false" output="screen" />
+ <node pkg="gazebo_tools" type="xml2factory" args="object102 1.0 0.2 0.369 0 0 0 object102" respawn="false" output="screen" />
+ <node pkg="gazebo_tools" type="xml2factory" args="object103 1.0 -0.2 0.369 0 0 0 object103" respawn="false" output="screen" />
+ <node pkg="gazebo_tools" type="xml2factory" args="object104 1.0 0.4 0.369 0 0 0 object104" respawn="false" output="screen" />
+ <node pkg="gazebo_tools" type="xml2factory" args="object105 2.0 0.0 1.500 0 0 0 face1" respawn="false" output="screen" />
+
</launch>
Added: pkg/trunk/robot_descriptions/gazebo_worlds/Media/materials/textures/face_texture.jpg
===================================================================
(Binary files differ)
Property changes on: pkg/trunk/robot_descriptions/gazebo_worlds/Media/materials/textures/face_texture.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: pkg/trunk/robot_descriptions/gazebo_worlds/manifest.xml
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_worlds/manifest.xml 2009-08-07 20:07:52 UTC (rev 21037)
+++ pkg/trunk/robot_descriptions/gazebo_worlds/manifest.xml 2009-08-07 20:11:16 UTC (rev 21038)
@@ -7,4 +7,6 @@
<depend package="pr2_defs"/>
<depend package="pr2_ogre"/>
+ <depend package="ikea_ogre"/>
+ <depend package="gazebo_plugin"/>
</package>
Added: pkg/trunk/robot_descriptions/gazebo_worlds/objects/object101.model
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_worlds/objects/object101.model (rev 0)
+++ pkg/trunk/robot_descriptions/gazebo_worlds/objects/object101.model 2009-08-07 20:11:16 UTC (rev 21038)
@@ -0,0 +1,75 @@
+<?xml version="1.0" ?>
+<model:physical 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:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
+ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
+ xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
+ xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+ xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+ xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
+ xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"
+ name="object101_model">
+
+ <!-- The small box "cup" -->
+ <xyz> 0.0 0.0 0.0 </xyz>
+ <rpy> 0.0 0.0 0.0 </rpy>
+
+ <body:box name="object101_body">
+ <xyz>0 0 0.252</xyz>
+ <rpy>0 0 0.0</rpy>
+ <massMatrix>true</massMatrix>
+ <mass>0.2</mass>
+ <ixx>0.01</ixx>
+ <ixy>0.0</ixy>
+ <ixz>0.0</ixz>
+ <iyy>0.01</iyy>
+ <iyz>0.0</iyz>
+ <izz>0.01</izz>
+ <cx>0.0</cx>
+ <cy>0.0</cy>
+ <cz>0.0</cz>
+ <geom:box name="object101_geom">
+ <xyz>0.0 0.0 0.0</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.06 0.06 0.145</size>
+ <visual>
+ <size>0.06 0.06 0.145</size>
+ <material>Gazebo/PioneerBody</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ <geom:cylinder name="object101_base_geom">
+ <xyz>0.0 0.0 0.085</xyz>
+ <rpy>0.0 0.0 90.0 </rpy>
+
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.0205 0.035</size>
+ <visual>
+ <size>0.041 0.041 0.03</size>
+ <material>Gazebo/PioneerBody</material>
+ <mesh>unit_cylinder</mesh>
+ </visual>
+ </geom:cylinder>
+ </body:box>
+
+ <controller:ros_p3d name="p3d_object_controller" plugin="libros_p3d.so">
+ <updateRate>100.0</updateRate>
+ <bodyName>object101_body</bodyName>
+ <topicName>object101_body_ground_truth</topicName>
+ <frameName>object101_body_ground_truth_frame</frameName>
+ <interface:position name="p3d_object_position"/>
+ </controller:ros_p3d>
+
+</model:physical>
+
+
+
Added: pkg/trunk/robot_descriptions/gazebo_worlds/objects/object102.model
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_worlds/objects/object102.model (rev 0)
+++ pkg/trunk/robot_descriptions/gazebo_worlds/objects/object102.model 2009-08-07 20:11:16 UTC (rev 21038)
@@ -0,0 +1,59 @@
+<?xml version="1.0" ?>
+<model:physical 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:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
+ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
+ xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
+ xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+ xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+ xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
+ xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"
+ name="object102_model">
+
+ <!-- The small box "cup" -->
+ <xyz> 0.0 0.0 0.0 </xyz>
+ <rpy> 0.0 0.0 0.0 </rpy>
+
+ <body:box name="object102_body">
+ <xyz>0 0 0.18</xyz>
+ <rpy>0 0 0.0</rpy>
+ <massMatrix>true</massMatrix>
+ <mass>0.2</mass>
+ <ixx>0.01</ixx>
+ <ixy>0.0</ixy>
+ <ixz>0.0</ixz>
+ <iyy>0.01</iyy>
+ <iyz>0.0</iyz>
+ <izz>0.01</izz>
+ <cx>0.0</cx>
+ <cy>0.0</cy>
+ <cz>0.0</cz>
+ <geom:cylinder name="object102_geom">
+ <xyz>0.0 0.0 0.066</xyz>
+ <rpy>0.0 0.0 90.0 </rpy>
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.027 0.132</size>
+ <visual>
+ <size>0.054 0.054 0.132</size>
+ <material>Gazebo/Green</material>
+ <mesh>unit_cylinder</mesh>
+ </visual>
+ </geom:cylinder>
+ </body:box>
+
+ <controller:ros_p3d name="p3d_object_controller" plugin="libros_p3d.so">
+ <updateRate>100.0</updateRate>
+ <bodyName>object102_body</bodyName>
+ <topicName>object102_body_ground_truth</topicName>
+ <frameName>object102_body_ground_truth_frame</frameName>
+ <interface:position name="p3d_object_position"/>
+ </controller:ros_p3d>
+
+</model:physical>
+
+
+
Added: pkg/trunk/robot_descriptions/gazebo_worlds/objects/object103.model
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_worlds/objects/object103.model (rev 0)
+++ pkg/trunk/robot_descriptions/gazebo_worlds/objects/object103.model 2009-08-07 20:11:16 UTC (rev 21038)
@@ -0,0 +1,59 @@
+<?xml version="1.0" ?>
+<model:physical 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:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
+ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
+ xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
+ xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+ xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+ xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
+ xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"
+ name="object103_model">
+
+ <!-- The small box "cup" -->
+ <xyz> 0.0 0.0 0.0 </xyz>
+ <rpy> 0.0 0.0 0.0 </rpy>
+
+ <body:box name="object103_body">
+ <xyz>0 0 0.18</xyz>
+ <rpy>0 0 0.0</rpy>
+ <massMatrix>true</massMatrix>
+ <mass>0.2</mass>
+ <ixx>0.01</ixx>
+ <ixy>0.0</ixy>
+ <ixz>0.0</ixz>
+ <iyy>0.01</iyy>
+ <iyz>0.0</iyz>
+ <izz>0.01</izz>
+ <cx>0.0</cx>
+ <cy>0.0</cy>
+ <cz>0.0</cz>
+ <geom:cylinder name="object103_geom">
+ <xyz>0.0 0.0 0.066</xyz>
+ <rpy>0.0 0.0 90.0 </rpy>
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.027 0.132</size>
+ <visual>
+ <size>0.054 0.054 0.132</size>
+ <material>Gazebo/Green</material>
+ <mesh>unit_cylinder</mesh>
+ </visual>
+ </geom:cylinder>
+ </body:box>
+
+ <controller:ros_p3d name="p3d_object_controller" plugin="libros_p3d.so">
+ <updateRate>100.0</updateRate>
+ <bodyName>object103_body</bodyName>
+ <topicName>object103_body_ground_truth</topicName>
+ <frameName>object103_body_ground_truth_frame</frameName>
+ <interface:position name="p3d_object_position"/>
+ </controller:ros_p3d>
+
+</model:physical>
+
+
+
Added: pkg/trunk/robot_descriptions/gazebo_worlds/objects/object104.model
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_worlds/objects/object104.model (rev 0)
+++ pkg/trunk/robot_descriptions/gazebo_worlds/objects/object104.model 2009-08-07 20:11:16 UTC (rev 21038)
@@ -0,0 +1,75 @@
+<?xml version="1.0" ?>
+<model:physical 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:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
+ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
+ xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
+ xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+ xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+ xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
+ xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"
+ name="object104_model">
+
+ <!-- The small box "cup" -->
+ <xyz> 0.0 0.0 0.0 </xyz>
+ <rpy> 0.0 0.0 0.0 </rpy>
+
+ <body:box name="object104_body">
+ <xyz>0 0 0.252</xyz>
+ <rpy>0 0 0.0</rpy>
+ <massMatrix>true</massMatrix>
+ <mass>0.2</mass>
+ <ixx>0.01</ixx>
+ <ixy>0.0</ixy>
+ <ixz>0.0</ixz>
+ <iyy>0.01</iyy>
+ <iyz>0.0</iyz>
+ <izz>0.01</izz>
+ <cx>0.0</cx>
+ <cy>0.0</cy>
+ <cz>0.0</cz>
+ <geom:box name="object104_geom">
+ <xyz>0.0 0.0 0.0</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.06 0.06 0.145</size>
+ <visual>
+ <size>0.06 0.06 0.145</size>
+ <material>Gazebo/PioneerBody</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ <geom:cylinder name="object104_base_geom">
+ <xyz>0.0 0.0 0.085</xyz>
+ <rpy>0.0 0.0 90.0 </rpy>
+
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.0205 0.035</size>
+ <visual>
+ <size>0.041 0.041 0.03</size>
+ <material>Gazebo/PioneerBody</material>
+ <mesh>unit_cylinder</mesh>
+ </visual>
+ </geom:cylinder>
+ </body:box>
+
+ <controller:ros_p3d name="p3d_object_controller" plugin="libros_p3d.so">
+ <updateRate>100.0</updateRate>
+ <bodyName>object104_body</bodyName>
+ <topicName>object104_body_ground_truth</topicName>
+ <frameName>object104_body_ground_truth_frame</frameName>
+ <interface:position name="p3d_object_position"/>
+ </controller:ros_p3d>
+
+</model:physical>
+
+
+
Added: pkg/trunk/robot_descriptions/gazebo_worlds/objects/object105.model
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_worlds/objects/object105.model (rev 0)
+++ pkg/trunk/robot_descriptions/gazebo_worlds/objects/object105.model 2009-08-07 20:11:16 UTC (rev 21038)
@@ -0,0 +1,184 @@
+<?xml version="1.0" ?>
+<model:physical 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:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
+ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
+ xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
+ xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+ xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+ xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
+ xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"
+ name="object105_model">
+
+ <!-- The small box "cup" -->
+ <xyz> 0.0 0.0 0.0 </xyz>
+ <rpy> 0.0 0.0 0.0 </rpy>
+
+ <body:box name="object105_1_body">
+ <xyz>0 0 0.252</xyz>
+ <rpy>0 0 0.0</rpy>
+ <massMatrix>true</massMatrix>
+ <mass>0.2</mass>
+ <ixx>0.01</ixx>
+ <ixy>0.0</ixy>
+ <ixz>0.0</ixz>
+ <iyy>0.01</iyy>
+ <iyz>0.0</iyz>
+ <izz>0.01</izz>
+ <cx>0.0</cx>
+ <cy>0.0</cy>
+ <cz>0.0</cz>
+ <turnGravityOff>true</turnGravityOff>
+ <geom:box name="object105_1_geom">
+ <xyz>0.0 0.0 0.0</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.20 0.20 0.245</size>
+ <visual>
+ <size>0.20 0.20 0.245</size>
+ <material>PR2/Face</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+
+ <body:box name="object105_2_body">
+ <xyz>0 0 -0.30</xyz>
+ <rpy>0 0 0.0</rpy>
+ <massMatrix>true</massMatrix>
+ <mass>50</mass>
+ <ixx>0.1</ixx>
+ <ixy>0.0</ixy>
+ <ixz>0.0</ixz>
+ <iyy>0.1</iyy>
+ <iyz>0.0</iyz>
+ <izz>0.1</izz>
+ <cx>0.0</cx>
+ <cy>0.0</cy>
+ <cz>0.0</cz>
+ <turnGravityOff>true</turnGravityOff>
+ <geom:box name="object105_2_geom">
+ <xyz>0.0 0.0 0.0</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.20 0.60 0.8</size>
+ <visual>
+ <size>0.20 0.60 0.8</size>
+ <material>PR2/Green</material>
+ <mesh>unit_box</mesh>
+ </visual>
+ </geom:box>
+ </body:box>
+
+ <joint:hinge name="neck_joint">
+ <body1>object105_1_body</body1>
+ <body2>object105_2_body</body2>
+ <anchor>object105_1_body</anchor>
+ <lowStop>0</lowStop>
+ <highStop>0</highStop>
+ <axis>0 0 1</axis>
+ </joint:hinge>
+
+ <body:cylinder name="object105_3_body">
+ <xyz>0 -0.2 -1.0</xyz>
+ <rpy>0 0 0.0</rpy>
+ <massMatrix>true</massMatrix>
+ <mass>50</mass>
+ <ixx>0.1</ixx>
+ <ixy>0.0</ixy>
+ <ixz>0.0</ixz>
+ <iyy>0.1</iyy>
+ <iyz>0.0</iyz>
+ <izz>0.1</izz>
+ <cx>0.0</cx>
+ <cy>0.0</cy>
+ <cz>0.0</cz>
+ <turnGravityOff>true</turnGravityOff>
+ <geom:cylinder name="object105_3_geom">
+ <xyz>0.0 0.0 0.0</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.10 0.5</size>
+ <visual>
+ <size>0.20 0.20 1.0</size>
+ <material>PR2/Blue</material>
+ <mesh>unit_cylinder</mesh>
+ </visual>
+ </geom:cylinder>
+ </body:cylinder>
+
+ <body:cylinder name="object105_4_body">
+ <xyz>0 0.2 -1.0</xyz>
+ <rpy>0 0 0.0</rpy>
+ <massMatrix>true</massMatrix>
+ <mass>50</mass>
+ <ixx>0.1</ixx>
+ <ixy>0.0</ixy>
+ <ixz>0.0</ixz>
+ <iyy>0.1</iyy>
+ <iyz>0.0</iyz>
+ <izz>0.1</izz>
+ <cx>0.0</cx>
+ <cy>0.0</cy>
+ <cz>0.0</cz>
+ <turnGravityOff>true</turnGravityOff>
+ <geom:cylinder name="object105_4_geom">
+ <xyz>0.0 0.0 0.0</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+
+ <kp>100000000.0</kp>
+ <kd>0.1</kd>
+ <mu1>500.0</mu1>
+ <mesh>default</mesh>
+ <size>0.10 0.5</size>
+ <visual>
+ <size>0.20 0.20 1.0</size>
+ <material>PR2/Blue</material>
+ <mesh>unit_cylinder</mesh>
+ </visual>
+ </geom:cylinder>
+ </body:cylinder>
+
+ <joint:hinge name="l_leg_joint">
+ <body1>object105_2_body</body1>
+ <body2>object105_3_body</body2>
+ <anchor>object105_2_body</anchor>
+ <lowStop>0</lowStop>
+ <highStop>0</highStop>
+ <axis>0 1 0</axis>
+ </joint:hinge>
+
+ <joint:hinge name="r_leg_joint">
+ <body1>object105_2_body</body1>
+ <body2>object105_4_body</body2>
+ <anchor>object105_2_body</anchor>
+ <lowStop>0</lowStop>
+ <highStop>0</highStop>
+ <axis>0 1 0</axis>
+ </joint:hinge>
+
+ <controller:ros_p3d name="p3d_object_controller" plugin="libros_p3d.so">
+ <updateRate>100.0</updateRate>
+ <bodyName>object105_1_body</bodyName>
+ <topicName>object105_1_body_ground_truth</topicName>
+ <frameName>object105_1_body_ground_truth_frame</frameName>
+ <interface:position name="p3d_object_position"/>
+ </controller:ros_p3d>
+
+</model:physical>
+
+
+
Modified: pkg/trunk/stacks/pr2/pr2_ogre/Media/materials/scripts/pr2.material
===================================================================
--- pkg/trunk/stacks/pr2/pr2_ogre/Media/materials/scripts/pr2.material 2009-08-07 20:07:52 UTC (rev 21037)
+++ pkg/trunk/stacks/pr2/pr2_ogre/Media/materials/scripts/pr2.material 2009-08-07 20:11:16 UTC (rev 21038)
@@ -214,6 +214,20 @@
}
}
+material PR2/Face
+{
+ technique
+ {
+ pass
+ {
+ texture_unit
+ {
+ texture face_texture.jpg
+ }
+ }
+ }
+}
+
material PR2/Jack
{
technique
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <stu...@us...> - 2009-08-07 20:52:54
|
Revision: 21045
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21045&view=rev
Author: stuglaser
Date: 2009-08-07 20:52:44 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
Find/replace for robot_msgs/Polygon3D -> geometry_msgs/Polygon
Modified Paths:
--------------
pkg/trunk/demos/tabletop_manipulation/tabletop_msgs/msg/Table.msg
pkg/trunk/mapping/annotated_map_msgs/msg/TaggedPolygon3D.msg
pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/annotated_map_lib.h
pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/projection.h
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_lib.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_planar_patch_map_builder.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_planar_patch_map.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map_via_service.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/projection.cpp
pkg/trunk/mapping/annotated_planar_patch_map/test/projection_test.cpp
pkg/trunk/mapping/door_stereo_detector/src/door_stereo_detector.cpp
pkg/trunk/mapping/door_tracker/src/door_tracker.cpp
pkg/trunk/mapping/hallway_tracker/src/hallway_tracker.cpp
pkg/trunk/mapping/planar_patch_map/src/planar_patch_map.cpp
pkg/trunk/mapping/planar_patch_map/src/planar_patch_map_omp.cpp
pkg/trunk/mapping/stereo_convex_patch_histogram/src/convex_patch_histogram.cpp
pkg/trunk/mapping/table_object_detector/src/table_object_detector.cpp
pkg/trunk/nav/people_aware_nav/include/people_aware_nav/move_base_constrained.h
pkg/trunk/nav/people_aware_nav/include/people_aware_nav/navfn_constrained.h
pkg/trunk/nav/people_aware_nav/msg/ConstrainedGoal.msg
pkg/trunk/nav/people_aware_nav/src/move_base_constrained.cpp
pkg/trunk/nav/people_aware_nav/srv/SetNavConstraint.srv
pkg/trunk/sandbox/planar_objects/src/find_planes.h
pkg/trunk/sandbox/planar_objects/src/rectangular_fit.h
pkg/trunk/sandbox/planar_objects/src/vis_utils.cpp
pkg/trunk/sandbox/planar_objects/src/vis_utils.h
pkg/trunk/stacks/common_msgs/mapping_msgs/msg/PolygonalMap.msg
pkg/trunk/stacks/semantic_mapping/door_handle_detector/include/door_handle_detector/geometric_helper.h
pkg/trunk/stacks/semantic_mapping/door_handle_detector/include/door_handle_detector/handle_detector.h
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/geometric_helper.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/handle_detector.cpp
pkg/trunk/stacks/semantic_mapping/plug_onbase_detector/include/plug_onbase_detector/plug_onbase_detector.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/angles.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/areas.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/distances.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/intersections.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/nearest.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/point.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/projections.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/statistics.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_geometry/areas.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_geometry/intersections.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/cloud_geometry/test_geometry_areas.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_ground_removal.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_inc_ground_removal.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/semantic_point_annotator.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/semantic_point_annotator_omp.cpp
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/polygonal_map_display.h
pkg/trunk/vision/recognition_lambertian/src/plane_fit.cpp
pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp
Modified: pkg/trunk/demos/tabletop_manipulation/tabletop_msgs/msg/Table.msg
===================================================================
--- pkg/trunk/demos/tabletop_manipulation/tabletop_msgs/msg/Table.msg 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/demos/tabletop_manipulation/tabletop_msgs/msg/Table.msg 2009-08-07 20:52:44 UTC (rev 21045)
@@ -1,5 +1,5 @@
Header header
-robot_msgs/Polygon3D table
+geometry_msgs/Polygon table
geometry_msgs/Point table_min
geometry_msgs/Point table_max
ObjectOnTable[] objects
Modified: pkg/trunk/mapping/annotated_map_msgs/msg/TaggedPolygon3D.msg
===================================================================
--- pkg/trunk/mapping/annotated_map_msgs/msg/TaggedPolygon3D.msg 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_map_msgs/msg/TaggedPolygon3D.msg 2009-08-07 20:52:44 UTC (rev 21045)
@@ -1,4 +1,4 @@
string name
string[] tags
sensor_msgs/ChannelFloat32[] tags_chan
-robot_msgs/Polygon3D polygon
+geometry_msgs/Polygon polygon
Modified: pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/annotated_map_lib.h
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/annotated_map_lib.h 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/annotated_map_lib.h 2009-08-07 20:52:44 UTC (rev 21045)
@@ -189,7 +189,7 @@
-geometry_msgs::Point32 computeMean(const robot_msgs::Polygon3D& poly);
+geometry_msgs::Point32 computeMean(const geometry_msgs::Polygon& poly);
} //end namespace
Modified: pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/projection.h
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/projection.h 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/projection.h 2009-08-07 20:52:44 UTC (rev 21045)
@@ -62,7 +62,7 @@
namespace projection
{
-void projectAnyObject(const sensor_msgs::CameraInfo& cam_info,robot_msgs::Polygon3D polyIn,robot_msgs::Polygon3D& polyOut);
+void projectAnyObject(const sensor_msgs::CameraInfo& cam_info,geometry_msgs::Polygon polyIn,geometry_msgs::Polygon& polyOut);
void projectAnyObject(const sensor_msgs::StereoInfo& stereo_info_, const annotated_map_msgs::TaggedPolygonalMap& transformed_map_3D, annotated_map_msgs::TaggedPolygonalMap &transformed_map_2D);
@@ -76,8 +76,8 @@
void projectPolygonalMap(const sensor_msgs::StereoInfo& stereo_info_, const mapping_msgs::PolygonalMap& transformed_map_3D, mapping_msgs::PolygonalMap &transformed_map_2D);
-void projectPolygonPoints(double* projection,double img_w, double img_h, robot_msgs::Polygon3D polyIn,robot_msgs::Polygon3D& polyOut);
-void projectPolygonPointsNOP(double* projection,double img_w, double img_h, robot_msgs::Polygon3D polyIn,robot_msgs::Polygon3D& polyOut);
+void projectPolygonPoints(double* projection,double img_w, double img_h, geometry_msgs::Polygon polyIn,geometry_msgs::Polygon& polyOut);
+void projectPolygonPointsNOP(double* projection,double img_w, double img_h, geometry_msgs::Polygon polyIn,geometry_msgs::Polygon& polyOut);
@@ -95,7 +95,7 @@
const std::vector<double>& viewport);
-bool checkPolyInside(const robot_msgs::Polygon3D& poly,const std::vector<double>& viewport);
+bool checkPolyInside(const geometry_msgs::Polygon& poly,const std::vector<double>& viewport);
}
} //end namespace
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_lib.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_lib.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_lib.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -59,7 +59,7 @@
for(unsigned int iPoly=0;iPoly<num_polygons;iPoly++)
{
- const robot_msgs::Polygon3D* p=&polymapIn.polygons[iPoly];
+ const geometry_msgs::Polygon* p=&polymapIn.polygons[iPoly];
unsigned int length = p->get_points_size();
@@ -77,7 +77,7 @@
boost::numeric::ublas::matrix<double> matOut = prod(transform, matIn);
- robot_msgs::Polygon3D *polyOut;
+ geometry_msgs::Polygon *polyOut;
if (!bSame)
{
polyOut = &(polymapOut.polygons[iPoly]);
@@ -304,7 +304,7 @@
-geometry_msgs::Point32 annotated_map_lib::computeMean (const robot_msgs::Polygon3D& poly)
+geometry_msgs::Point32 annotated_map_lib::computeMean (const geometry_msgs::Polygon& poly)
{
geometry_msgs::Point32 mean;
mean.x=0;mean.y=0;mean.z=0;
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_planar_patch_map_builder.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_planar_patch_map_builder.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_planar_patch_map_builder.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -106,7 +106,7 @@
boost::numeric::ublas::matrix<double> transform = transformAsMatrix(net_transform);
- typedef std::vector<robot_msgs::Polygon3D> poly_vec;
+ typedef std::vector<geometry_msgs::Polygon> poly_vec;
bool bSame = (&polymapIn == &polymapOut);
unsigned int num_polygons = polymapIn.get_polygons_size();
@@ -117,7 +117,7 @@
for(unsigned int iPoly=0;iPoly<num_polygons;iPoly++)
{
- const robot_msgs::Polygon3D* p=&polymapIn.polygons[iPoly];
+ const geometry_msgs::Polygon* p=&polymapIn.polygons[iPoly];
unsigned int length = p->get_points_size();
@@ -135,7 +135,7 @@
boost::numeric::ublas::matrix<double> matOut = prod(transform, matIn);
- robot_msgs::Polygon3D *polyOut;
+ geometry_msgs::Polygon *polyOut;
if (!bSame)
{
polyOut = &(polymapOut.polygons[iPoly]);
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_planar_patch_map.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_planar_patch_map.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_planar_patch_map.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -216,7 +216,7 @@
for(unsigned int iPoly = 0; iPoly<num_3D_poly; iPoly++)
{
//we're checking this one
- robot_msgs::Polygon3D &map_poly=transformed_map_2D.polygons[iPoly];
+ geometry_msgs::Polygon &map_poly=transformed_map_2D.polygons[iPoly];
int num_in=0,num_out=0;
for(unsigned int iPt=0;iPt<map_poly.get_points_size();iPt++)
{
@@ -339,7 +339,7 @@
for(unsigned int iPoly = 0; iPoly<num_3D_poly; iPoly++)
{
//we're checking this one
- robot_msgs::Polygon3D &map_poly=transformed_map.polygons[iPoly];
+ geometry_msgs::Polygon &map_poly=transformed_map.polygons[iPoly];
for(unsigned int iPt=0;iPt<map_poly.get_points_size();iPt++){
fprintf(fOut,"%f %f %f\n",map_poly.points[iPt].x,
map_poly.points[iPt].y,
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -237,7 +237,7 @@
for(unsigned int iPoly = 0; iPoly<num_3D_poly; iPoly++)
{
//we're checking this one
- const robot_msgs::Polygon3D &map_poly=transformed_map_2D.polygons[iPoly].polygon;
+ const geometry_msgs::Polygon &map_poly=transformed_map_2D.polygons[iPoly].polygon;
int num_in=0,num_out=0;
for(unsigned int iPt=0;iPt<map_poly.get_points_size();iPt++)
{
@@ -366,7 +366,7 @@
for(unsigned int iPoly = 0; iPoly<num_3D_poly; iPoly++)
{
//we're checking this one
- robot_msgs::Polygon3D &map_poly=transformed_map.polygons[iPoly];
+ geometry_msgs::Polygon &map_poly=transformed_map.polygons[iPoly];
for(unsigned int iPt=0;iPt<map_poly.get_points_size();iPt++){
fprintf(fOut,"%f %f %f\n",map_poly.points[iPt].x,
map_poly.points[iPt].y,
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map_via_service.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map_via_service.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map_via_service.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -277,7 +277,7 @@
for(unsigned int iPoly = 0; iPoly<num_3D_poly; iPoly++)
{
//we're checking this one
- robot_msgs::Polygon3D &map_poly=transformed_map_2D.polygons[iPoly].polygon;
+ geometry_msgs::Polygon &map_poly=transformed_map_2D.polygons[iPoly].polygon;
int num_in=0,num_out=0;
for(unsigned int iPt=0;iPt<map_poly.get_points_size();iPt++)
{
@@ -401,7 +401,7 @@
for(unsigned int iPoly = 0; iPoly<num_3D_poly; iPoly++)
{
//we're checking this one
- robot_msgs::Polygon3D &map_poly=transformed_map.polygons[iPoly].polygon;
+ geometry_msgs::Polygon &map_poly=transformed_map.polygons[iPoly].polygon;
for(unsigned int iPt=0;iPt<map_poly.get_points_size();iPt++){
fprintf(fOut,"%f %f %f\n",map_poly.points[iPt].x,
map_poly.points[iPt].y,
Modified: pkg/trunk/mapping/annotated_planar_patch_map/src/projection.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/src/projection.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_planar_patch_map/src/projection.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -71,7 +71,7 @@
for(unsigned int iPoly = 0; iPoly<num_polygons; iPoly++)
{
//create new polygon 2D (z=1)
- robot_msgs::Polygon3D newPoly;
+ geometry_msgs::Polygon newPoly;
projectPolygonPoints(projection,double(stereo_info.width),double(stereo_info.height),transformed_map_3D.polygons[iPoly],newPoly);
//put the polygon into 2D map
@@ -79,7 +79,7 @@
}
}
-void annotated_planar_patch_map::projection::projectAnyObject(const sensor_msgs::CameraInfo& cam_info,robot_msgs::Polygon3D polyIn,robot_msgs::Polygon3D& polyOut)
+void annotated_planar_patch_map::projection::projectAnyObject(const sensor_msgs::CameraInfo& cam_info,geometry_msgs::Polygon polyIn,geometry_msgs::Polygon& polyOut)
{
//Projection setup
CvMat *K_ = cvCreateMat(3, 3, CV_64FC1);
@@ -194,7 +194,7 @@
-void annotated_planar_patch_map::projection::projectPolygonPoints(double* projection,double img_w,double img_h,robot_msgs::Polygon3D polyIn,robot_msgs::Polygon3D& polyOut)
+void annotated_planar_patch_map::projection::projectPolygonPoints(double* projection,double img_w,double img_h,geometry_msgs::Polygon polyIn,geometry_msgs::Polygon& polyOut)
{
//Project all points of all polygons
unsigned int num_pts = polyIn.get_points_size();
@@ -240,7 +240,7 @@
}
}
-void annotated_planar_patch_map::projection::projectPolygonPointsNOP(double* projection,double img_w,double img_h,robot_msgs::Polygon3D polyIn,robot_msgs::Polygon3D& polyOut)
+void annotated_planar_patch_map::projection::projectPolygonPointsNOP(double* projection,double img_w,double img_h,geometry_msgs::Polygon polyIn,geometry_msgs::Polygon& polyOut)
{
//Project all points of all polygons
unsigned int num_pts = polyIn.get_points_size();
@@ -309,7 +309,7 @@
for(unsigned int iPoly = 0; iPoly<num_polygons; iPoly++)
{
//create new polygon 2D (z=1)
- robot_msgs::Polygon3D newPoly;
+ geometry_msgs::Polygon newPoly;
projectPolygonPoints(projection,double(stereo_info.width),double(stereo_info.height),transformed_map_3D.polygons[iPoly].polygon,newPoly);
//put the polygon into 2D map
@@ -357,7 +357,7 @@
for(unsigned int iPoly = 0; iPoly<num_polygons; iPoly++)
{
//create new polygon 2D (z=1)
- robot_msgs::Polygon3D newPoly;
+ geometry_msgs::Polygon newPoly;
projectPolygonPointsNOP(projection,double(stereo_info.width),double(stereo_info.height),transformed_map_3D.polygons[iPoly].polygon,newPoly);
//put the polygon into 2D map
@@ -386,7 +386,7 @@
for(unsigned int iPoly = 0; iPoly<num_polygons; iPoly++)
{
//create new polygon 2D (z=1)
- robot_msgs::Polygon3D newPoly;
+ geometry_msgs::Polygon newPoly;
projectAnyObject(cam_info,transformed_map_3D.polygons[iPoly].polygon,newPoly);
@@ -410,7 +410,7 @@
-bool annotated_planar_patch_map::projection::checkPolyInside(const robot_msgs::Polygon3D& poly,const std::vector<double>& viewport)
+bool annotated_planar_patch_map::projection::checkPolyInside(const geometry_msgs::Polygon& poly,const std::vector<double>& viewport)
{
unsigned int num_pts = poly.get_points_size();
for(unsigned int iPt = 0; iPt<num_pts; iPt++)
Modified: pkg/trunk/mapping/annotated_planar_patch_map/test/projection_test.cpp
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/test/projection_test.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/annotated_planar_patch_map/test/projection_test.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -30,7 +30,7 @@
#include <gtest/gtest.h>
#include <sys/time.h>
-#include "robot_msgs/Polygon3D.h"
+#include "geometry_msgs/Polygon.h"
#include "geometry_msgs/Point32.h"
#include <math.h>
@@ -42,8 +42,8 @@
TEST(annotated_map, projectPolygon)
{
- robot_msgs::Polygon3D input_polygon;
- robot_msgs::Polygon3D projected_polygon;
+ geometry_msgs::Polygon input_polygon;
+ geometry_msgs::Polygon projected_polygon;
sensor_msgs::CameraInfo cam_info;
Modified: pkg/trunk/mapping/door_stereo_detector/src/door_stereo_detector.cpp
===================================================================
--- pkg/trunk/mapping/door_stereo_detector/src/door_stereo_detector.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/door_stereo_detector/src/door_stereo_detector.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -45,7 +45,7 @@
#include <ros/node.h>
// ROS messages
#include <sensor_msgs/PointCloud.h>
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
#include <mapping_msgs/PolygonalMap.h>
#include <geometry_msgs/Point32.h>
Modified: pkg/trunk/mapping/door_tracker/src/door_tracker.cpp
===================================================================
--- pkg/trunk/mapping/door_tracker/src/door_tracker.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/door_tracker/src/door_tracker.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -47,7 +47,7 @@
#include <door_handle_detector/DoorsDetector.h>
#include <sensor_msgs/PointCloud.h>
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
#include <mapping_msgs/PolygonalMap.h>
#include <geometry_msgs/Point32.h>
Modified: pkg/trunk/mapping/hallway_tracker/src/hallway_tracker.cpp
===================================================================
--- pkg/trunk/mapping/hallway_tracker/src/hallway_tracker.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/hallway_tracker/src/hallway_tracker.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -48,7 +48,7 @@
#include <ros/node.h>
// ROS messages
#include <sensor_msgs/PointCloud.h>
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
#include <mapping_msgs/PolygonalMap.h>
#include <geometry_msgs/Point32.h>
Modified: pkg/trunk/mapping/planar_patch_map/src/planar_patch_map.cpp
===================================================================
--- pkg/trunk/mapping/planar_patch_map/src/planar_patch_map.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/planar_patch_map/src/planar_patch_map.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -43,7 +43,7 @@
#include <ros/node.h>
// ROS messages
#include <sensor_msgs/PointCloud.h>
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
#include <mapping_msgs/PolygonalMap.h>
// Sample Consensus
Modified: pkg/trunk/mapping/planar_patch_map/src/planar_patch_map_omp.cpp
===================================================================
--- pkg/trunk/mapping/planar_patch_map/src/planar_patch_map_omp.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/planar_patch_map/src/planar_patch_map_omp.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -43,7 +43,7 @@
#include <ros/node.h>
// ROS messages
#include <sensor_msgs/PointCloud.h>
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
#include <mapping_msgs/PolygonalMap.h>
// Sample Consensus
Modified: pkg/trunk/mapping/stereo_convex_patch_histogram/src/convex_patch_histogram.cpp
===================================================================
--- pkg/trunk/mapping/stereo_convex_patch_histogram/src/convex_patch_histogram.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/stereo_convex_patch_histogram/src/convex_patch_histogram.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -45,7 +45,7 @@
#include <ros/node.h>
// ROS messages
#include <sensor_msgs/PointCloud.h>
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
#include <mapping_msgs/PolygonalMap.h>
// Sample Consensus
Modified: pkg/trunk/mapping/table_object_detector/src/table_object_detector.cpp
===================================================================
--- pkg/trunk/mapping/table_object_detector/src/table_object_detector.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/mapping/table_object_detector/src/table_object_detector.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -43,7 +43,7 @@
#include <ros/node.h>
// ROS messages
#include <sensor_msgs/PointCloud.h>
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
#include <mapping_msgs/PolygonalMap.h>
// Sample Consensus
Modified: pkg/trunk/nav/people_aware_nav/include/people_aware_nav/move_base_constrained.h
===================================================================
--- pkg/trunk/nav/people_aware_nav/include/people_aware_nav/move_base_constrained.h 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/nav/people_aware_nav/include/people_aware_nav/move_base_constrained.h 2009-08-07 20:52:44 UTC (rev 21045)
@@ -91,7 +91,7 @@
* @brief Make a new global plan
* @param goal The goal to plan to
*/
- void makePlan(const geometry_msgs::PoseStamped& goal, const robot_msgs::Polygon3D& forbidden);
+ void makePlan(const geometry_msgs::PoseStamped& goal, const geometry_msgs::Polygon& forbidden);
/**
* @brief Get the current pose of the robot in the specified frame
@@ -107,7 +107,7 @@
void resetState();
- bool tryPlan(geometry_msgs::PoseStamped goal, const robot_msgs::Polygon3D& forbidden);
+ bool tryPlan(geometry_msgs::PoseStamped goal, const geometry_msgs::Polygon& forbidden);
ros::Node& ros_node_;
tf::TransformListener& tf_;
Modified: pkg/trunk/nav/people_aware_nav/include/people_aware_nav/navfn_constrained.h
===================================================================
--- pkg/trunk/nav/people_aware_nav/include/people_aware_nav/navfn_constrained.h 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/nav/people_aware_nav/include/people_aware_nav/navfn_constrained.h 2009-08-07 20:52:44 UTC (rev 21045)
@@ -55,7 +55,7 @@
virtual void getCostmap (costmap_2d::Costmap2D& cmap);
private:
- robot_msgs::Polygon3D forbidden_;
+ geometry_msgs::Polygon forbidden_;
ros::NodeHandle node_;
ros::ServiceServer service_;
ros::Publisher vis_pub_add_;
Modified: pkg/trunk/nav/people_aware_nav/msg/ConstrainedGoal.msg
===================================================================
--- pkg/trunk/nav/people_aware_nav/msg/ConstrainedGoal.msg 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/nav/people_aware_nav/msg/ConstrainedGoal.msg 2009-08-07 20:52:44 UTC (rev 21045)
@@ -8,4 +8,4 @@
float32 th
# Region where robot can't go
-robot_msgs/Polygon3D forbidden
\ No newline at end of file
+geometry_msgs/Polygon forbidden
\ No newline at end of file
Modified: pkg/trunk/nav/people_aware_nav/src/move_base_constrained.cpp
===================================================================
--- pkg/trunk/nav/people_aware_nav/src/move_base_constrained.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/nav/people_aware_nav/src/move_base_constrained.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -45,7 +45,7 @@
using geometry_msgs::Point;
using geometry_msgs::Point32;
using geometry_msgs::PoseStamped;
-using robot_msgs::Polygon3D;
+using geometry_msgs::Polygon;
namespace people_aware_nav {
MoveBaseConstrained::MoveBaseConstrained(ros::Node& ros_node, tf::TransformListener& tf) :
Modified: pkg/trunk/nav/people_aware_nav/srv/SetNavConstraint.srv
===================================================================
--- pkg/trunk/nav/people_aware_nav/srv/SetNavConstraint.srv 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/nav/people_aware_nav/srv/SetNavConstraint.srv 2009-08-07 20:52:44 UTC (rev 21045)
@@ -1,2 +1,2 @@
-robot_msgs/Polygon3D forbidden
+geometry_msgs/Polygon forbidden
---
Modified: pkg/trunk/sandbox/planar_objects/src/find_planes.h
===================================================================
--- pkg/trunk/sandbox/planar_objects/src/find_planes.h 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/sandbox/planar_objects/src/find_planes.h 2009-08-07 20:52:44 UTC (rev 21045)
@@ -11,7 +11,7 @@
#include "ros/ros.h"
#include "sensor_msgs/PointCloud.h"
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
#include <visualization_msgs/Marker.h>
#include "opencv/cxcore.h"
Modified: pkg/trunk/sandbox/planar_objects/src/rectangular_fit.h
===================================================================
--- pkg/trunk/sandbox/planar_objects/src/rectangular_fit.h 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/sandbox/planar_objects/src/rectangular_fit.h 2009-08-07 20:52:44 UTC (rev 21045)
@@ -5,7 +5,7 @@
#include <ros/node.h>
// ROS messages
#include <sensor_msgs/PointCloud.h>
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
// Cloud geometry
#include <point_cloud_mapping/geometry/angles.h>
@@ -47,7 +47,7 @@
std::vector<std::vector<int> > &indices, std::vector<std::vector<
double> > &models,int number);
void publishNormals(sensor_msgs::PointCloud points, std::vector<geometry_msgs::Vector3> coeff, float length=0.1);
- void publishPolygon(sensor_msgs::PointCloud pointcloud,robot_msgs::Polygon3D points,int number);
+ void publishPolygon(sensor_msgs::PointCloud pointcloud,geometry_msgs::Polygon points,int number);
protected:
ros::Node& node_;
Modified: pkg/trunk/sandbox/planar_objects/src/vis_utils.cpp
===================================================================
--- pkg/trunk/sandbox/planar_objects/src/vis_utils.cpp 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/sandbox/planar_objects/src/vis_utils.cpp 2009-08-07 20:52:44 UTC (rev 21045)
@@ -121,7 +121,7 @@
}
-void visualizePolygon(const sensor_msgs::PointCloud& cloud,robot_msgs::Polygon3D &polygon, int rgb, int id, ros::Publisher& visualization_pub ) {
+void visualizePolygon(const sensor_msgs::PointCloud& cloud,geometry_msgs::Polygon &polygon, int rgb, int id, ros::Publisher& visualization_pub ) {
visualization_msgs::Marker marker;
marker.header.frame_id = cloud.header.frame_id;
marker.header.stamp = ros::Time((uint64_t)0ULL);
Modified: pkg/trunk/sandbox/planar_objects/src/vis_utils.h
===================================================================
--- pkg/trunk/sandbox/planar_objects/src/vis_utils.h 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/sandbox/planar_objects/src/vis_utils.h 2009-08-07 20:52:44 UTC (rev 21045)
@@ -11,7 +11,7 @@
#include "ros/ros.h"
#include "sensor_msgs/PointCloud.h"
-#include <robot_msgs/Polygon3D.h>
+#include <geometry_msgs/Polygon.h>
#include <visualization_msgs/Marker.h>
// transform library
#include <tf/transform_listener.h>
@@ -36,7 +36,7 @@
sensor_msgs::PointCloud& outside,
ros::Publisher& cloud_planes_pub,ros::Publisher& visualization_pub_,bool convexHull=false);
-void visualizePolygon(const sensor_msgs::PointCloud& cloud, robot_msgs::Polygon3D &polygon, int rgb, int id,
+void visualizePolygon(const sensor_msgs::PointCloud& cloud, geometry_msgs::Polygon &polygon, int rgb, int id,
ros::Publisher& visualization_pub);
void visualizeLines(ros::Publisher& visualization_pub_, std::string frame_id, std::vector<std::pair<btVector3,
Modified: pkg/trunk/stacks/common_msgs/mapping_msgs/msg/PolygonalMap.msg
===================================================================
--- pkg/trunk/stacks/common_msgs/mapping_msgs/msg/PolygonalMap.msg 2009-08-07 20:49:05 UTC (rev 21044)
+++ pkg/trunk/stacks/common_msgs/mapping_msgs/msg/PolygonalMap.msg 2009-08-07 20:52:44 UTC (rev 21045)
@@ -1,3 +1,3 @@
Header header
-robot_msgs/Polygon3D[] polygons
+geometry_msgs/Polygon[] polygons
sensor_msgs/Cha...
[truncated message content] |
|
From: <stu...@us...> - 2009-08-07 20:54:05
|
Revision: 21046
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21046&view=rev
Author: stuglaser
Date: 2009-08-07 20:53:57 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
More fixes for the geometry_msgs/Polygon changes
Modified Paths:
--------------
pkg/trunk/sandbox/lifelong_mapping/manifest.xml
pkg/trunk/sandbox/planar_objects/src/articulation_models.cpp
pkg/trunk/sandbox/planar_objects/src/find_planes.cpp
pkg/trunk/sandbox/planar_objects/src/vis_utils.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/doors_detector.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/geometric_helper.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/handle_detector.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_downsampler.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/bag_to_pcd.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation_in_proc.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/planar_fit.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_ground_removal.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_inc_ground_removal.cpp
pkg/trunk/vision/recognition_lambertian/src/plane_fit.cpp
pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp
pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp
Modified: pkg/trunk/sandbox/lifelong_mapping/manifest.xml
===================================================================
--- pkg/trunk/sandbox/lifelong_mapping/manifest.xml 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/sandbox/lifelong_mapping/manifest.xml 2009-08-07 20:53:57 UTC (rev 21046)
@@ -10,7 +10,7 @@
<url>http://pr.willowgarage.com/wiki/lifelong_mapping</url>
<depend package="roscpp"/>
<depend package="tf"/>
- <depend package="robot_msgs"/>
+ <depend package="geometry_msgs"/>
<depend package="toro"/>
<!--depend package="place_recognition"/>
<depend package="visual_odometry"/-->
Modified: pkg/trunk/sandbox/planar_objects/src/articulation_models.cpp
===================================================================
--- pkg/trunk/sandbox/planar_objects/src/articulation_models.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/sandbox/planar_objects/src/articulation_models.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -8,7 +8,6 @@
#include "articulation_models.h"
#include "Eigen/Core"
#include <Eigen/SVD>
-#include <Eigen/Eigen>
#include "opencv/cv.h"
using namespace Eigen;
Modified: pkg/trunk/sandbox/planar_objects/src/find_planes.cpp
===================================================================
--- pkg/trunk/sandbox/planar_objects/src/find_planes.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/sandbox/planar_objects/src/find_planes.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -9,7 +9,6 @@
using namespace ros;
using namespace std;
-using namespace robot_msgs;
#include <point_cloud_mapping/sample_consensus/sac_model_plane.h>
#include <point_cloud_mapping/sample_consensus/sac.h>
@@ -147,7 +146,7 @@
{
// Compute the convex hull of the area
// NOTE: this is faster than computing the concave (alpha) hull, so let's see how this works out
- Polygon3D polygon;
+ geometry_msgs::Polygon polygon;
cloud_geometry::areas::convexHull2D(points, indices[i], models[i], polygon);
// Compute the area of the polygon
Modified: pkg/trunk/sandbox/planar_objects/src/vis_utils.cpp
===================================================================
--- pkg/trunk/sandbox/planar_objects/src/vis_utils.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/sandbox/planar_objects/src/vis_utils.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -10,7 +10,6 @@
using namespace ros;
using namespace std;
-using namespace robot_msgs;
namespace planar_objects {
@@ -109,7 +108,7 @@
rgb=HSV_to_RGB( i/(float)plane_indices.size(),0.5,1);
if(convexHull) {
- Polygon3D polygon;
+ geometry_msgs::Polygon polygon;
cloud_geometry::areas::convexHull2D(cloud, plane_indices[i], plane_coeff[i],
polygon);
visualizePolygon(cloud, polygon,rgb,i,visualization_pub);
Modified: pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/doors_detector.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/doors_detector.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/doors_detector.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -33,7 +33,6 @@
using namespace std;
-using namespace robot_msgs;
using namespace door_msgs;
using namespace mapping_msgs;
using namespace ros;
Modified: pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/geometric_helper.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/geometric_helper.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/geometric_helper.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -33,7 +33,6 @@
#include <door_handle_detector/geometric_helper.h>
using namespace std;
-using namespace robot_msgs;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/** \brief Get a set of point indices between some specified bounds
Modified: pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/handle_detector.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/handle_detector.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/handle_detector.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -34,7 +34,6 @@
using namespace std;
using namespace ros;
-using namespace robot_msgs;
using namespace mapping_msgs;
using namespace door_msgs;
using namespace door_handle_detector;
@@ -303,7 +302,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void HandleDetector::refineHandleCandidatesWithDoorOutliers (vector<int> &handle_indices, vector<int> &outliers,
- const Polygon3D &polygon,
+ const geometry_msgs::Polygon &polygon,
const vector<double> &coeff, const geometry_msgs::Point32 &door_axis,
const Door& door_prior,
sensor_msgs::PointCloud& pointcloud) const
@@ -377,7 +376,7 @@
else
score /= fmin(0.0001, dist_to_side);
ROS_INFO (" Handle is found at %f [m] from the door side", dist_to_side);
-
+
if (score > best_score)
{
best_score = score;
@@ -423,7 +422,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void HandleDetector::getHandleCandidates (const vector<int> &indices, const vector<double> &coeff,
- const Polygon3D &polygon, const Polygon3D &polygon_tr,
+ const geometry_msgs::Polygon &polygon, const geometry_msgs::Polygon &polygon_tr,
Eigen::Matrix4d transformation, vector<int> &handle_indices,
sensor_msgs::PointCloud& pointcloud, geometry_msgs::PointStamped& viewpoint_cloud) const
{
@@ -490,8 +489,8 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void HandleDetector::getDoorOutliers (const vector<int> &indices, const vector<int> &inliers,
- const vector<double> &coeff, const Polygon3D &polygon,
- const Polygon3D &polygon_tr, Eigen::Matrix4d transformation,
+ const vector<double> &coeff, const geometry_msgs::Polygon &polygon,
+ const geometry_msgs::Polygon &polygon_tr, Eigen::Matrix4d transformation,
vector<int> &outliers, sensor_msgs::PointCloud& pointcloud) const
{
vector<int> tmp_indices; // Used as a temporary indices array
Modified: pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_downsampler.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_downsampler.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_downsampler.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -51,7 +51,6 @@
#include <sys/time.h>
using namespace std;
-using namespace robot_msgs;
class CloudDownsampler
{
Modified: pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/bag_to_pcd.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/bag_to_pcd.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/bag_to_pcd.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -52,8 +52,6 @@
#include <point_cloud_mapping/cloud_io.h>
#include <point_cloud_mapping/geometry/point.h>
-using namespace robot_msgs;
-
class BagToPcd
{
protected:
Modified: pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -62,7 +62,6 @@
#include <sys/time.h>
using namespace std;
-using namespace robot_msgs;
class NormalEstimation
{
Modified: pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation_in_proc.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation_in_proc.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation_in_proc.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -53,29 +53,28 @@
#include <point_cloud_mapping/normal_estimation_in_proc.h>
using namespace std;
-using namespace robot_msgs;
using namespace point_cloud_mapping;
NormalEstimationInProc::~NormalEstimationInProc (){}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-NormalEstimationInProc::NormalEstimationInProc()
+NormalEstimationInProc::NormalEstimationInProc()
{
node_.param ("~search_radius", radius_, 0.02); // 2cm radius by default
node_.param ("~search_k_closest", k_, 25); // 25 k-neighbors by default
node_.param ("~compute_moments", compute_moments_, false); // Do not compute moment invariants by default
-
+
node_.param ("~downsample", downsample_, 1); // Downsample cloud before normal estimation
node_.param ("~downsample_leaf_width_x", leaf_width_.x, 0.05); // 5cm radius by default
node_.param ("~downsample_leaf_width_y", leaf_width_.y, 0.05); // 5cm radius by default
node_.param ("~downsample_leaf_width_z", leaf_width_.z, 0.05); // 5cm radius by default
node_.param ("~cut_distance", cut_distance_, 10.0); // 10m by default
-
+
if (downsample_ != 0)
k_ = 10; // Reduce the size of K significantly
-
-
+
+
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -89,11 +88,11 @@
k_ = 10;
else
k_ = 25;
-
+
if (node_.hasParam ("~downsample_leaf_width_x")) node_.getParam ("~downsample_leaf_width_x", leaf_width_.x);
if (node_.hasParam ("~downsample_leaf_width_y")) node_.getParam ("~downsample_leaf_width_y", leaf_width_.y);
if (node_.hasParam ("~downsample_leaf_width_z")) node_.getParam ("~downsample_leaf_width_z", leaf_width_.z);
-
+
if (node_.hasParam ("~cut_distance"))
{
node_.getParam ("~cut_distance", cut_distance_);
@@ -116,7 +115,7 @@
viewpoint_laser.header.frame_id = "laser_tilt_mount_link";
// Set the viewpoint in the laser coordinate system to 0, 0, 0
viewpoint_laser.point.x = viewpoint_laser.point.y = viewpoint_laser.point.z = 0.0;
-
+
try
{
tf.transformPoint (cloud_frame, viewpoint_laser, viewpoint_cloud);
@@ -138,7 +137,7 @@
void NormalEstimationInProc::process_cloud (const sensor_msgs::PointCloud& cloud_, sensor_msgs::PointCloud& cloud_normals_)
{
updateParametersFromServer ();
-
+
ROS_INFO ("Received %d data points in frame %s with %d channels (%s).", (int)cloud_.pts.size (), cloud_.header.frame_id.c_str (),
(int)cloud_.chan.size (), cloud_geometry::getAvailableChannels (cloud_).c_str ());
if (cloud_.pts.size () == 0)
@@ -146,13 +145,13 @@
ROS_ERROR ("No data points found. Exiting...");
return;
}
-
+
// Figure out the viewpoint value in the cloud_frame frame
geometry_msgs::PointStamped viewpoint_cloud;
getCloudViewPoint (cloud_.header.frame_id, viewpoint_cloud, tf_);
-
+
ros::Time ts = ros::Time::now ();
-
+
// If a-priori downsampling is enabled...
if (downsample_ != 0)
{
@@ -166,10 +165,10 @@
{
// cloud_geometry::downsamplePointCloudSet (cloud_, cloud_down_, leaf_width_, d_idx, cut_distance_);
}
-
+
ROS_INFO ("Downsampling enabled. Number of points left: %d / %d in %g seconds.", (int)cloud_down_.pts.size (), (int)cloud_.pts.size (), (ros::Time::now () - ts1).toSec ());
}
-
+
// Resize
// We need to copy the original point cloud data, and this looks like a good way to do it
int original_chan_size;
@@ -184,7 +183,7 @@
cloud_normals_ = cloud_;
original_chan_size = cloud_.chan.size ();
}
-
+
// Allocate the extra needed channels
if (compute_moments_)
cloud_normals_.chan.resize (original_chan_size + 7); // Allocate 7 more channels
@@ -208,17 +207,17 @@
else
cloud_normals_.chan[d].vals.resize (cloud_.pts.size ());
}
-
+
// Create Kd-Tree
kdtree_ = new cloud_kdtree::KdTreeANN (cloud_normals_);
-
+
// Allocate enough space for point indices
points_indices_.resize (cloud_normals_.pts.size ());
for (int i = 0; i < (int)cloud_normals_.pts.size (); i++)
points_indices_[i].resize (k_);
-
+
ROS_INFO ("Kd-tree created in %g seconds.", (ros::Time::now () - ts).toSec ());
-
+
ts = ros::Time::now ();
// Get the nearest neighbors for all points
for (int i = 0; i < (int)cloud_normals_.pts.size (); i++)
@@ -227,7 +226,7 @@
kdtree_->nearestKSearch (i, k_, points_indices_[i], distances);
}
ROS_INFO ("Nearest neighbors found in %g seconds.\n", (ros::Time::now () - ts).toSec ());
-
+
#pragma omp parallel for schedule(dynamic)
for (int i = 0; i < (int)cloud_normals_.pts.size (); i++)
{
@@ -235,12 +234,12 @@
Eigen::Vector4d plane_parameters;
double curvature, j1, j2, j3;
cloud_geometry::nearest::computePointNormal (cloud_normals_, points_indices_[i], plane_parameters, curvature);
-
+
if (compute_moments_)
cloud_geometry::nearest::computeMomentInvariants (cloud_normals_, points_indices_[i], j1, j2, j3);
-
+
cloud_geometry::angles::flipNormalTowardsViewpoint (plane_parameters, cloud_normals_.pts[i], viewpoint_cloud);
-
+
cloud_normals_.chan[original_chan_size + 0].vals[i] = plane_parameters (0);
cloud_normals_.chan[original_chan_size + 1].vals[i] = plane_parameters (1);
cloud_normals_.chan[original_chan_size + 2].vals[i] = plane_parameters (2);
@@ -255,9 +254,9 @@
cloud_normals_.header=cloud_.header;
-
+
ROS_INFO ("Local features estimated in %g seconds.\n", (ros::Time::now () - ts).toSec ());
-
+
delete kdtree_;
}
Modified: pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/planar_fit.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/planar_fit.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/planar_fit.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -71,7 +71,6 @@
#include <angles/angles.h>
using namespace std;
-using namespace robot_msgs;
class PlanarFit
{
@@ -82,8 +81,8 @@
// ROS messages
sensor_msgs::PointCloud cloud_, cloud_down_, cloud_plane_, cloud_outliers_;
-
+
tf::TransformListener tf_;
// Kd-tree stuff
@@ -163,7 +162,7 @@
node_.advertise<sensor_msgs::PointCloud> ("~plane", 1);
node_.advertise<sensor_msgs::PointCloud> ("~outliers", 1);
- // A channel to visualize the normals as cute little lines
+ // A channel to visualize the normals as cute little lines
//node_.advertise<PolyLine> ("~normal_lines", 1);
node_.advertise<visualization_msgs::Marker>( "visualization_marker", 0 );
}
@@ -514,7 +513,7 @@
marker.color.b = 1.0;
int nr_points = points.pts.size ();
-
+
marker.points.resize (2 * nr_points);
for (int i = 0; i < nr_points; i++)
{
Modified: pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_ground_removal.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_ground_removal.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_ground_removal.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -65,7 +65,6 @@
#include <sys/time.h>
using namespace std;
-using namespace robot_msgs;
using namespace mapping_msgs;
class GroundRemoval
Modified: pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_inc_ground_removal.cpp
===================================================================
--- pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_inc_ground_removal.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_inc_ground_removal.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -68,7 +68,6 @@
#include <boost/thread.hpp>
using namespace std;
-using namespace robot_msgs;
using namespace mapping_msgs;
class IncGroundRemoval
@@ -281,7 +280,7 @@
{
all_indices[cp] = cp;
if (fabs (cloud_.pts[cp].z) < z_threshold_ || // max height for ground
- cloud_.pts[cp].z*cloud_.pts[cp].z < ground_slope_threshold_ * (cloud_.pts[cp].x*cloud_.pts[cp].x + cloud_.pts[cp].y*cloud_.pts[cp].y)) // max slope for ground
+ cloud_.pts[cp].z*cloud_.pts[cp].z < ground_slope_threshold_ * (cloud_.pts[cp].x*cloud_.pts[cp].x + cloud_.pts[cp].y*cloud_.pts[cp].y)) // max slope for ground
{
possible_ground_indices[nr_p] = cp;
nr_p++;
Modified: pkg/trunk/vision/recognition_lambertian/src/plane_fit.cpp
===================================================================
--- pkg/trunk/vision/recognition_lambertian/src/plane_fit.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/vision/recognition_lambertian/src/plane_fit.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -48,7 +48,6 @@
#include <angles/angles.h>
using namespace std;
-using namespace robot_msgs;
class PlanarFit
{
@@ -104,7 +103,7 @@
{
// Compute the convex hull of the area
// NOTE: this is faster than computing the concave (alpha) hull, so let's see how this works out
- Polygon3D polygon;
+ geometry_msgs::Polygon polygon;
cloud_geometry::areas::convexHull2D (points, indices[i], models[i], polygon);
// Compute the area of the polygon
Modified: pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp
===================================================================
--- pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -96,7 +96,6 @@
#include <boost/thread.hpp>
using namespace std;
-using namespace robot_msgs;
static const double pi = 3.141592653589793238462643383279502884197; // Archimedes constant pi
typedef struct _triangle_offsets
@@ -225,7 +224,7 @@
{
// Compute the convex hull of the area
// NOTE: this is faster than computing the concave (alpha) hull, so let's see how this works out
- Polygon3D polygon;
+ geometry_msgs::Polygon polygon;
cloud_geometry::areas::convexHull2D (points, indices[i], models[i], polygon);
// Compute the area of the polygon
Modified: pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp
===================================================================
--- pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp 2009-08-07 20:52:44 UTC (rev 21045)
+++ pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp 2009-08-07 20:53:57 UTC (rev 21046)
@@ -92,7 +92,6 @@
//#include "flann.h"
-using namespace robot_msgs;
using namespace std;
#define CV_PIXEL(type,img,x,y) (((type*)(img->imageData+y*img->widthStep))+x*img->nChannels)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tf...@us...> - 2009-08-07 21:48:21
|
Revision: 21055
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21055&view=rev
Author: tfoote
Date: 2009-08-07 21:48:10 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
stripping dependency on robot_srvs which doesn't exist anymore
Modified Paths:
--------------
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml
pkg/trunk/controllers/robot_mechanism_controllers/manifest.xml
pkg/trunk/highlevel/doors/doors_core/manifest.xml
pkg/trunk/highlevel/plugs/plugs_core/manifest.xml
pkg/trunk/highlevel/safety/safety_core/manifest.xml
pkg/trunk/highlevel/writing/writing_core/manifest.xml
pkg/trunk/mapping/collision_map/manifest.xml
pkg/trunk/mapping/door_stereo_detector/manifest.xml
pkg/trunk/mapping/door_tracker/manifest.xml
pkg/trunk/mapping/hallway_tracker/manifest.xml
pkg/trunk/mapping/table_object_detector/manifest.xml
pkg/trunk/motion_planning/ompl_planning/manifest.xml
pkg/trunk/motion_planning/plan_ompl_path/manifest.xml
pkg/trunk/nav/teleop_base/manifest.xml
pkg/trunk/pr2/motorconf_gui/manifest.xml
pkg/trunk/pr2/qualification/manifest.xml
pkg/trunk/sandbox/experimental_controllers/manifest.xml
pkg/trunk/sandbox/labeled_object_detector/manifest.xml
pkg/trunk/sandbox/pcd_novelty/manifest.xml
pkg/trunk/sandbox/person_follower/manifest.xml
pkg/trunk/sandbox/webteleop/manifest.xml
pkg/trunk/stacks/imu_drivers/imu_node/manifest.xml
pkg/trunk/stacks/mechanism/mechanism_bringup/manifest.xml
pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml
pkg/trunk/stacks/navigation/amcl/manifest.xml
pkg/trunk/stacks/navigation/nav_view/manifest.xml
pkg/trunk/stacks/semantic_mapping/door_handle_detector/manifest.xml
pkg/trunk/stacks/visualization/rviz/manifest.xml
pkg/trunk/stacks/world_models/topological_map/manifest.xml
pkg/trunk/vision/recognition_lambertian/manifest.xml
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -11,7 +11,6 @@
<depend package="control_toolbox" />
<depend package="roscpp" />
<depend package="robot_mechanism_controllers" />
- <depend package="robot_srvs" />
<url>http://pr.willowgarage.com</url>
<rosdep name="wxwidgets"/>
<rosdep name="wxpython"/>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/manifest.xml
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/controllers/robot_mechanism_controllers/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -14,7 +14,6 @@
<depend package="realtime_tools" />
<depend package="roscpp" />
<depend package="std_msgs" />
- <depend package="robot_srvs" />
<depend package="deprecated_srvs" />
<depend package="robot_msgs" />
<depend package="geometry_msgs" />
Modified: pkg/trunk/highlevel/doors/doors_core/manifest.xml
===================================================================
--- pkg/trunk/highlevel/doors/doors_core/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/highlevel/doors/doors_core/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -17,7 +17,6 @@
<depend package="door_msgs" />
<depend package="visualization_msgs"/>
- <depend package="robot_srvs" />
<depend package="deprecated_srvs" />
<depend package="nav_msgs" />
Modified: pkg/trunk/highlevel/plugs/plugs_core/manifest.xml
===================================================================
--- pkg/trunk/highlevel/plugs/plugs_core/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/highlevel/plugs/plugs_core/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -11,7 +11,6 @@
<depend package="roscpp" />
<depend package="geometry_msgs" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="deprecated_srvs" />
<depend package="mechanism_msgs" />
<depend package="std_msgs" />
Modified: pkg/trunk/highlevel/safety/safety_core/manifest.xml
===================================================================
--- pkg/trunk/highlevel/safety/safety_core/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/highlevel/safety/safety_core/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -10,7 +10,6 @@
<depend package="roscpp" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="robot_actions" />
<depend package="pr2_robot_actions" />
<depend package="plug_onbase_detector" />
Modified: pkg/trunk/highlevel/writing/writing_core/manifest.xml
===================================================================
--- pkg/trunk/highlevel/writing/writing_core/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/highlevel/writing/writing_core/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -12,7 +12,6 @@
<depend package="roscpp" />
<depend package="roslib" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="robot_actions" />
<depend package="pr2_robot_actions" />
<depend package="point_cloud_mapping" />
Modified: pkg/trunk/mapping/collision_map/manifest.xml
===================================================================
--- pkg/trunk/mapping/collision_map/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/mapping/collision_map/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -12,7 +12,6 @@
<depend package="std_msgs" />
<depend package="tf" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="visualization_msgs" />
<depend package="tabletop_msgs" />
<depend package="tabletop_srvs" />
Modified: pkg/trunk/mapping/door_stereo_detector/manifest.xml
===================================================================
--- pkg/trunk/mapping/door_stereo_detector/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/mapping/door_stereo_detector/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -10,7 +10,6 @@
<depend package="roscpp" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="mapping_msgs" />
<depend package="kdl" />
<depend package="angles" />
Modified: pkg/trunk/mapping/door_tracker/manifest.xml
===================================================================
--- pkg/trunk/mapping/door_tracker/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/mapping/door_tracker/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -15,7 +15,6 @@
<depend package="robot_msgs" />
<depend package="geometry_msgs" />
<depend package="door_msgs" />
- <depend package="robot_srvs" />
<depend package="angles" />
<depend package="point_cloud_mapping" />
<depend package="std_msgs" />
Modified: pkg/trunk/mapping/hallway_tracker/manifest.xml
===================================================================
--- pkg/trunk/mapping/hallway_tracker/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/mapping/hallway_tracker/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -10,7 +10,6 @@
<depend package="roscpp" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="mapping_msgs" />
<depend package="kdl" />
<depend package="point_cloud_mapping" />
Modified: pkg/trunk/mapping/table_object_detector/manifest.xml
===================================================================
--- pkg/trunk/mapping/table_object_detector/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/mapping/table_object_detector/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -13,7 +13,6 @@
<depend package="angles" />
<depend package="point_cloud_mapping" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="tabletop_msgs" />
<depend package="tabletop_srvs" />
<depend package="mapping_msgs" />
Modified: pkg/trunk/motion_planning/ompl_planning/manifest.xml
===================================================================
--- pkg/trunk/motion_planning/ompl_planning/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/motion_planning/ompl_planning/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -12,7 +12,6 @@
<depend package="std_msgs" />
<depend package="std_srvs" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="visualization_msgs" />
<depend package="motion_planning_msgs" />
<depend package="mapping_msgs" />
Modified: pkg/trunk/motion_planning/plan_ompl_path/manifest.xml
===================================================================
--- pkg/trunk/motion_planning/plan_ompl_path/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/motion_planning/plan_ompl_path/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -10,7 +10,6 @@
<depend package="std_srvs" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="motion_planning_msgs" />
Modified: pkg/trunk/nav/teleop_base/manifest.xml
===================================================================
--- pkg/trunk/nav/teleop_base/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/nav/teleop_base/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -6,7 +6,6 @@
<depend package="roscpp"/>
<depend package="rospy"/>
<depend package="std_msgs"/>
- <depend package="robot_srvs"/>
<depend package="tf" />
<depend package="control_toolbox" />
</package>
Modified: pkg/trunk/pr2/motorconf_gui/manifest.xml
===================================================================
--- pkg/trunk/pr2/motorconf_gui/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/pr2/motorconf_gui/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -6,11 +6,9 @@
<review status="unreviewed" notes="" />
<depend package="ethercat_hardware" />
<depend package="pr2_etherCAT" />
- <depend package="robot_srvs" />
<depend package="roslaunch" />
<depend package="std_msgs" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="mechanism_control" />
<depend package="mechanism_bringup" />
Modified: pkg/trunk/pr2/qualification/manifest.xml
===================================================================
--- pkg/trunk/pr2/qualification/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/pr2/qualification/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -12,7 +12,6 @@
<depend package="std_msgs" />
<depend package="robot_msgs" />
<depend package="diagnostic_msgs" />
- <depend package="robot_srvs" />
<depend package="hokuyo_node" />
<depend package="imu_node" />
<depend package="robot_mechanism_controllers" />
Modified: pkg/trunk/sandbox/experimental_controllers/manifest.xml
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/sandbox/experimental_controllers/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -17,7 +17,6 @@
<depend package="realtime_tools" />
<depend package="roscpp" />
<depend package="std_msgs" />
- <depend package="robot_srvs" />
<depend package="robot_msgs" />
<depend package="manipulation_msgs" />
<depend package="visualization_msgs" />
Modified: pkg/trunk/sandbox/labeled_object_detector/manifest.xml
===================================================================
--- pkg/trunk/sandbox/labeled_object_detector/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/sandbox/labeled_object_detector/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -9,7 +9,6 @@
<depend package="roscpp" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="robot_actions" />
<depend package="pr2_robot_actions" />
<depend package="point_cloud_mapping" />
Modified: pkg/trunk/sandbox/pcd_novelty/manifest.xml
===================================================================
--- pkg/trunk/sandbox/pcd_novelty/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/sandbox/pcd_novelty/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -9,7 +9,6 @@
<depend package="roscpp" />
<depend package="robot_msgs" />
- <depend package="robot_srvs" />
<depend package="robot_actions" />
<depend package="pr2_robot_actions" />
<depend package="point_cloud_mapping" />
Modified: pkg/trunk/sandbox/person_follower/manifest.xml
===================================================================
--- pkg/trunk/sandbox/person_follower/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/sandbox/person_follower/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -5,7 +5,6 @@
<review status="unreviewed" notes=""/>
<depend package="rospy" />
<depend package="roscpp" />
- <depend package="robot_srvs" />
<depend package="tf" />
<depend package="nav_robot_actions" />
<depend package="std_msgs" />
Modified: pkg/trunk/sandbox/webteleop/manifest.xml
===================================================================
--- pkg/trunk/sandbox/webteleop/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/sandbox/webteleop/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -11,7 +11,6 @@
<depend package="std_msgs"/>
<depend package="robot_msgs"/>
<depend package="geometry_msgs"/>
- <depend package="robot_srvs"/>
<depend package="nav_msgs"/>
<depend package="bullet_python"/>
<depend package="bullet"/>
Modified: pkg/trunk/stacks/imu_drivers/imu_node/manifest.xml
===================================================================
--- pkg/trunk/stacks/imu_drivers/imu_node/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/stacks/imu_drivers/imu_node/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -12,7 +12,6 @@
<depend package="diagnostic_updater"/>
<depend package="tf"/>
<depend package="std_srvs"/>
- <depend package="robot_srvs"/>
<export>
<cpp cflags="-I${prefix}/msg/cpp -I${prefix}/srv/cpp" />
</export>
Modified: pkg/trunk/stacks/mechanism/mechanism_bringup/manifest.xml
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_bringup/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/stacks/mechanism/mechanism_bringup/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -5,6 +5,5 @@
<review status="unreviewed" notes=""/>
<depend package="robot_mechanism_controllers"/>
<depend package="pr2_mechanism_controllers"/>
- <depend package="robot_srvs"/>
<depend package="imu_node"/>
</package>
Modified: pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -16,7 +16,6 @@
<depend package="robot_actions" />
<depend package="pr2_robot_actions" />
<depend package="robot_msgs" />
-<depend package="robot_srvs" />
<depend package="mechanism_msgs" />
<depend package="std_srvs" />
<depend package="rosconsole" />
Modified: pkg/trunk/stacks/navigation/amcl/manifest.xml
===================================================================
--- pkg/trunk/stacks/navigation/amcl/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/stacks/navigation/amcl/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -7,7 +7,6 @@
<review status="proposal cleared" notes="API review in progress (Brian)"/>
<depend package="roscpp" />
<depend package="tf" />
- <depend package="robot_srvs" />
<depend package="robot_msgs" />
<depend package="nav_msgs" />
<depend package="std_srvs" />
Modified: pkg/trunk/stacks/navigation/nav_view/manifest.xml
===================================================================
--- pkg/trunk/stacks/navigation/nav_view/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/stacks/navigation/nav_view/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -5,7 +5,6 @@
<review status="proposal cleared" notes=""/>
<url>http://pr.willowgarage.com/wiki/nav_view</url>
<depend package="roscpp"/>
- <depend package="robot_srvs"/>
<depend package="nav_msgs"/>
<depend package="geometry_msgs"/>
<depend package="tf"/>
Modified: pkg/trunk/stacks/semantic_mapping/door_handle_detector/manifest.xml
===================================================================
--- pkg/trunk/stacks/semantic_mapping/door_handle_detector/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/stacks/semantic_mapping/door_handle_detector/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -23,7 +23,6 @@
<depend package="sensor_msgs"/>
<depend package="visualization_msgs" />
- <depend package="robot_srvs" />
<depend package="std_srvs" />
<depend package="robot_actions" />
Modified: pkg/trunk/stacks/visualization/rviz/manifest.xml
===================================================================
--- pkg/trunk/stacks/visualization/rviz/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/stacks/visualization/rviz/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -14,7 +14,6 @@
<depend package="rosconsole"/>
<depend package="message_filters"/>
<depend package="std_msgs"/>
- <depend package="robot_msgs"/>
<depend package="sensor_msgs"/>
<depend package="geometry_msgs"/>
<depend package="nav_msgs"/>
@@ -27,7 +26,6 @@
<depend package="rxtools"/>
<depend package="mechanism_model" />
<depend package="planning_environment"/>
- <depend package="robot_srvs" />
<depend package="wxswig"/>
<depend package="wxPython_swig_interface"/>
<depend package="visualization_msgs" />
Modified: pkg/trunk/stacks/world_models/topological_map/manifest.xml
===================================================================
--- pkg/trunk/stacks/world_models/topological_map/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/stacks/world_models/topological_map/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -7,7 +7,6 @@
<depend package="door_msgs" />
<depend package="tinyxml" />
<depend package="deprecated_msgs" />
-<depend package="robot_srvs" />
<depend package="rosconsole" />
<depend package="tinyxml" />
<depend package="tf" />
Modified: pkg/trunk/vision/recognition_lambertian/manifest.xml
===================================================================
--- pkg/trunk/vision/recognition_lambertian/manifest.xml 2009-08-07 21:41:55 UTC (rev 21054)
+++ pkg/trunk/vision/recognition_lambertian/manifest.xml 2009-08-07 21:48:10 UTC (rev 21055)
@@ -12,7 +12,6 @@
<depend package="robot_msgs" />
<depend package="geometry_msgs" />
<depend package="door_msgs" />
- <depend package="robot_srvs" />
<depend package="robot_actions" />
<depend package="kdl" />
<depend package="angles" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tf...@us...> - 2009-08-07 22:13:09
|
Revision: 21051
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21051&view=rev
Author: tfoote
Date: 2009-08-07 21:28:23 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
moving BatteryState into pr2_msgs #1944
Modified Paths:
--------------
pkg/trunk/drivers/robot/erratic_player/erratic_player.cc
pkg/trunk/drivers/robot/erratic_player/manifest.xml
pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/gazebo_battery.h
pkg/trunk/drivers/simulator/gazebo_plugin/src/gazebo_battery.cpp
pkg/trunk/stacks/trex/trex_pr2/deprecated/battery_state_adapter.cpp
pkg/trunk/stacks/trex/trex_pr2/include/trex_pr2/pr2_adapters.h
Added Paths:
-----------
pkg/trunk/stacks/pr2_drivers/pr2_msgs/msg/BatteryState.msg
Removed Paths:
-------------
pkg/trunk/stacks/common_msgs/robot_msgs/msg/BatteryState.msg
Modified: pkg/trunk/drivers/robot/erratic_player/erratic_player.cc
===================================================================
--- pkg/trunk/drivers/robot/erratic_player/erratic_player.cc 2009-08-07 21:24:30 UTC (rev 21050)
+++ pkg/trunk/drivers/robot/erratic_player/erratic_player.cc 2009-08-07 21:28:23 UTC (rev 21051)
@@ -89,7 +89,7 @@
#include <deprecated_msgs/RobotBase2DOdom.h>
//#include <std_msgs/RobotBase2DCmdVel.h>
#include <robot_msgs/PoseDot.h>
-#include <robot_msgs/BatteryState.h>
+#include <pr2_msgs/BatteryState.h>
#define PLAYER_QUEUE_LEN 32
@@ -119,7 +119,7 @@
playerxdr_ftable_init();
advertise<deprecated_msgs::RobotBase2DOdom>("odom", 1);
- advertise<robot_msgs::BatteryState>("battery_state", 1);
+ advertise<pr2_msgs::BatteryState>("battery_state", 1);
// The Player address that will be assigned to this device. The format
// is interface:index. The interface must match what the driver is
@@ -337,7 +337,7 @@
(hdr->addr.interf == PLAYER_POWER_CODE))
{
player_power_data_t* pdata = (player_power_data_t*)msg->GetPayload();
- robot_msgs::BatteryState state;
+ pr2_msgs::BatteryState state;
state.header.stamp = ros::Time::now();
state.energy_remaining = pdata->volts; //Not Correct, in volts
state.energy_capacity = pdata->volts / pdata->percent * 100; //Returns max number of volts.
Modified: pkg/trunk/drivers/robot/erratic_player/manifest.xml
===================================================================
--- pkg/trunk/drivers/robot/erratic_player/manifest.xml 2009-08-07 21:24:30 UTC (rev 21050)
+++ pkg/trunk/drivers/robot/erratic_player/manifest.xml 2009-08-07 21:28:23 UTC (rev 21051)
@@ -7,6 +7,7 @@
<depend package="player" />
<depend package="std_msgs" />
<depend package="robot_msgs" />
+ <depend package="pr2_msgs" />
<depend package="deprecated_msgs" />
<depend package="tf" />
</package>
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/gazebo_battery.h
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/gazebo_battery.h 2009-08-07 21:24:30 UTC (rev 21050)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/gazebo_battery.h 2009-08-07 21:28:23 UTC (rev 21051)
@@ -35,7 +35,7 @@
#include <gazebo/Controller.hh>
#include <gazebo/Entity.hh>
#include <gazebo/Model.hh>
-#include <robot_msgs/BatteryState.h>
+#include <pr2_msgs/BatteryState.h>
#include <diagnostic_msgs/DiagnosticMessage.h>
#include <diagnostic_msgs/DiagnosticStatus.h>
#include <gazebo_plugin/PlugCommand.h>
@@ -108,7 +108,7 @@
Model *parent_model_;
/// \brief ros message for battery state
- robot_msgs::BatteryState battery_state_;
+ pr2_msgs::BatteryState battery_state_;
/// \brief ros message for diagnostic messages
diagnostic_msgs::DiagnosticMessage diagnostic_message_;
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/src/gazebo_battery.cpp
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/src/gazebo_battery.cpp 2009-08-07 21:24:30 UTC (rev 21050)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/src/gazebo_battery.cpp 2009-08-07 21:28:23 UTC (rev 21051)
@@ -69,7 +69,7 @@
void GazeboBattery::LoadChild(XMLConfigNode *node)
{
this->stateTopicName_ = node->GetString("stateTopicName","battery_state",0);
- this->pub_ = this->rosnode_->advertise<robot_msgs::BatteryState>(this->stateTopicName_,10);
+ this->pub_ = this->rosnode_->advertise<pr2_msgs::BatteryState>(this->stateTopicName_,10);
//this->diagnosticMessageTopicName_ = node->GetString("diagnosticMessageTopicName","diagnostic",0);
//this->diag_pub_ = this->rosnode_->advertise<diagnostic_msgs::DiagnosticMessage>(this->diagnosticMessageTopicName_,10);
Deleted: pkg/trunk/stacks/common_msgs/robot_msgs/msg/BatteryState.msg
===================================================================
--- pkg/trunk/stacks/common_msgs/robot_msgs/msg/BatteryState.msg 2009-08-07 21:24:30 UTC (rev 21050)
+++ pkg/trunk/stacks/common_msgs/robot_msgs/msg/BatteryState.msg 2009-08-07 21:28:23 UTC (rev 21051)
@@ -1,4 +0,0 @@
-Header header
-float64 energy_remaining ## Joules
-float64 energy_capacity ## Joules
-float64 power_consumption ## Watts
Copied: pkg/trunk/stacks/pr2_drivers/pr2_msgs/msg/BatteryState.msg (from rev 17548, pkg/trunk/stacks/common_msgs/robot_msgs/msg/BatteryState.msg)
===================================================================
--- pkg/trunk/stacks/pr2_drivers/pr2_msgs/msg/BatteryState.msg (rev 0)
+++ pkg/trunk/stacks/pr2_drivers/pr2_msgs/msg/BatteryState.msg 2009-08-07 21:28:23 UTC (rev 21051)
@@ -0,0 +1,4 @@
+Header header
+float64 energy_remaining ## Joules
+float64 energy_capacity ## Joules
+float64 power_consumption ## Watts
Modified: pkg/trunk/stacks/trex/trex_pr2/deprecated/battery_state_adapter.cpp
===================================================================
--- pkg/trunk/stacks/trex/trex_pr2/deprecated/battery_state_adapter.cpp 2009-08-07 21:24:30 UTC (rev 21050)
+++ pkg/trunk/stacks/trex/trex_pr2/deprecated/battery_state_adapter.cpp 2009-08-07 21:28:23 UTC (rev 21051)
@@ -1,13 +1,13 @@
#include "trex_ros/ros_state_adapter.h"
#include "Domains.hh"
-#include <robot_msgs/BatteryState.h>
+#include <pr2_msgs/BatteryState.h>
namespace TREX {
- class BatteryStateAdapter: public ROSStateAdapter<robot_msgs::BatteryState> {
+ class BatteryStateAdapter: public ROSStateAdapter<pr2_msgs::BatteryState> {
public:
BatteryStateAdapter(const LabelStr& agentName, const TiXmlElement& configData)
- : ROSStateAdapter<robot_msgs::BatteryState> ( agentName, configData) {
+ : ROSStateAdapter<pr2_msgs::BatteryState> ( agentName, configData) {
}
virtual ~BatteryStateAdapter(){}
Modified: pkg/trunk/stacks/trex/trex_pr2/include/trex_pr2/pr2_adapters.h
===================================================================
--- pkg/trunk/stacks/trex/trex_pr2/include/trex_pr2/pr2_adapters.h 2009-08-07 21:24:30 UTC (rev 21050)
+++ pkg/trunk/stacks/trex/trex_pr2/include/trex_pr2/pr2_adapters.h 2009-08-07 21:28:23 UTC (rev 21051)
@@ -45,7 +45,7 @@
#include <deprecated_msgs/RobotBase2DOdom.h>
#include <geometry_msgs/Pose.h>
#include <door_msgs/Door.h>
-#include <robot_msgs/BatteryState.h>
+#include <pr2_msgs/BatteryState.h>
#include <plugs_msgs/PlugStow.h>
#include <robot_actions/action_runner.h>
#include <robot_actions/action.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ei...@us...> - 2009-08-07 22:13:18
|
Revision: 21049
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21049&view=rev
Author: eitanme
Date: 2009-08-07 21:22:37 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
First half of the change from deprecated_msgs::RobotBase2DOdom to nav_msgs::Odometry, I think all the c++ compiles, can't speak for functionality yet, also... the python has yet to be run... this may break some things
Modified Paths:
--------------
pkg/trunk/calibration/wheel_odometry_calibration/manifest.xml
pkg/trunk/calibration/wheel_odometry_calibration/src/odom_calib.cpp
pkg/trunk/calibration/wheel_odometry_calibration/src/odom_calib.h
pkg/trunk/controllers/pr2_mechanism_controllers/doc.dox
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_base_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_odometry.h
pkg/trunk/controllers/pr2_mechanism_controllers/manifest.xml
pkg/trunk/controllers/pr2_mechanism_controllers/src/base_kinematics.cpp
pkg/trunk/controllers/pr2_mechanism_controllers/src/pr2_base_controller.cpp
pkg/trunk/controllers/pr2_mechanism_controllers/src/pr2_odometry.cpp
pkg/trunk/controllers/pr2_mechanism_controllers/test/test_odom.cpp
pkg/trunk/controllers/pr2_mechanism_controllers/test/test_run_base_controller.cpp
pkg/trunk/demos/door_demos_gazebo/manifest.xml
pkg/trunk/demos/door_demos_gazebo/scripts/initialize_nav.py
pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/manifest.xml
pkg/trunk/demos/tabletop_manipulation/tabletop_scripts/old/scripts/approachtable.py
pkg/trunk/demos/test_2dnav_gazebo/manifest.xml
pkg/trunk/demos/test_2dnav_gazebo/set_goal.py
pkg/trunk/drivers/robot/pr2/pr2_phase_space/manifest.xml
pkg/trunk/drivers/robot/pr2/pr2_phase_space/src/phase_space_fake_localization.cpp
pkg/trunk/drivers/simulator/gazebo_plugin/manifest.xml
pkg/trunk/drivers/simulator/gazebo_plugin/src/ros_diffdrive.cpp
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/manifest.xml
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomw_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomx_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxy_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxyw_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomy_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_vw_gt.py
pkg/trunk/stacks/common_msgs/geometry_msgs/msg/PoseWithCovariance.msg
pkg/trunk/stacks/common_msgs/nav_msgs/msg/Odometry.msg
pkg/trunk/stacks/geometry/tf/include/tf/transform_datatypes.h
Added Paths:
-----------
pkg/trunk/stacks/common_msgs/geometry_msgs/msg/PoseWithCovarianceStamped.msg
pkg/trunk/stacks/common_msgs/geometry_msgs/msg/TwistWithCovarianceStamped.msg
Removed Paths:
-------------
pkg/trunk/stacks/pr2_drivers/pr2_msgs/msg/Odometry.msg
Modified: pkg/trunk/calibration/wheel_odometry_calibration/manifest.xml
===================================================================
--- pkg/trunk/calibration/wheel_odometry_calibration/manifest.xml 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/calibration/wheel_odometry_calibration/manifest.xml 2009-08-07 21:22:37 UTC (rev 21049)
@@ -5,7 +5,7 @@
<review status="unreviewed" notes=""/>
<depend package="tf" />
<depend package="robot_msgs" />
- <depend package="deprecated_msgs" />
+ <depend package="nav_msgs" />
<depend package="roscpp" />
<depend package="pr2_mechanism_controllers" />
</package>
Modified: pkg/trunk/calibration/wheel_odometry_calibration/src/odom_calib.cpp
===================================================================
--- pkg/trunk/calibration/wheel_odometry_calibration/src/odom_calib.cpp 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/calibration/wheel_odometry_calibration/src/odom_calib.cpp 2009-08-07 21:22:37 UTC (rev 21049)
@@ -72,12 +72,12 @@
{
_odom_mutex.lock();
if (!_odom_active){
- _odom_begin = _odom.pos.th;
- _odom_end = _odom.pos.th;
+ _odom_begin = tf::getYaw(_odom.pose_with_covariance.pose.orientation);
+ _odom_end = tf::getYaw(_odom.pose_with_covariance.pose.orientation);
_odom_active = true;
}
else{
- double tmp = _odom.pos.th;
+ double tmp = tf::getYaw(_odom.pose_with_covariance.pose.orientation);
AngleOverflowCorrect(tmp, _odom_end);
_odom_end = tmp;
}
Modified: pkg/trunk/calibration/wheel_odometry_calibration/src/odom_calib.h
===================================================================
--- pkg/trunk/calibration/wheel_odometry_calibration/src/odom_calib.h 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/calibration/wheel_odometry_calibration/src/odom_calib.h 2009-08-07 21:22:37 UTC (rev 21049)
@@ -42,7 +42,7 @@
// messages
-#include "deprecated_msgs/RobotBase2DOdom.h"
+#include "nav_msgs/Odometry.h"
#include "robot_msgs/PoseDot.h"
#include "geometry_msgs/PoseWithRatesStamped.h"
#include "mechanism_msgs/MechanismState.h"
@@ -79,7 +79,7 @@
void AngleOverflowCorrect(double& a, double ref);
// messages to receive
- deprecated_msgs::RobotBase2DOdom _odom;
+ nav_msgs::Odometry _odom;
geometry_msgs::PoseWithRatesStamped _imu;
mechanism_msgs::MechanismState _mech;
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/doc.dox
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/doc.dox 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/doc.dox 2009-08-07 21:22:37 UTC (rev 21049)
@@ -22,7 +22,7 @@
<table border="1">
<tr><th> Topic Name </th> <th> Message Type </th><th> Description </th></tr>
<tr><td>\ref controller::BaseController::setOdomMessage "odom"</td>
- <td><a href="http://pr.willowgarage.com/pr-docs/ros-packages/std_msgs/html/classstd__msgs_1_1RobotBase2DOdom.html">RobotBase2DOdom </a> </td>
+ <td><a href="http://pr.willowgarage.com/pr-docs/ros-packages/std_msgs/html/classstd__msgs_1_1Odometry.html">Odometry </a> </td>
<td>Odometry information from base caster and wheels. </td></tr>
</table><br>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h 2009-08-07 21:22:37 UTC (rev 21049)
@@ -37,7 +37,7 @@
#include <mechanism_model/robot.h>
#include <mechanism_control/controller.h>
-#include <robot_msgs/PoseDot.h>
+#include <geometry_msgs/Twist.h>
#include <geometry_msgs/Point.h>
#include <control_toolbox/filters.h>
@@ -248,7 +248,7 @@
* @param vel Velocity of the center of rotation
* @return Velocity at the given point
*/
- robot_msgs::PoseDot pointVel2D(const geometry_msgs::Point& pos, const robot_msgs::PoseDot& vel);
+ geometry_msgs::Twist pointVel2D(const geometry_msgs::Point& pos, const geometry_msgs::Twist& vel);
/*!
* \brief remembers everything about the state of the robot
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_base_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_base_controller.h 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_base_controller.h 2009-08-07 21:22:37 UTC (rev 21049)
@@ -84,13 +84,13 @@
* \brief callback function for setting the desired velocity using a topic
* @param cmd_vel Velocity command of the base in m/s and rad/s
*/
- void setCommand(robot_msgs::PoseDot cmd_vel);
+ void setCommand(geometry_msgs::Twist cmd_vel);
/*!
* \brief Returns the current position command
* @return Current velocity command
*/
- robot_msgs::PoseDot getCommand();
+ geometry_msgs::Twist getCommand();
/*!
* \brief class where the robot's information is computed and stored
@@ -149,22 +149,22 @@
* \brief Input speed command vector represents the desired speed requested by the node. Note that this may differ from the
* current commanded speed due to acceleration limits imposed by the controller.
*/
- robot_msgs::PoseDot cmd_vel_t_;
+ geometry_msgs::Twist cmd_vel_t_;
/*!
* \brief speed command vector used internally to represent the current commanded speed
*/
- robot_msgs::PoseDot cmd_vel_;
+ geometry_msgs::Twist cmd_vel_;
/*!
* \brief Input speed command vector represents the desired speed requested by the node.
*/
- robot_msgs::PoseDot desired_vel_;
+ geometry_msgs::Twist desired_vel_;
/*!
* \brief velocity limits specified externally
*/
- robot_msgs::PoseDot max_vel_;
+ geometry_msgs::Twist max_vel_;
/*!
* \brief acceleration limits specified externally
@@ -264,17 +264,17 @@
/*!
* \brief interpolates velocities within a given time based on maximum accelerations
*/
- robot_msgs::PoseDot interpolateCommand(robot_msgs::PoseDot start, robot_msgs::PoseDot end, geometry_msgs::Twist max_rate, double dT);
+ geometry_msgs::Twist interpolateCommand(geometry_msgs::Twist start, geometry_msgs::Twist end, geometry_msgs::Twist max_rate, double dT);
/*!
* \brief deal with cmd_vel command from 2dnav stack
*/
- void CmdBaseVelReceived(const robot_msgs::PoseDotConstPtr& msg);
+ void CmdBaseVelReceived(const geometry_msgs::TwistConstPtr& msg);
/*!
* \brief callback message, used to remember where the base is commanded to go
*/
- robot_msgs::PoseDot base_vel_msg_;
+ geometry_msgs::Twist base_vel_msg_;
/*!
* \brief generic epsilon value that is used as a minimum or maximum allowable input value
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_odometry.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_odometry.h 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_odometry.h 2009-08-07 21:22:37 UTC (rev 21049)
@@ -34,11 +34,10 @@
#include <Eigen/Array>
#include <Eigen/SVD>
-#include <pr2_msgs/Odometry.h>
+#include <nav_msgs/Odometry.h>
#include <realtime_tools/realtime_publisher.h>
#include <tf/tfMessage.h>
#include <pr2_mechanism_controllers/base_kinematics.h>
-#include <deprecated_msgs/RobotBase2DOdom.h>
#include <angles/angles.h>
typedef Eigen::Matrix<float, 3, 1> OdomMatrix3x1;
@@ -118,9 +117,9 @@
/*!
* \brief Builds the odometry message and prepares it for sending
- * @param msg The pr2_msgs::Odometry into which the odometry values are placed
+ * @param msg The nav_msgs::Odometry into which the odometry values are placed
*/
- void getOdometryMessage(pr2_msgs::Odometry &msg);
+ void getOdometryMessage(nav_msgs::Odometry &msg);
/*!
* \brief Takes the current odometery information and stores it into the six double parameters
@@ -134,11 +133,11 @@
void getOdometry(double &x, double &y, double &yaw, double &vx, double &vy, double &vw);
/*!
- * \brief Takes the current odometry information and stores it into the Point and PoseDot parameters
+ * \brief Takes the current odometry information and stores it into the Point and Twist parameters
* @param odom Point into which the odometry position is placed (z is theta)
* @param odom_vel into which the odometry velocity is placed
*/
- void getOdometry(geometry_msgs::Point &odom, robot_msgs::PoseDot &odom_vel);
+ void getOdometry(geometry_msgs::Point &odom, geometry_msgs::Twist &odom_vel);
/*!
* \brief Computes the base velocity from the caster positions and wheel speeds
@@ -187,9 +186,9 @@
geometry_msgs::Point odom_;
/*!
- * \brief PoseDot that remembers the current translational velocities (vel.vx, vel.vy) and angular position (ang_vel.vz)
+ * \brief Twist that remembers the current translational velocities (vel.vx, vel.vy) and angular position (ang_vel.vz)
*/
- robot_msgs::PoseDot odom_vel_;
+ geometry_msgs::Twist odom_vel_;
/*!
* \brief The type of weighting used in findWeightMatrix
@@ -224,23 +223,12 @@
/*!
* \brief The RealtimePublisher that does the realtime publishing of the odometry
*/
- realtime_tools::RealtimePublisher <pr2_msgs::Odometry>* odometry_publisher_ ;
+ realtime_tools::RealtimePublisher <nav_msgs::Odometry>* odometry_publisher_ ;
/*!
- * \brief The RealtimePublisher that does the realtime publishing of the old style odometry
- */
- realtime_tools::RealtimePublisher <deprecated_msgs::RobotBase2DOdom>* old_odometry_publisher_ ;
-
- /*!
* \brief Publishes the transform between the odometry frame and the base frame
*/
realtime_tools::RealtimePublisher <tf::tfMessage>* transform_publisher_ ;
- /*!
- * \brief Creates an old odometry message from the new odometery message
- * @param msg The old message into which the odometry will be placed
- */
- void getOldOdometryMessage(deprecated_msgs::RobotBase2DOdom &msg);
-
};
}
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/manifest.xml
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/manifest.xml 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/manifest.xml 2009-08-07 21:22:37 UTC (rev 21049)
@@ -14,7 +14,7 @@
<depend package="rospy" />
<depend package="std_msgs" />
<depend package="mechanism_msgs" />
- <depend package="deprecated_msgs" />
+ <depend package="nav_msgs" />
<depend package="pr2_msgs" />
<depend package="pr2_srvs"/>
<depend package="robot_msgs" />
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/src/base_kinematics.cpp
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/src/base_kinematics.cpp 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/src/base_kinematics.cpp 2009-08-07 21:22:37 UTC (rev 21049)
@@ -188,11 +188,11 @@
}
-robot_msgs::PoseDot BaseKinematics::pointVel2D(const geometry_msgs::Point& pos, const robot_msgs::PoseDot& vel)
+geometry_msgs::Twist BaseKinematics::pointVel2D(const geometry_msgs::Point& pos, const geometry_msgs::Twist& vel)
{
- robot_msgs::PoseDot result;
- result.vel.vx = vel.vel.vx - pos.y * vel.ang_vel.vz;
- result.vel.vy = vel.vel.vy + pos.x * vel.ang_vel.vz;
- result.vel.vz = 0;
+ geometry_msgs::Twist result;
+ result.linear.x = vel.linear.x - pos.y * vel.angular.z;
+ result.linear.y = vel.linear.y + pos.x * vel.angular.z;
+ result.angular.z = 0;
return result;
}
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/src/pr2_base_controller.cpp
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/src/pr2_base_controller.cpp 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/src/pr2_base_controller.cpp 2009-08-07 21:22:37 UTC (rev 21049)
@@ -43,17 +43,17 @@
Pr2BaseController::Pr2BaseController()
{
//init variables
- cmd_vel_.vel.vx = 0;
- cmd_vel_.vel.vy = 0;
- cmd_vel_.ang_vel.vz = 0;
+ cmd_vel_.linear.x = 0;
+ cmd_vel_.linear.y = 0;
+ cmd_vel_.angular.z = 0;
- desired_vel_.vel.vx = 0;
- desired_vel_.vel.vy = 0;
- desired_vel_.ang_vel.vz = 0;
+ desired_vel_.linear.x = 0;
+ desired_vel_.linear.y = 0;
+ desired_vel_.angular.z = 0;
- cmd_vel_t_.vel.vx = 0;
- cmd_vel_t_.vel.vy = 0;
- cmd_vel_t_.ang_vel.vz = 0;
+ cmd_vel_t_.linear.x = 0;
+ cmd_vel_t_.linear.y = 0;
+ cmd_vel_t_.angular.z = 0;
new_cmd_available_ = false;
@@ -101,9 +101,9 @@
// joy_sub_ = ros_node_.subscribe(joy_listen_topic, 1, &AntiCollisionBaseController::joyCallBack, this);
//Get params from param server
- node_.param<double> ("max_vel/vx", max_vel_.vel.vx, .5);
- node_.param<double> ("max_vel/vy", max_vel_.vel.vy, .5);
- node_.param<double> ("max_vel/omegaz", max_vel_.ang_vel.vz, 10.0); //0.5
+ node_.param<double> ("max_vel/vx", max_vel_.linear.x, .5);
+ node_.param<double> ("max_vel/vy", max_vel_.linear.y, .5);
+ node_.param<double> ("max_vel/omegaz", max_vel_.angular.z, 10.0); //0.5
node_.param<double> ("max_accel/ax", max_accel_.linear.x, .2);
node_.param<double> ("max_accel/ay", max_accel_.linear.y, .2);
node_.param<double> ("max_accel/alphaz", max_accel_.linear.z, 10.0); //0.2
@@ -122,7 +122,7 @@
node_.param<double> ("state_publish_time", state_publish_time_, 0.5);
node_.param<std::string> ("cmd_topic", cmd_topic_, "/cmd_vel");
- cmd_sub_ = node_.subscribe<robot_msgs::PoseDot>(cmd_topic_, 1, &Pr2BaseController::CmdBaseVelReceived, this);
+ cmd_sub_ = node_.subscribe<geometry_msgs::Twist>(cmd_topic_, 1, &Pr2BaseController::CmdBaseVelReceived, this);
//casters
caster_controller_.resize(base_kin_.num_casters_);
@@ -166,25 +166,25 @@
}
// Set the base velocity command
-void Pr2BaseController::setCommand(robot_msgs::PoseDot cmd_vel)
+void Pr2BaseController::setCommand(geometry_msgs::Twist cmd_vel)
{
- double vel_mag = sqrt(cmd_vel.vel.vx * cmd_vel.vel.vx + cmd_vel.vel.vy * cmd_vel.vel.vy);
- double clamped_vel_mag = filters::clamp(vel_mag, -(max_vel_.vel.vx + max_vel_.vel.vy) / 2.0, (max_vel_.vel.vx + max_vel_.vel.vy) / 2.0);
+ double vel_mag = sqrt(cmd_vel.linear.x * cmd_vel.linear.x + cmd_vel.linear.y * cmd_vel.linear.y);
+ double clamped_vel_mag = filters::clamp(vel_mag, -(max_vel_.linear.x + max_vel_.linear.y) / 2.0, (max_vel_.linear.x + max_vel_.linear.y) / 2.0);
if(vel_mag > eps_)
{
- cmd_vel_t_.vel.vx = cmd_vel.vel.vx * clamped_vel_mag / vel_mag;
- cmd_vel_t_.vel.vy = cmd_vel.vel.vy * clamped_vel_mag / vel_mag;
+ cmd_vel_t_.linear.x = cmd_vel.linear.x * clamped_vel_mag / vel_mag;
+ cmd_vel_t_.linear.y = cmd_vel.linear.y * clamped_vel_mag / vel_mag;
}
else
{
- cmd_vel_t_.vel.vx = 0.0;
- cmd_vel_t_.vel.vy = 0.0;
+ cmd_vel_t_.linear.x = 0.0;
+ cmd_vel_t_.linear.y = 0.0;
}
- cmd_vel_t_.ang_vel.vz = filters::clamp(cmd_vel.ang_vel.vz, -max_vel_.ang_vel.vz, max_vel_.ang_vel.vz);
+ cmd_vel_t_.angular.z = filters::clamp(cmd_vel.angular.z, -max_vel_.angular.z, max_vel_.angular.z);
cmd_received_timestamp_ = base_kin_.robot_state_->hw_->current_time_;
- ROS_DEBUG("BaseController:: command received: %f %f %f",cmd_vel.vel.vx,cmd_vel.vel.vy,cmd_vel.ang_vel.vz);
- ROS_DEBUG("BaseController:: command current: %f %f %f", cmd_vel_.vel.vx,cmd_vel_.vel.vy,cmd_vel_.ang_vel.vz);
+ ROS_DEBUG("BaseController:: command received: %f %f %f",cmd_vel.linear.x,cmd_vel.linear.y,cmd_vel.angular.z);
+ ROS_DEBUG("BaseController:: command current: %f %f %f", cmd_vel_.linear.x,cmd_vel_.linear.y,cmd_vel_.angular.z);
ROS_DEBUG("BaseController:: clamped vel: %f", clamped_vel_mag);
ROS_DEBUG("BaseController:: vel: %f", vel_mag);
@@ -199,27 +199,27 @@
new_cmd_available_ = true;
}
-robot_msgs::PoseDot Pr2BaseController::interpolateCommand(robot_msgs::PoseDot start, robot_msgs::PoseDot end, geometry_msgs::Twist max_rate, double dT)
+geometry_msgs::Twist Pr2BaseController::interpolateCommand(geometry_msgs::Twist start, geometry_msgs::Twist end, geometry_msgs::Twist max_rate, double dT)
{
- robot_msgs::PoseDot result;
+ geometry_msgs::Twist result;
geometry_msgs::Twist alpha;
double delta(0), max_delta(0);
- delta = end.vel.vx - start.vel.vx;
+ delta = end.linear.x - start.linear.x;
max_delta = max_rate.linear.x * dT;
if(fabs(delta) <= max_delta || max_delta < eps_)
alpha.linear.x = 1;
else
alpha.linear.x = max_delta / fabs(delta);
- delta = end.vel.vy - start.vel.vy;
+ delta = end.linear.y - start.linear.y;
max_delta = max_rate.linear.y * dT;
if(fabs(delta) <= max_delta || max_delta < eps_)
alpha.linear.y = 1;
else
alpha.linear.y = max_delta / fabs(delta);
- delta = end.ang_vel.vz - start.ang_vel.vz;
+ delta = end.angular.z - start.angular.z;
max_delta = max_rate.angular.z * dT;
if(fabs(delta) <= max_delta || max_delta < eps_)
alpha.angular.z = 1;
@@ -232,19 +232,19 @@
if(alpha.angular.z < alpha_min)
alpha_min = alpha.angular.z;
- result.vel.vx = start.vel.vx + alpha_min * (end.vel.vx - start.vel.vx);
- result.vel.vy = start.vel.vy + alpha_min * (end.vel.vy - start.vel.vy);
- result.ang_vel.vz = start.ang_vel.vz + alpha_min * (end.ang_vel.vz - start.ang_vel.vz);
+ result.linear.x = start.linear.x + alpha_min * (end.linear.x - start.linear.x);
+ result.linear.y = start.linear.y + alpha_min * (end.linear.y - start.linear.y);
+ result.angular.z = start.angular.z + alpha_min * (end.angular.z - start.angular.z);
return result;
}
-robot_msgs::PoseDot Pr2BaseController::getCommand()// Return the current velocity command
+geometry_msgs::Twist Pr2BaseController::getCommand()// Return the current velocity command
{
- robot_msgs::PoseDot cmd_vel;
+ geometry_msgs::Twist cmd_vel;
pthread_mutex_lock(&pr2_base_controller_lock_);
- cmd_vel.vel.vx = cmd_vel_.vel.vx;
- cmd_vel.vel.vy = cmd_vel_.vel.vy;
- cmd_vel.ang_vel.vz = cmd_vel_.ang_vel.vz;
+ cmd_vel.linear.x = cmd_vel_.linear.x;
+ cmd_vel.linear.y = cmd_vel_.linear.y;
+ cmd_vel.angular.z = cmd_vel_.angular.z;
pthread_mutex_unlock(&pr2_base_controller_lock_);
return cmd_vel;
}
@@ -283,9 +283,9 @@
{
if(pthread_mutex_trylock(&pr2_base_controller_lock_) == 0)
{
- desired_vel_.vel.vx = cmd_vel_t_.vel.vx;
- desired_vel_.vel.vy = cmd_vel_t_.vel.vy;
- desired_vel_.ang_vel.vz = cmd_vel_t_.ang_vel.vz;
+ desired_vel_.linear.x = cmd_vel_t_.linear.x;
+ desired_vel_.linear.y = cmd_vel_t_.linear.y;
+ desired_vel_.angular.z = cmd_vel_t_.angular.z;
new_cmd_available_ = false;
pthread_mutex_unlock(&pr2_base_controller_lock_);
}
@@ -293,9 +293,9 @@
if((current_time - cmd_received_timestamp_) > timeout_)
{
- cmd_vel_.vel.vx = 0;
- cmd_vel_.vel.vy = 0;
- cmd_vel_.ang_vel.vz = 0;
+ cmd_vel_.linear.x = 0;
+ cmd_vel_.linear.y = 0;
+ cmd_vel_.angular.z = 0;
}
else
cmd_vel_ = interpolateCommand(cmd_vel_, desired_vel_, max_accel_, dT);
@@ -323,9 +323,9 @@
}
if(state_publisher_->trylock())
{
- state_publisher_->msg_.command_vx = cmd_vel_.vel.vx;
- state_publisher_->msg_.command_vy = cmd_vel_.vel.vy;
- state_publisher_->msg_.command_vw = cmd_vel_.ang_vel.vz;
+ state_publisher_->msg_.command_vx = cmd_vel_.linear.x;
+ state_publisher_->msg_.command_vy = cmd_vel_.linear.y;
+ state_publisher_->msg_.command_vw = cmd_vel_.angular.z;
for(int i = 0; i < base_kin_.num_casters_; i++)
{
state_publisher_->msg_.joint_speed[i] = base_kin_.caster_[i].caster_speed_;
@@ -368,21 +368,21 @@
void Pr2BaseController::computeDesiredCasterSteer()
{
- robot_msgs::PoseDot result;
+ geometry_msgs::Twist result;
double steer_angle_desired(0.0), steer_angle_desired_m_pi(0.0);
double error_steer(0.0), error_steer_m_pi(0.0);
- double trans_vel = sqrt(cmd_vel_.vel.vx * cmd_vel_.vel.vx + cmd_vel_.vel.vy * cmd_vel_.vel.vy);
+ double trans_vel = sqrt(cmd_vel_.linear.x * cmd_vel_.linear.x + cmd_vel_.linear.y * cmd_vel_.linear.y);
for(int i = 0; i < base_kin_.num_casters_; i++)
{
result = base_kin_.pointVel2D(base_kin_.caster_[i].offset_, cmd_vel_);
- if(trans_vel < cmd_vel_trans_eps_ && fabs(cmd_vel_.ang_vel.vz) < cmd_vel_rot_eps_)
+ if(trans_vel < cmd_vel_trans_eps_ && fabs(cmd_vel_.angular.z) < cmd_vel_rot_eps_)
{
steer_angle_desired = base_kin_.caster_[i].steer_angle_stored_;
}
else
{
- steer_angle_desired = atan2(result.vel.vy, result.vel.vx);
+ steer_angle_desired = atan2(result.linear.y, result.linear.x);
base_kin_.caster_[i].steer_angle_stored_ = steer_angle_desired;
}
steer_angle_desired_m_pi = angles::normalize_angle(steer_angle_desired + M_PI);
@@ -409,20 +409,20 @@
void Pr2BaseController::computeDesiredWheelSpeeds()
{
- robot_msgs::PoseDot wheel_point_velocity;
- robot_msgs::PoseDot wheel_point_velocity_projected;
- robot_msgs::PoseDot wheel_caster_steer_component;
- robot_msgs::PoseDot caster_2d_velocity;
+ geometry_msgs::Twist wheel_point_velocity;
+ geometry_msgs::Twist wheel_point_velocity_projected;
+ geometry_msgs::Twist wheel_caster_steer_component;
+ geometry_msgs::Twist caster_2d_velocity;
- caster_2d_velocity.vel.vx = 0;
- caster_2d_velocity.vel.vy = 0;
- caster_2d_velocity.ang_vel.vz = 0;
+ caster_2d_velocity.linear.x = 0;
+ caster_2d_velocity.linear.y = 0;
+ caster_2d_velocity.angular.z = 0;
double steer_angle_actual = 0;
for(int i = 0; i < (int) base_kin_.num_wheels_; i++)
{
base_kin_.wheel_[i].updatePosition();
- caster_2d_velocity.ang_vel.vz = kp_wheel_steer_ * base_kin_.wheel_[i].parent_->steer_velocity_desired_;
+ caster_2d_velocity.angular.z = kp_wheel_steer_ * base_kin_.wheel_[i].parent_->steer_velocity_desired_;
steer_angle_actual = base_kin_.wheel_[i].parent_->joint_->position_;
wheel_point_velocity = base_kin_.pointVel2D(base_kin_.wheel_[i].position_, cmd_vel_);
wheel_caster_steer_component = base_kin_.pointVel2D(base_kin_.wheel_[i].offset_, caster_2d_velocity);
@@ -430,9 +430,9 @@
double costh = cos(-steer_angle_actual);
double sinth = sin(-steer_angle_actual);
- wheel_point_velocity_projected.vel.vx = costh * wheel_point_velocity.vel.vx - sinth * wheel_point_velocity.vel.vy;
- wheel_point_velocity_projected.vel.vy = sinth * wheel_point_velocity.vel.vx + costh * wheel_point_velocity.vel.vy;
- base_kin_.wheel_[i].wheel_speed_cmd_ = (wheel_point_velocity_projected.vel.vx + wheel_caster_steer_component.vel.vx) / (base_kin_.wheel_radius_ * base_kin_.wheel_[i].wheel_radius_scaler_);
+ wheel_point_velocity_projected.linear.x = costh * wheel_point_velocity.linear.x - sinth * wheel_point_velocity.linear.y;
+ wheel_point_velocity_projected.linear.y = sinth * wheel_point_velocity.linear.x + costh * wheel_point_velocity.linear.y;
+ base_kin_.wheel_[i].wheel_speed_cmd_ = (wheel_point_velocity_projected.linear.x + wheel_caster_steer_component.linear.x) / (base_kin_.wheel_radius_ * base_kin_.wheel_[i].wheel_radius_scaler_);
}
}
@@ -486,7 +486,7 @@
}
}
-void Pr2BaseController::CmdBaseVelReceived(const robot_msgs::PoseDotConstPtr& msg)
+void Pr2BaseController::CmdBaseVelReceived(const geometry_msgs::TwistConstPtr& msg)
{
pthread_mutex_lock(&pr2_base_controller_lock_);
base_vel_msg_ = *msg;
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/src/pr2_odometry.cpp
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/src/pr2_odometry.cpp 2009-08-07 21:20:03 UTC (rev 21048)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/src/pr2_odometry.cpp 2009-08-07 21:22:37 UTC (rev 21049)
@@ -43,7 +43,6 @@
Pr2Odometry::Pr2Odometry()
{
odometry_publisher_ = NULL;
- old_odometry_publisher_ = NULL;
transform_publisher_ = NULL;
}
@@ -54,11 +53,6 @@
odometry_publisher_->stop();
delete odometry_publisher_;
}
- if(old_odometry_publisher_)
- {
- old_odometry_publisher_->stop();
- delete old_odometry_publisher_;
- }
if(transform_publisher_)
{
@@ -99,10 +93,7 @@
if(odometry_publisher_ != NULL)// Make sure that we don't memory leak if initXml gets called twice
delete odometry_publisher_;
- odometry_publisher_ = new realtime_tools::RealtimePublisher<pr2_msgs::Odometry>("/base/" + odom_frame_, 1);
- if(old_odometry_publisher_ != NULL)// Make sure that we don't memory leak if initXml gets called twice
- delete old_odometry_publisher_;
- old_odometry_publisher_ = new realtime_tools::RealtimePublisher<deprecated_msgs::RobotBase2DOdom>("odom", 1);
+ odometry_publisher_ = new realtime_tools::RealtimePublisher<nav_msgs::Odometry>("/base/" + odom_frame_, 1);
if(transform_publisher_ != NULL)// Make sure that we don't memory leak if initXml gets called twice
delete transform_publisher_;
transform_publisher_ = new realtime_tools::RealtimePublisher<tf::tfMessage>("tf_message", 1);
@@ -141,9 +132,9 @@
computeBaseVelocity();
- double odom_delta_x = (odom_vel_.vel.vx * costh - odom_vel_.vel.vy * sinth) * dt;
- double odom_delta_y = (odom_vel_.vel.vx * sinth + odom_vel_.vel.vy * costh) * dt;
- double odom_delta_th = odom_vel_.ang_vel.vz * dt;
+ double odom_delta_x = (odom_vel_.linear.x * costh - odom_vel_.linear.y * sinth) * dt;
+ double odom_delta_y = (odom_vel_.linear.x * sinth + odom_vel_.linear.y * costh) * dt;
+ double odom_delta_th = odom_vel_.angular.z * dt;
odom_.x += odom_delta_x;
odom_.y += odom_delta_y;
@@ -153,47 +144,32 @@
odometer_angle_ += fabs(odom_delta_th);
}
-void Pr2Odometry::getOdometry(geometry_msgs::Point &odom, robot_msgs::PoseDot &odom_vel)
+void Pr2Odometry::getOdometry(geometry_msgs::Point &odom, geometry_msgs::Twist &odom_vel)
{
odom = odom_;
odom_vel = odom_vel_;
return;
}
-void Pr2Odometry::getOdometryMessage(pr2_msgs::Odometry &msg)
+void Pr2Odometry::getOdometryMessage(nav_msgs::Odometry &msg)
{
msg.header.frame_id = odom_frame_;
msg.header.stamp.fromSec(current_time_);
- ms...
[truncated message content] |
|
From: <jfa...@us...> - 2009-08-07 22:13:43
|
Revision: 21050
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21050&view=rev
Author: jfaustwg
Date: 2009-08-07 21:24:30 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
PointCloud:
* pts -> points
* chan -> channels
ChannelFloat32:
* vals -> values
Modified Paths:
--------------
pkg/trunk/calibration/kinematic_calibration/src/laser_head_grabber.cpp
pkg/trunk/calibration/kinematic_calibration/src/sensor_kinematics_grabber.cpp
pkg/trunk/calibration/laser_cb_processing/src/laser_cb_processing.cpp
pkg/trunk/calibration/laser_cb_processing/src/pr2_tilt_laser_projector.cpp
pkg/trunk/drivers/simulator/gazebo_plugin/src/ros_block_laser.cpp
pkg/trunk/highlevel/doors/doors_core/src/action_detect_door.cpp
pkg/trunk/highlevel/doors/doors_core/src/action_detect_handle.cpp
pkg/trunk/highlevel/doors/doors_core/src/action_detect_handle_no_camera.cpp
pkg/trunk/highlevel/writing/writing_core/src/whiteboard_detector.cpp
pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/generic_map_base_assembler_srv.h
pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/map_base_assembler_srv.h
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_map_lib.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotated_planar_patch_map_builder.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_pcd_via_service.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_planar_patch_map.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/annotation2d_lifter_to_tagged_patch_map_via_service.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/binding.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/empty_annotated_map.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/pcd_assembler_srv.cpp
pkg/trunk/mapping/annotated_planar_patch_map/src/projection.cpp
pkg/trunk/mapping/collision_map/src/collision_map.cpp
pkg/trunk/mapping/collision_map/src/collision_map_buffer.cpp
pkg/trunk/mapping/collision_map/src/collision_map_occ.cpp
pkg/trunk/mapping/collision_map/src/collision_map_self_occ.cpp
pkg/trunk/mapping/door_stereo_detector/src/door_stereo_detector.cpp
pkg/trunk/mapping/door_tracker/src/door_tracker.cpp
pkg/trunk/mapping/hallway_tracker/src/hallway_tracker.cpp
pkg/trunk/mapping/planar_patch_map/src/planar_patch_map.cpp
pkg/trunk/mapping/planar_patch_map/src/planar_patch_map_omp.cpp
pkg/trunk/mapping/stereo_convex_patch_histogram/src/convex_patch_histogram.cpp
pkg/trunk/mapping/table_object_detector/src/table_object_detector.cpp
pkg/trunk/motion_planning/plan_ompl_path/src/plan_kinematic_path.cpp
pkg/trunk/motion_planning/plan_ompl_path/src/right_arm/execute_replan_to_state.cpp
pkg/trunk/motion_planning/planning_environment/src/tools/clear_known_objects.cpp
pkg/trunk/motion_planning/planning_research/sbpl_arm_planner_node/src/sbpl_arm_planner_node.cpp
pkg/trunk/nav/visual_nav/src/ros_visual_nav.cpp
pkg/trunk/nav/wavefront/src/wavefront_node.cpp
pkg/trunk/sandbox/descriptors_3d/examples/interest_point_example.cpp
pkg/trunk/sandbox/descriptors_3d/src/bounding_box_raw.cpp
pkg/trunk/sandbox/descriptors_3d/src/bounding_box_spectral.cpp
pkg/trunk/sandbox/descriptors_3d/src/spin_image_generic.cpp
pkg/trunk/sandbox/functional_m3n/examples/classify_m3n.cpp
pkg/trunk/sandbox/functional_m3n/examples/train_m3n.cpp
pkg/trunk/sandbox/functional_m3n/src/example/pt_cloud_rf_creator.cpp
pkg/trunk/sandbox/functional_m3n_ros/src/m3n_learning_node.cpp
pkg/trunk/sandbox/functional_m3n_ros/src/m3n_prediction_node.cpp
pkg/trunk/sandbox/functional_m3n_ros/src/random_field_creator.cpp
pkg/trunk/sandbox/labeled_object_detector/src/pcd_misc.cpp
pkg/trunk/sandbox/labeled_object_detector/src/planar_object_detector.cpp
pkg/trunk/sandbox/labeled_object_detector/src/segment_objects.cpp
pkg/trunk/sandbox/labeled_object_detector/test/test_pcd_segmentation.cpp
pkg/trunk/sandbox/pcd_novelty/src/novelty_estimator.cpp
pkg/trunk/sandbox/pcd_novelty/src/novelty_estimator_node.cpp
pkg/trunk/sandbox/pcd_novelty/test/test_novelty_estimator.cpp
pkg/trunk/sandbox/person_follower/src/follower.cpp
pkg/trunk/sandbox/planar_objects/src/box_detector.cpp
pkg/trunk/sandbox/planar_objects/src/cornercandidate.cpp
pkg/trunk/sandbox/planar_objects/src/find_planes.cpp
pkg/trunk/sandbox/planar_objects/src/rectangular_fit.cpp
pkg/trunk/sandbox/planar_objects/src/vis_utils.cpp
pkg/trunk/sandbox/point_cloud_clustering/src/kmeans.cpp
pkg/trunk/sandbox/point_cloud_clustering/src/pairwise_neighbors.cpp
pkg/trunk/sandbox/point_cloud_clustering/src/point_cloud_clustering.cpp
pkg/trunk/sandbox/point_cloud_tutorials/src/planar_fit.cpp
pkg/trunk/sandbox/point_cloud_tutorials/src/plane_fit.cpp
pkg/trunk/sandbox/rf_detector/src/ObjectInPerspective.cpp
pkg/trunk/sandbox/test_arm_vision_calibration/src/test_arm_vision_calibration.cpp
pkg/trunk/sandbox/test_arm_vision_calibration/src/test_arm_vision_callibration.cpp
pkg/trunk/sandbox/voxel3d/src/voxel3d.cpp
pkg/trunk/sandbox/voxel3d/src/voxel_node.cpp
pkg/trunk/stacks/common/laser_scan/include/laser_scan/footprint_filter.h
pkg/trunk/stacks/common/laser_scan/include/laser_scan/point_cloud_footprint_filter.h
pkg/trunk/stacks/common/laser_scan/src/laser_processor.cpp
pkg/trunk/stacks/common/laser_scan/src/laser_scan.cc
pkg/trunk/stacks/common/laser_scan/src/scan_shadows_filter.cpp
pkg/trunk/stacks/common/laser_scan/src/scan_to_cloud.cpp
pkg/trunk/stacks/common/laser_scan/test/projection_test.cpp
pkg/trunk/stacks/common_msgs/sensor_msgs/msg/ChannelFloat32.msg
pkg/trunk/stacks/common_msgs/sensor_msgs/msg/PointCloud.msg
pkg/trunk/stacks/geometry/tf/src/transform_listener.cpp
pkg/trunk/stacks/laser_drivers/point_cloud_assembler/include/point_cloud_assembler/base_assembler_srv.h
pkg/trunk/stacks/laser_drivers/point_cloud_assembler/src/grab_cloud_data.cpp
pkg/trunk/stacks/laser_drivers/point_cloud_assembler/src/merge_clouds.cpp
pkg/trunk/stacks/laser_drivers/point_cloud_assembler/src/point_cloud_assembler_srv.cpp
pkg/trunk/stacks/laser_drivers/point_cloud_assembler/src/point_cloud_snapshotter.cpp
pkg/trunk/stacks/laser_drivers/point_cloud_assembler/src/point_cloud_srv.cpp
pkg/trunk/stacks/laser_drivers/point_cloud_assembler/test/test_assembler.cpp
pkg/trunk/stacks/navigation/base_local_planner/src/point_grid.cpp
pkg/trunk/stacks/navigation/base_local_planner/src/voxel_grid_model.cpp
pkg/trunk/stacks/navigation/costmap_2d/src/costmap_2d.cpp
pkg/trunk/stacks/navigation/costmap_2d/src/costmap_2d_cloud.cpp
pkg/trunk/stacks/navigation/costmap_2d/src/observation_buffer.cpp
pkg/trunk/stacks/navigation/costmap_2d/src/voxel_costmap_2d.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/scripts/point_cloud_cropper.py
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/doors_detector.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/geometric_helper.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/handle_detector.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/src/handle_detector_vision.cpp
pkg/trunk/stacks/semantic_mapping/door_handle_detector/test/point_cloud_cropper.cpp
pkg/trunk/stacks/semantic_mapping/plug_onbase_detector/include/plug_onbase_detector/plug_onbase_detector.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/cloud_io.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/nearest.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/point.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/projections.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/geometry/statistics.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/kdtree/kdtree_ann.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/sample_consensus/sac.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/include/point_cloud_mapping/sample_consensus/sac_model.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_downsampler.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_geometry/areas.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_geometry/nearest.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_geometry/point.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_geometry/statistics.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/misc.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/read.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/bag_to_pcd.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/cloudmsg_to_screen.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/convert_pcd_ascii_binary.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/tools/pcd_to_msg.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_io/write.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_kdtree/kdtree_ann.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/cloud_kdtree/kdtree_flann.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/normal_estimation_in_proc.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/organized_normal_estimation.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/planar_fit.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/sample_consensus/sac.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/sample_consensus/sac_model_circle.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/sample_consensus/sac_model_cylinder.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/sample_consensus/sac_model_line.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/sample_consensus/sac_model_oriented_line.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/sample_consensus/sac_model_oriented_plane.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/sample_consensus/sac_model_parallel_lines.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/sample_consensus/sac_model_plane.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/src/sample_consensus/sac_model_sphere.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/cloud_geometry/test_geometry_statistics.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/cloud_io/test_io.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/cloud_kdtree/bunny_model.h
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/cloud_kdtree/test_kdtree.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/sample_consensus/test_circle_fit.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/sample_consensus/test_cylinder_fit.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/sample_consensus/test_line_fit.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/sample_consensus/test_plane_fit.cpp
pkg/trunk/stacks/semantic_mapping/point_cloud_mapping/test/sample_consensus/test_sphere_fit.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_ground_removal.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/sac_inc_ground_removal.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/semantic_point_annotator.cpp
pkg/trunk/stacks/semantic_mapping/semantic_point_annotator/src/semantic_point_annotator_omp.cpp
pkg/trunk/stacks/sound_drivers/sound_play/scripts/soundplay_node.py
pkg/trunk/stacks/stereo/stereo_image_proc/src/stereoproc.cpp
pkg/trunk/stacks/visual_feature_detectors/outlet_detection/src/outlet_spotting.cpp
pkg/trunk/stacks/visual_feature_detectors/outlet_detection/src/outlet_spotting2.cpp
pkg/trunk/stacks/visual_feature_detectors/outlet_detection/src/outlet_util.cpp
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/point_cloud_base.cpp
pkg/trunk/stacks/visualization/rviz/src/rviz/displays/point_cloud_base.h
pkg/trunk/stacks/visualization/rviz/src/test/cloud_test.cpp
pkg/trunk/stacks/world_models/topological_map/src/visualization.cpp
pkg/trunk/util/or_robot_self_filter/src/robotlinks_filter_node.cpp
pkg/trunk/util/prosilica_capture_rectified/src/prosilica_capture.cpp
pkg/trunk/util/robot_self_filter/include/robot_self_filter/self_see_filter.h
pkg/trunk/util/robot_self_filter/src/draw_rays.cpp
pkg/trunk/util/robot_self_filter/src/self_filter.cpp
pkg/trunk/util/robot_self_filter/src/self_mask.cpp
pkg/trunk/util/robot_self_filter/src/test_filter.cpp
pkg/trunk/vision/calib_converter/src/calib_converter.cpp
pkg/trunk/vision/cv_mech_turk/src/annotation_to_data_sync.py
pkg/trunk/vision/people/src/face_detection.cpp
pkg/trunk/vision/people/src/filter/mcpdf_pos_vel.cpp
pkg/trunk/vision/people/src/filter/mcpdf_vector.cpp
pkg/trunk/vision/people/src/filter/people_tracking_node.cpp
pkg/trunk/vision/people/src/leg_detector.cpp
pkg/trunk/vision/people/src/people_follower.cpp
pkg/trunk/vision/people/src/stereo_face_feature_tracker.py
pkg/trunk/vision/recognition_lambertian/src/model_fitter.cpp
pkg/trunk/vision/recognition_lambertian/src/plane_fit.cpp
pkg/trunk/vision/recognition_lambertian/src/publish_scene.cpp
pkg/trunk/vision/recognition_lambertian/src/rec_lam_normal_features.cpp
pkg/trunk/vision/recognition_lambertian/src/recognition_lambertian.cpp
pkg/trunk/vision/recognition_lambertian/src/visualization.cpp
pkg/trunk/vision/recognition_lambertian/src/voxel_grid.py
pkg/trunk/vision/spacetime_stereo/sts_dynamic.cpp
pkg/trunk/vision/spacetime_stereo/sts_node.cpp
pkg/trunk/vision/stereo_capture/src/stereo_capture.cpp
pkg/trunk/vision/stereo_checkerboard_detector/src/checkerboard_corners_node.cpp
pkg/trunk/vision/stereo_checkerboard_detector/src/image_pc_debugger.cpp
pkg/trunk/vision/stereo_checkerboard_detector/src/stereo_checkerboard_node.cpp
Modified: pkg/trunk/calibration/kinematic_calibration/src/laser_head_grabber.cpp
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/src/laser_head_grabber.cpp 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/calibration/kinematic_calibration/src/laser_head_grabber.cpp 2009-08-07 21:24:30 UTC (rev 21050)
@@ -321,12 +321,12 @@
// Build Laser Measurement Vector (Tilt angle, pointing angle, dist)
SensorSample laser_sample ;
- laser_sample.m.resize(safe_laser_measurement_.pts.size()*3) ;
- for(unsigned int i=0; i<safe_laser_measurement_.pts.size(); i++)
+ laser_sample.m.resize(safe_laser_measurement_.points.size()*3) ;
+ for(unsigned int i=0; i<safe_laser_measurement_.points.size(); i++)
{
- laser_sample.m[3*i+0] = safe_laser_measurement_.pts[i].x ;
- laser_sample.m[3*i+1] = safe_laser_measurement_.pts[i].y ;
- laser_sample.m[3*i+2] = safe_laser_measurement_.pts[i].z ;
+ laser_sample.m[3*i+0] = safe_laser_measurement_.points[i].x ;
+ laser_sample.m[3*i+1] = safe_laser_measurement_.points[i].y ;
+ laser_sample.m[3*i+2] = safe_laser_measurement_.points[i].z ;
}
laser_sample.sensor = "tilt_laser" ;
laser_sample.target = "6x8_cb" ;
@@ -382,11 +382,11 @@
SensorSample sample ;
sample.sensor = sensor ;
sample.target = target ;
- sample.m.resize(2*corners.pts.size()) ;
- for(unsigned int i=0; i<corners.pts.size(); i++)
+ sample.m.resize(2*corners.points.size()) ;
+ for(unsigned int i=0; i<corners.points.size(); i++)
{
- sample.m[2*i+0] = corners.pts[i].x ;
- sample.m[2*i+1] = corners.pts[i].y ;
+ sample.m[2*i+0] = corners.points[i].x ;
+ sample.m[2*i+1] = corners.points[i].y ;
}
return sample ;
}
Modified: pkg/trunk/calibration/kinematic_calibration/src/sensor_kinematics_grabber.cpp
===================================================================
--- pkg/trunk/calibration/kinematic_calibration/src/sensor_kinematics_grabber.cpp 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/calibration/kinematic_calibration/src/sensor_kinematics_grabber.cpp 2009-08-07 21:24:30 UTC (rev 21050)
@@ -287,7 +287,7 @@
printf(" Mechanism State: %lf %u Joints\n", lag.toSec(), data.mechanism_state.get_joint_states_size()) ;
lag = data.laser_cloud.header.stamp-cur_time ;
- printf(" Laser Cloud: %lf %u points\n", lag.toSec(), data.laser_cloud.get_pts_size() ) ;
+ printf(" Laser Cloud: %lf %u points\n", lag.toSec(), data.laser_cloud.get_points_size() ) ;
lag = data.mocap_snapshot.header.stamp-cur_time ;
printf(" MoCap: %lf %u Markers | %u Bodies\n", lag.toSec(), data.mocap_snapshot.get_markers_size(),
Modified: pkg/trunk/calibration/laser_cb_processing/src/laser_cb_processing.cpp
===================================================================
--- pkg/trunk/calibration/laser_cb_processing/src/laser_cb_processing.cpp 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/calibration/laser_cb_processing/src/laser_cb_processing.cpp 2009-08-07 21:24:30 UTC (rev 21050)
@@ -87,11 +87,11 @@
{
ROS_INFO("%f - Callback", t.toSec());
- unsigned int C = pixel_corners_.pts.size() ;
+ unsigned int C = pixel_corners_.points.size() ;
sensor_msgs::PointCloud measured_corners;
measured_corners.header.stamp = pixel_corners_.header.stamp ;
measured_corners.header.frame_id = "NOT_APPLICABLE" ;
- measured_corners.pts.resize(C);
+ measured_corners.points.resize(C);
if (C > 0)
{
@@ -122,8 +122,8 @@
for (unsigned int i = 0; i < C; i++)
{
- corners_pix_x[i] = pixel_corners_.pts[i].x;
- corners_pix_y[i] = pixel_corners_.pts[i].y;
+ corners_pix_x[i] = pixel_corners_.points[i].x;
+ corners_pix_y[i] = pixel_corners_.points[i].y;
}
float x_scale = (float)(joint_info_.data.layout.dim[1].size - 1)
@@ -150,11 +150,11 @@
for (unsigned int i = 0; i < C; i++)
{
// Tilt angle
- measured_corners.pts[i].x = corners_joint[i];
+ measured_corners.points[i].x = corners_joint[i];
// Pointing angle
- measured_corners.pts[i].y = pointingAngle(scan_info_, pixel_corners_.pts[i].x);
+ measured_corners.points[i].y = pointingAngle(scan_info_, pixel_corners_.points[i].x);
// Range
- measured_corners.pts[i].z = corners_range[i];
+ measured_corners.points[i].z = corners_range[i];
}
}
Modified: pkg/trunk/calibration/laser_cb_processing/src/pr2_tilt_laser_projector.cpp
===================================================================
--- pkg/trunk/calibration/laser_cb_processing/src/pr2_tilt_laser_projector.cpp 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/calibration/laser_cb_processing/src/pr2_tilt_laser_projector.cpp 2009-08-07 21:24:30 UTC (rev 21050)
@@ -133,9 +133,9 @@
void callback()
{
- unsigned int C = in_.pts.size() ;
+ unsigned int C = in_.points.size() ;
sensor_msgs::PointCloud cloud_out ;
- cloud_out.pts.resize(C) ;
+ cloud_out.points.resize(C) ;
KDL::ChainFkSolverPos_recursive solver(chain_) ;
KDL::Frame loc ;
@@ -144,13 +144,13 @@
for (unsigned int i=0; i<C; i++)
{
- joint_vals(0) = in_.pts[i].x ;
- joint_vals(1) = in_.pts[i].y ;
- joint_vals(2) = in_.pts[i].z ;
+ joint_vals(0) = in_.points[i].x ;
+ joint_vals(1) = in_.points[i].y ;
+ joint_vals(2) = in_.points[i].z ;
solver.JntToCart(joint_vals, loc) ;
- cloud_out.pts[i].x = loc.p.x() ;
- cloud_out.pts[i].y = loc.p.y() ;
- cloud_out.pts[i].z = loc.p.z() ;
+ cloud_out.points[i].x = loc.p.x() ;
+ cloud_out.points[i].y = loc.p.y() ;
+ cloud_out.points[i].z = loc.p.z() ;
}
cloud_out.header.stamp = in_.header.stamp ;
cloud_out.header.frame_id = "torso_lift_link" ;
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/src/ros_block_laser.cpp
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/src/ros_block_laser.cpp 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/src/ros_block_laser.cpp 2009-08-07 21:24:30 UTC (rev 21050)
@@ -90,9 +90,9 @@
Angle verticalMinAngle = this->myParent->GetVerticalMinAngle();
int r_size = rangeCount * verticalRangeCount;
- this->cloudMsg.set_pts_size(r_size);
- this->cloudMsg.set_chan_size(1);
- this->cloudMsg.chan[0].set_vals_size(r_size);
+ this->cloudMsg.set_points_size(r_size);
+ this->cloudMsg.set_channels_size(1);
+ this->cloudMsg.channels[0].set_values_size(r_size);
}
@@ -146,9 +146,9 @@
// set size of cloud message everytime!
int r_size = rangeCount * verticalRangeCount;
- this->cloudMsg.set_pts_size(r_size);
- this->cloudMsg.set_chan_size(1);
- this->cloudMsg.chan[0].set_vals_size(r_size);
+ this->cloudMsg.set_points_size(r_size);
+ this->cloudMsg.set_channels_size(1);
+ this->cloudMsg.channels[0].set_values_size(r_size);
/***************************************************************/
/* */
@@ -222,17 +222,17 @@
if (r == maxRange - minRange)
{
// no noise if at max range
- this->cloudMsg.pts[n].x = (r+minRange) * cos(pAngle)*cos(yAngle);
- this->cloudMsg.pts[n].y = (r+minRange) * sin(yAngle);
- this->cloudMsg.pts[n].z = (r+minRange) * sin(pAngle)*cos(yAngle);
+ this->cloudMsg.points[n].x = (r+minRange) * cos(pAngle)*cos(yAngle);
+ this->cloudMsg.points[n].y = (r+minRange) * sin(yAngle);
+ this->cloudMsg.points[n].z = (r+minRange) * sin(pAngle)*cos(yAngle);
}
else
{
- this->cloudMsg.pts[n].x = (r+minRange) * cos(pAngle)*cos(yAngle) + this->GaussianKernel(0,this->gaussianNoise) ;
- this->cloudMsg.pts[n].y = (r+minRange) * sin(yAngle) + this->GaussianKernel(0,this->gaussianNoise) ;
- this->cloudMsg.pts[n].z = (r+minRange) * sin(pAngle)*cos(yAngle) + this->GaussianKernel(0,this->gaussianNoise) ;
+ this->cloudMsg.points[n].x = (r+minRange) * cos(pAngle)*cos(yAngle) + this->GaussianKernel(0,this->gaussianNoise) ;
+ this->cloudMsg.points[n].y = (r+minRange) * sin(yAngle) + this->GaussianKernel(0,this->gaussianNoise) ;
+ this->cloudMsg.points[n].z = (r+minRange) * sin(pAngle)*cos(yAngle) + this->GaussianKernel(0,this->gaussianNoise) ;
}
- this->cloudMsg.chan[0].vals[n] = intensity + this->GaussianKernel(0,this->gaussianNoise) ;
+ this->cloudMsg.channels[0].values[n] = intensity + this->GaussianKernel(0,this->gaussianNoise) ;
}
}
Modified: pkg/trunk/highlevel/doors/doors_core/src/action_detect_door.cpp
===================================================================
--- pkg/trunk/highlevel/doors/doors_core/src/action_detect_door.cpp 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/highlevel/doors/doors_core/src/action_detect_door.cpp 2009-08-07 21:24:30 UTC (rev 21050)
@@ -148,7 +148,7 @@
// detect door
if (isPreemptRequested()) return false;
- ROS_INFO("DetectDoorAction: detect the door in a pointcloud of size %i", res_pointcloud.cloud.pts.size());
+ ROS_INFO("DetectDoorAction: detect the door in a pointcloud of size %i", res_pointcloud.cloud.points.size());
door_handle_detector::DoorsDetectorCloud::Request req_doordetect;
door_handle_detector::DoorsDetectorCloud::Response res_doordetect;
req_doordetect.door = door_in;
Modified: pkg/trunk/highlevel/doors/doors_core/src/action_detect_handle.cpp
===================================================================
--- pkg/trunk/highlevel/doors/doors_core/src/action_detect_handle.cpp 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/highlevel/doors/doors_core/src/action_detect_handle.cpp 2009-08-07 21:24:30 UTC (rev 21050)
@@ -235,7 +235,7 @@
// detect handle
if (isPreemptRequested()) return false;
- ROS_INFO("start detecting the handle using the laser, in a pointcloud of size %i", res_pointcloud.cloud.pts.size());
+ ROS_INFO("start detecting the handle using the laser, in a pointcloud of size %i", res_pointcloud.cloud.points.size());
door_handle_detector::DoorsDetectorCloud::Request req_handledetect;
door_handle_detector::DoorsDetectorCloud::Response res_handledetect;
req_handledetect.door = door_in;
Modified: pkg/trunk/highlevel/doors/doors_core/src/action_detect_handle_no_camera.cpp
===================================================================
--- pkg/trunk/highlevel/doors/doors_core/src/action_detect_handle_no_camera.cpp 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/highlevel/doors/doors_core/src/action_detect_handle_no_camera.cpp 2009-08-07 21:24:30 UTC (rev 21050)
@@ -203,7 +203,7 @@
// detect handle
if (isPreemptRequested()) return false;
- ROS_INFO("start detecting the handle using the laser, in a pointcloud of size %i", res_pointcloud.cloud.pts.size());
+ ROS_INFO("start detecting the handle using the laser, in a pointcloud of size %i", res_pointcloud.cloud.points.size());
door_handle_detector::DoorsDetectorCloud::Request req_handledetect;
door_handle_detector::DoorsDetectorCloud::Response res_handledetect;
req_handledetect.door = door_in;
Modified: pkg/trunk/highlevel/writing/writing_core/src/whiteboard_detector.cpp
===================================================================
--- pkg/trunk/highlevel/writing/writing_core/src/whiteboard_detector.cpp 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/highlevel/writing/writing_core/src/whiteboard_detector.cpp 2009-08-07 21:24:30 UTC (rev 21050)
@@ -96,16 +96,16 @@
out.header.stamp = in.header.stamp;
out.header.frame_id = in.header.frame_id;
- out.chan.resize(in.chan.size());
- for (size_t c=0;c<in.chan.size();++c) {
- out.chan[c].name = in.chan[c].name;
+ out.channels.resize(in.channels.size());
+ for (size_t c=0;c<in.channels.size();++c) {
+ out.channels[c].name = in.channels[c].name;
}
- for (size_t i=0;i<in.get_pts_size();++i) {
- if (in.pts[i].z>min_height_) {
- out.pts.push_back(in.pts[i]);
- for (size_t c=0;c<in.chan.size();++c) {
- out.chan[c].vals.push_back(in.chan[c].vals[i]);
+ for (size_t i=0;i<in.get_points_size();++i) {
+ if (in.points[i].z>min_height_) {
+ out.points.push_back(in.points[i]);
+ for (size_t c=0;c<in.channels.size();++c) {
+ out.channels[c].values.push_back(in.channels[c].values[i]);
}
}
}
@@ -121,8 +121,8 @@
cloud_pub_.publish(cloud);
- vector<int> indices(cloud.get_pts_size());
- for (size_t i=0;i<cloud.get_pts_size();++i) {
+ vector<int> indices(cloud.get_points_size());
+ for (size_t i=0;i<cloud.get_points_size();++i) {
indices[i] = i;
}
geometry_msgs::Point32 viewpoint;
@@ -219,7 +219,7 @@
}
// Flip the plane normal towards the viewpoint
- cloud_geometry::angles::flipNormalTowardsViewpoint (coeff, points.pts.at(inliers[0]), viewpoint);
+ cloud_geometry::angles::flipNormalTowardsViewpoint (coeff, points.points.at(inliers[0]), viewpoint);
ROS_INFO ("Found a planar model supported by %d inliers: [%g, %g, %g, %g]", (int)inliers.size (), coeff[0], coeff[1], coeff[2], coeff[3]);
}
Modified: pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/generic_map_base_assembler_srv.h
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/generic_map_base_assembler_srv.h 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/generic_map_base_assembler_srv.h 2009-08-07 21:24:30 UTC (rev 21050)
@@ -221,11 +221,11 @@
scan_hist_mutex_.lock() ;
if (scan_hist_.size() == max_scans_) // Is our deque full?
{
- //total_pts_ -= scan_hist_.front().get_pts_size() ; // We're removing an elem, so this reduces our total point count
+ //total_pts_ -= scan_hist_.front().get_points_size() ; // We're removing an elem, so this reduces our total point count
scan_hist_.pop_front() ; // The front of the deque has the oldest elem, so we can get rid of it
}
scan_hist_.push_back(cur_cloud) ; // Add the newest scan to the back of the deque
- //total_pts_ += cur_cloud.get_pts_size() ; // Add the new scan to the running total of points
+ //total_pts_ += cur_cloud.get_points_size() ; // Add the new scan to the running total of points
//printf("Scans: %4u Points: %10u\n", scan_hist_.size(), total_pts_) ;
Modified: pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/map_base_assembler_srv.h
===================================================================
--- pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/map_base_assembler_srv.h 2009-08-07 21:22:37 UTC (rev 21049)
+++ pkg/trunk/mapping/annotated_planar_patch_map/include/annotated_planar_patch_map/map_base_assembler_srv.h 2009-08-07 21:24:30 UTC (rev 21050)
@@ -241,11 +241,11 @@
scan_hist_mutex_.lock() ;
if (scan_hist_.size() == max_scans_) // Is ou...
[truncated message content] |
|
From: <jfa...@us...> - 2009-08-07 22:13:50
|
Revision: 21056
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21056&view=rev
Author: jfaustwg
Date: 2009-08-07 21:49:07 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
Move wxpropgrid to visualization stack (#2253)
Added Paths:
-----------
pkg/trunk/stacks/visualization/wxpropgrid/
Removed Paths:
-------------
pkg/trunk/3rdparty/wxpropgrid/
Property changes on: pkg/trunk/stacks/visualization/wxpropgrid
___________________________________________________________________
Added: svn:mergeinfo
+ /pkg/branches/gazebo-branch-merge/3rdparty/wxpropgrid:15683-15684,15739-15794,15797-15820,15822-15839,15852-15870,15983-16008,16010-16016,16129-16141,16145-16169,16245-16262,16274-16334
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hsu...@us...> - 2009-08-07 22:25:48
|
Revision: 21070
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21070&view=rev
Author: hsujohnhsu
Date: 2009-08-07 22:25:37 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
ticket #1316: PoseDot --> Twist for python scripts.
fix from xxx import * convention.
Modified Paths:
--------------
pkg/trunk/audio/backup_safetysound/backingup.py
pkg/trunk/audio/backup_safetysound/manifest.xml
pkg/trunk/demos/door_demos_gazebo/scripts/initialize_nav.py
pkg/trunk/demos/handhold/manifest.xml
pkg/trunk/demos/handhold/src/handhold.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/manifest.xml
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomw_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomx_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxy_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxyw_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomy_gt.py
pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_vw_gt.py
pkg/trunk/highlevel/executive_python/manifest.xml
pkg/trunk/highlevel/executive_python/src/stuck_adapter.py
pkg/trunk/pr2/hot_box_test/base_shuffle.py
pkg/trunk/pr2/hot_box_test/base_swivvel.py
pkg/trunk/pr2/hot_box_test/manifest.xml
pkg/trunk/sandbox/annotated_map_builder/manifest.xml
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/move_head_action2.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/wait_for_k_messages_adapter.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/wait_for_k_messages_adapter2.py
pkg/trunk/sandbox/annotated_map_builder/src/annotated_map_builder/wait_for_multiple_head_configs.py
pkg/trunk/sandbox/annotated_map_builder/test/test_head.py
pkg/trunk/sandbox/annotated_map_builder/test/test_head2.py
pkg/trunk/sandbox/person_follower/src/move_head_action.py
pkg/trunk/sandbox/person_follower/src/wait_for_k_messages_adapter.py
pkg/trunk/sandbox/person_follower/src/wait_for_k_messages_adapter2.py
pkg/trunk/sandbox/person_follower/src/wait_for_multiple_head_configs.py
Modified: pkg/trunk/audio/backup_safetysound/backingup.py
===================================================================
--- pkg/trunk/audio/backup_safetysound/backingup.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/audio/backup_safetysound/backingup.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -3,7 +3,7 @@
import rospy
import threading
-from robot_msgs.msg import PoseDot
+from geometry_msgs.msg import Twist
from sound_play.msg import SoundRequest
import os
@@ -11,7 +11,7 @@
# if robot base receives a command to move backwards in the x-axis,
# then play sound file (TruckBackUp.wav) from Logitech USB speaker (hw:1,0).
-# data is an instance of a PoseDot extracted from the cmd_vel topic.
+# data is an instance of a Twist extracted from the cmd_vel topic.
class backingup:
def start(self):
msg = SoundRequest()
@@ -27,16 +27,16 @@
self.pub.publish(msg)
self.state = self.STOPPED
- def callback(self,data):
+ def callback(self,twist):
self.mutex.acquire()
try:
- if data.vel.vx < 0:
+ if twist.linear.x < 0:
if self.state == self.STOPPED:
self.start()
self.state = self.PLAYING
- if data.vel.vx >= 0 and self.state == self.PLAYING:
+ if twist.linear.x >= 0 and self.state == self.PLAYING:
self.state = self.STOPPING
self.targettime = rospy.get_time() + 0.5
@@ -57,7 +57,7 @@
self.state = self.STOPPED
self.targettime = 0
self.pub = rospy.Publisher('robotsound', SoundRequest)
- rospy.Subscriber("cmd_vel", PoseDot, self.callback)
+ rospy.Subscriber("cmd_vel", Twist, self.callback)
while not rospy.is_shutdown():
self.mutex.acquire()
Modified: pkg/trunk/audio/backup_safetysound/manifest.xml
===================================================================
--- pkg/trunk/audio/backup_safetysound/manifest.xml 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/audio/backup_safetysound/manifest.xml 2009-08-07 22:25:37 UTC (rev 21070)
@@ -5,7 +5,7 @@
<author>Leila Takayama</author>
<license>BSD</license>
<depend package="rospy" />
-<depend package="robot_msgs" />
+<depend package="geometry_msgs" />
<depend package="sound_play" />
</package>
Modified: pkg/trunk/demos/door_demos_gazebo/scripts/initialize_nav.py
===================================================================
--- pkg/trunk/demos/door_demos_gazebo/scripts/initialize_nav.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/demos/door_demos_gazebo/scripts/initialize_nav.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -46,14 +46,15 @@
import sys, unittest
import os, os.path, threading, time
import rospy, rostest
-from std_msgs.msg import *
-from robot_actions.msg import *
-from nav_robot_actions.msg import *
-from robot_msgs.msg import *
-from nav_msgs.msg import *
-from tf.transformations import *
-from numpy import *
+from std_msgs.msg import String
+from nav_robot_actions.msg import MoveBaseState
+from geometry_msgs.msg import Pose,Quaternion,Point, PoseWithRatesStamped, PoseStamped, PoseWithCovariance
+from geometry_msgs.msg import Twist
+from nav_msgs.msg import Odometry
+import tf.transformations as tft
+from numpy import float64
+
FLOAT_TOL = 0.0001
AMCL_TOL = 0.5
COV = [float64(0.5*0.5 ),float64(0),float64(0),float64(0),float64(0),float64(0), \
@@ -188,7 +189,7 @@
def stateInput(self, state):
if self.publish_goal:
- state_eul = euler_from_quaternion([state.goal.pose.orientation.x,state.goal.pose.orientation.y,state.goal.pose.orientation.z,state.goal.pose.orientation.w])
+ state_eul = tft.euler_from_quaternion([state.goal.pose.orientation.x,state.goal.pose.orientation.y,state.goal.pose.orientation.z,state.goal.pose.orientation.w])
print "target: ", self.target_x, ",", self.target_y, ",", self.target_t
print "state.goal: (", state.goal.pose.position.x, ",", state.goal.pose.position.y, ",", state.goal.pose.position.z \
,",", state_eul[0], ",", state_eul[1], ",", state_eul[2] \
@@ -203,7 +204,7 @@
def amclInput(self, amcl_pose):
if self.publish_initialpose:
print "/amcl_pose received, ",amcl_pose
- amcl_eul = euler_from_quaternion([amcl_pose.pose.orientation.x,amcl_pose.pose.orientation.y,amcl_pose.pose.orientation.z,amcl_pose.pose.orientation.w])
+ amcl_eul = tft.euler_from_quaternion([amcl_pose.pose.orientation.x,amcl_pose.pose.orientation.y,amcl_pose.pose.orientation.z,amcl_pose.pose.orientation.w])
if abs(amcl_pose.pose.position.x - self.initialpose[0]) < AMCL_TOL and \
abs(amcl_pose.pose.position.y - self.initialpose[1]) < AMCL_TOL and \
abs(amcl_eul[2] - self.initialpose[2]) < AMCL_TOL:
@@ -212,9 +213,9 @@
else:
print "initial_pose mismatch, continue setPose."
- def cmd_velInput(self, cmd_vel):
- print "cmd_vel: ", cmd_vel.vel.vx, ",", cmd_vel.vel.vy, ",", cmd_vel.vel.vz \
- , cmd_vel.ang_vel.vx, ",", cmd_vel.ang_vel.vy, ",", cmd_vel.ang_vel.vz
+ def cmd_velInput(self, cmd_vel_twist):
+ print "cmd_vel: ", cmd_vel_twist.linear.x, ",", cmd_vel_twist.linear.y, ",", cmd_vel_twist.linear.z \
+ , cmd_vel_twist.angular.x, ",", cmd_vel_twist.angular.y, ",", cmd_vel_twist.angular.z
def init_nav(self):
print "LNK\n"
@@ -230,7 +231,7 @@
rospy.Subscriber("/amcl_pose" , PoseWithCovariance , self.amclInput)
# below only for debugging build 303, base not moving
- rospy.Subscriber("cmd_vel" , PoseDot , self.cmd_velInput)
+ rospy.Subscriber("cmd_vel" , Twist , self.cmd_velInput)
rospy.init_node(NAME, anonymous=True)
@@ -249,7 +250,7 @@
if self.args[i] == '-t':
if len(self.args) > i+1:
self.target_t = float(self.args[i+1])
- self.target_q = quaternion_from_euler(0,0,self.target_t,'rxyz')
+ self.target_q = tft.quaternion_from_euler(0,0,self.target_t,'rxyz')
print "target t set to:",self.target_t
if self.args[i] == '-nav_t_tol':
if len(self.args) > i+1:
@@ -307,7 +308,7 @@
# publish initial pose until /amcl_pose is same as intialpose
if self.publish_initialpose:
p = Point(self.initialpose[0], self.initialpose[1], 0)
- tmpq = quaternion_from_euler(0,0,self.initialpose[2],'rxyz')
+ tmpq = tft.quaternion_from_euler(0,0,self.initialpose[2],'rxyz')
q = Quaternion(tmpq[0],tmpq[1],tmpq[2],tmpq[3])
pose = Pose(p,q)
print "publishing initialpose",h,p,COV[0]
@@ -315,7 +316,7 @@
else:
# send goal until state /move_base/feedback indicates goal is received
p = Point(self.target_x, self.target_y, 0)
- tmpq = quaternion_from_euler(0,0,self.target_t,'rxyz')
+ tmpq = tft.quaternion_from_euler(0,0,self.target_t,'rxyz')
q = Quaternion(tmpq[0],tmpq[1],tmpq[2],tmpq[3])
pose = Pose(p,q)
print "publishing goal",self.publish_goal
@@ -327,27 +328,27 @@
# compute angular error between deltas in odom and p3d
# compute delta in odom from initial pose
print "========================"
- tmpoqi = quaternion_inverse(self.odom_qi)
- odom_q_delta = quaternion_multiply(tmpoqi,self.odom_q)
+ tmpoqi = tft.quaternion_inverse(self.odom_qi)
+ odom_q_delta = tft.quaternion_multiply(tmpoqi,self.odom_q)
print "debug odom_qi:" , self.odom_qi
print "debug tmpoqi:" , tmpoqi
print "debug odom_q_delta:" , odom_q_delta
- print "odom delta:" , euler_from_quaternion(odom_q_delta)
+ print "odom delta:" , tft.euler_from_quaternion(odom_q_delta)
# compute delta in p3d from initial pose
- tmppqi = quaternion_inverse(self.p3d_qi)
- p3d_q_delta = quaternion_multiply(tmppqi,self.p3d_q)
- print "p3d delta:" , euler_from_quaternion(p3d_q_delta)
+ tmppqi = tft.quaternion_inverse(self.p3d_qi)
+ p3d_q_delta = tft.quaternion_multiply(tmppqi,self.p3d_q)
+ print "p3d delta:" , tft.euler_from_quaternion(p3d_q_delta)
# compute delta between odom and p3d
- tmpdqi = quaternion_inverse(p3d_q_delta)
- delta = quaternion_multiply(tmpdqi,odom_q_delta)
- delta_euler = euler_from_quaternion(delta)
+ tmpdqi = tft.quaternion_inverse(p3d_q_delta)
+ delta = tft.quaternion_multiply(tmpdqi,odom_q_delta)
+ delta_euler = tft.euler_from_quaternion(delta)
odom_drift_dyaw = delta_euler[2]
- print "odom drift from p3d:" , euler_from_quaternion(delta)
+ print "odom drift from p3d:" , tft.euler_from_quaternion(delta)
# compute delta between target and p3d
- tmptqi = quaternion_inverse(self.target_q)
- navdq = quaternion_multiply(tmptqi,self.p3d_q)
- navde = euler_from_quaternion(navdq)
+ tmptqi = tft.quaternion_inverse(self.target_q)
+ navdq = tft.quaternion_multiply(tmptqi,self.p3d_q)
+ navde = tft.euler_from_quaternion(navdq)
nav_dyaw = navde[2]
print "nav euler off target:" , navde
Modified: pkg/trunk/demos/handhold/manifest.xml
===================================================================
--- pkg/trunk/demos/handhold/manifest.xml 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/demos/handhold/manifest.xml 2009-08-07 22:25:37 UTC (rev 21070)
@@ -7,6 +7,7 @@
<depend package="roscpp" />
<depend package="tf" />
<depend package="pr2_default_controllers" />
+ <depend package="geometry_msgs" />
<url>http://pr.willowgarage.com</url>
<export>
</export>
Modified: pkg/trunk/demos/handhold/src/handhold.py
===================================================================
--- pkg/trunk/demos/handhold/src/handhold.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/demos/handhold/src/handhold.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -4,7 +4,7 @@
import rospy
from tf import TransformListener
from robot_msgs.msg import PoseStamped
-from robot_msgs.msg import PoseDot
+from geometry_msgs.msg import Twist
#import numpy
rospy.init_node("handhold")
@@ -14,9 +14,9 @@
q_target = None
-base_pub = rospy.Publisher('/cmd_vel', PoseDot);
+base_pub = rospy.Publisher('/cmd_vel', Twist);
-cmd_vel = PoseDot()
+cmd_vel = Twist()
error_x = 0
error_y = 0
@@ -34,9 +34,9 @@
error_rotation = q_target.pose.orientation.z - q.pose.orientation.z
print (error_rotation)
- cmd_vel.vel.vx = -10.0 * error_x
- cmd_vel.ang_vel.vz = -10.0 * error_y + error_rotation * -5.0
- cmd_vel.vel.vy = error_rotation * 2.0
+ cmd_vel.linear.x = -10.0 * error_x
+ cmd_vel.angular.z = -10.0 * error_y + error_rotation * -5.0
+ cmd_vel.linear.y = error_rotation * 2.0
base_pub.publish(cmd_vel)
rate.sleep();
Modified: pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/manifest.xml
===================================================================
--- pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/manifest.xml 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/manifest.xml 2009-08-07 22:25:37 UTC (rev 21070)
@@ -13,7 +13,7 @@
<depend package="pr2_ogre" />
<depend package="gazebo_worlds" />
<depend package="nav_msgs" />
- <depend package="robot_msgs" />
+ <depend package="geometry_msgs" />
<depend package="std_msgs" />
<depend package="tf" />
</package>
Modified: pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomw_gt.py
===================================================================
--- pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomw_gt.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomw_gt.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -45,8 +45,8 @@
import sys, unittest
import os, time
import rospy, rostest
-from robot_msgs.msg import *
-from nav_msgs.msg import *
+from geometry_msgs.msg import Twist,Vector3
+from nav_msgs.msg import Odometry
TEST_DURATION = 10.0
@@ -218,13 +218,13 @@
def test_base(self):
print "LNK\n"
- pub = rospy.Publisher("/cmd_vel", PoseDot)
+ pub = rospy.Publisher("/cmd_vel", Twist)
rospy.Subscriber("/base_pose_ground_truth", PoseWithRatesStamped, self.p3dInput)
rospy.Subscriber("/odom", Odometry, self.odomInput)
rospy.init_node(NAME, anonymous=True)
timeout_t = time.time() + TEST_DURATION
while not rospy.is_shutdown() and not self.success and time.time() < timeout_t:
- pub.publish(PoseDot(Velocity(TARGET_VX,TARGET_VY, 0), AngularVelocity(0,0,TARGET_VW)))
+ pub.publish(Twist(Vector3(TARGET_VX,TARGET_VY, 0), Vector3(0,0,TARGET_VW)))
time.sleep(0.1)
# display what odom thinks
#print " odom " + " x: " + str(self.odom_e.x) + " y: " + str(self.odom_e.y) + " t: " + str(self.odom_e.t)
Modified: pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomx_gt.py
===================================================================
--- pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomx_gt.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomx_gt.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -45,9 +45,10 @@
import sys, unittest
import os, time
import rospy, rostest
-from robot_msgs.msg import *
-from nav_msgs.msg import *
+from geometry_msgs.msg import Twist,Vector3
+from nav_msgs.msg import Odometry
+
TEST_DURATION = 10.0
TARGET_VX = 0.5
@@ -179,13 +180,13 @@
def test_base(self):
print "LNK\n"
- pub = rospy.Publisher("/cmd_vel", PoseDot)
+ pub = rospy.Publisher("/cmd_vel", Twist)
rospy.Subscriber("/base_pose_ground_truth", PoseWithRatesStamped, self.p3dInput)
rospy.Subscriber("/odom", Odometry, self.odomInput)
rospy.init_node(NAME, anonymous=True)
timeout_t = time.time() + TEST_DURATION
while not rospy.is_shutdown() and not self.success and time.time() < timeout_t:
- pub.publish(PoseDot(Velocity(TARGET_VX,TARGET_VY, 0), AngularVelocity(0,0,TARGET_VW)))
+ pub.publish(Twist(Vector3(TARGET_VX,TARGET_VY, 0), Vector3(0,0,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)
Modified: pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxy_gt.py
===================================================================
--- pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxy_gt.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxy_gt.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -45,8 +45,8 @@
import sys, unittest
import os, os.path, threading, time
import rospy, rostest
-from robot_msgs.msg import *
-from nav_msgs.msg import *
+from geometry_msgs.msg import Twist,Vector3
+from nav_msgs.msg import Odometry
TEST_DURATION = 10.0
@@ -179,13 +179,13 @@
def test_base(self):
print "LNK\n"
- pub = rospy.Publisher("/cmd_vel", PoseDot)
+ pub = rospy.Publisher("/cmd_vel", Twist)
rospy.Subscriber("/base_pose_ground_truth", PoseWithRatesStamped, self.p3dInput)
rospy.Subscriber("/odom", Odometry, self.odomInput)
rospy.init_node(NAME, anonymous=True)
timeout_t = time.time() + TEST_DURATION
while not rospy.is_shutdown() and not self.success and time.time() < timeout_t:
- pub.publish(PoseDot(Velocity(TARGET_VX,TARGET_VY, 0), AngularVelocity(0,0,TARGET_VW)))
+ pub.publish(Twist(Vector3(TARGET_VX,TARGET_VY, 0), Vector3(0,0,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)
Modified: pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxyw_gt.py
===================================================================
--- pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxyw_gt.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomxyw_gt.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -45,8 +45,8 @@
import sys, unittest
import os, time
import rospy, rostest
-from robot_msgs.msg import *
-from nav_msgs.msg import *
+from geometry_msgs.msg import Twist,Vector3
+from nav_msgs.msg import Odometry
TEST_DURATION = 10.0
@@ -215,13 +215,13 @@
def test_base(self):
print "LNK\n"
- pub = rospy.Publisher("/cmd_vel", PoseDot)
+ pub = rospy.Publisher("/cmd_vel", Twist)
rospy.Subscriber("/base_pose_ground_truth", PoseWithRatesStamped, self.p3dInput)
rospy.Subscriber("/odom", Odometry, self.odomInput)
rospy.init_node(NAME, anonymous=True)
timeout_t = time.time() + TEST_DURATION
while not rospy.is_shutdown() and not self.success and time.time() < timeout_t:
- pub.publish(PoseDot(Velocity(TARGET_VX,TARGET_VY, 0), AngularVelocity(0,0,TARGET_VW)))
+ pub.publish(Twist(Vector3(TARGET_VX,TARGET_VY, 0), Vector3(0,0,TARGET_VW)))
time.sleep(0.1)
# display what odom thinks
#print " odom " + " x: " + str(self.odom_e.x) + " y: " + str(self.odom_e.y) + " t: " + str(self.odom_e.t)
Modified: pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomy_gt.py
===================================================================
--- pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomy_gt.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_odomy_gt.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -45,8 +45,8 @@
import sys, unittest
import os, time
import rospy, rostest
-from robot_msgs.msg import *
-from nav_msgs.msg import *
+from geometry_msgs.msg import Twist,Vector3
+from nav_msgs.msg import Odometry
TEST_DURATION = 10.0
@@ -179,13 +179,13 @@
def test_base(self):
print "LNK\n"
- pub = rospy.Publisher("/cmd_vel", PoseDot)
+ pub = rospy.Publisher("/cmd_vel", Twist)
rospy.Subscriber("/base_pose_ground_truth", PoseWithRatesStamped, self.p3dInput)
rospy.Subscriber("/odom", Odometry, self.odomInput)
rospy.init_node(NAME, anonymous=True)
timeout_t = time.time() + TEST_DURATION
while not rospy.is_shutdown() and not self.success and time.time() < timeout_t:
- pub.publish(PoseDot(Velocity(TARGET_VX,TARGET_VY, 0), AngularVelocity(0,0,TARGET_VW)))
+ pub.publish(Twist(Vector3(TARGET_VX,TARGET_VY, 0), Vector3(0,0,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)
Modified: pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_vw_gt.py
===================================================================
--- pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_vw_gt.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/drivers/simulator/test_pr2_mechanism_controllers_gazebo/test_base_vw_gt.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -48,8 +48,8 @@
import sys, unittest
import os, time
import rospy, rostest
-from robot_msgs.msg import *
-from nav_msgs.msg import *
+from geometry_msgs.msg import Twist,Vector3
+from nav_msgs.msg import Odometry
TEST_DURATION = 60.0
@@ -121,13 +121,13 @@
def test_base(self):
print "LNK\n"
- pub = rospy.Publisher("/cmd_vel", PoseDot)
+ pub = rospy.Publisher("/cmd_vel", Twist)
rospy.Subscriber("/base_pose_ground_truth", PoseWithRatesStamped, self.p3dInput)
rospy.Subscriber("/odom", Odometry, self.odomInput)
rospy.init_node(NAME, anonymous=True)
timeout_t = time.time() + TEST_DURATION
while not rospy.is_shutdown() and not self.success and time.time() < timeout_t:
- pub.publish(PoseDot(Velocity(0.0,0.0,0),AngularVelocity(0,0,TARGET_VW)))
+ pub.publish(Twist(Vector3(0.0,0.0,0), Vector3(0,0,TARGET_VW)))
time.sleep(0.1)
self.assert_(self.success)
Modified: pkg/trunk/highlevel/executive_python/manifest.xml
===================================================================
--- pkg/trunk/highlevel/executive_python/manifest.xml 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/highlevel/executive_python/manifest.xml 2009-08-07 22:25:37 UTC (rev 21070)
@@ -6,6 +6,6 @@
<depend package="rospy" />
<depend package="nav_robot_actions" />
<depend package="std_msgs" />
- <depend package="robot_msgs" />
+ <depend package="geometry_msgs" />
<depend package="pr2_robot_actions" />
</package>
Modified: pkg/trunk/highlevel/executive_python/src/stuck_adapter.py
===================================================================
--- pkg/trunk/highlevel/executive_python/src/stuck_adapter.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/highlevel/executive_python/src/stuck_adapter.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -39,12 +39,12 @@
import rospy
import random
from pr2_msgs.msg import BaseControllerState
-from robot_msgs.msg import PoseDot
+from geometry_msgs.msg import Twist,Vector3
class StuckAdapter:
def __init__(self, state_topic, vel_topic, timeout):
rospy.Subscriber(state_topic, BaseControllerState, self.update)
- self.pub = rospy.Publisher(vel_topic, PoseDot)
+ self.pub = rospy.Publisher(vel_topic, Twist)
self.state = None
self.state_topic = state_topic
self.goal_topic = vel_topic
@@ -67,10 +67,10 @@
#to get unstuck... we're going to try to go at max speed forward until we are unstuck
while self.stuck() and (begin + self.timeout) < rospy.get_time():
start = rospy.get_time()
- vel = PoseDot()
- vel.vel.vx = 1.0
- vel.vel.vy = 0.0
- vel.ang_vel.vz = 0.0
+ vel = Twist()
+ vel.linear.x = 1.0
+ vel.linear.y = 0.0
+ vel.angular.z = 0.0
#publish the command to the base... hope we don't hit anything
self.pub.publish(vel)
end = rospy.get_time()
@@ -79,9 +79,9 @@
rospy.sleep(sleep_time)
#make sure to publish zeros when we're done
- vel = PoseDot()
- vel.vel.vx = 0.0
- vel.vel.vy = 0.0
- vel.ang_vel.vz = 0.0
+ vel = Twist()
+ vel.linear.x = 0.0
+ vel.linear.y = 0.0
+ vel.angular.z = 0.0
#publish the command to the base... hope we don't hit anything
self.pub.publish(vel)
Modified: pkg/trunk/pr2/hot_box_test/base_shuffle.py
===================================================================
--- pkg/trunk/pr2/hot_box_test/base_shuffle.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/pr2/hot_box_test/base_shuffle.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -46,7 +46,7 @@
# Loads interface with the robot.
import rospy
-from robot_msgs.msg import PoseDot
+from geometry_msgs.msg import Twist,Vector3
from mechanism_msgs.srv import SpawnController, KillController
spawn_controller = rospy.ServiceProxy('spawn_controller', SpawnController)
@@ -70,21 +70,21 @@
# Publishes velocity every 0.05s, calculates number of publishes
num_publishes = int(distance * 20 * 2)
- cmd_vel = PoseDot()
+ cmd_vel = Twist()
# Change to 0 for a controller with no bkwd bias
- cmd_vel.vel.vx = float(-0.01)
- cmd_vel.vel.vy = float(0)
- cmd_vel.vel.vz = float(0)
- cmd_vel.ang_vel.vx = float(0)
- cmd_vel.ang_vel.vy = float(0)
- cmd_vel.ang_vel.vz = float(0)
+ cmd_vel.linear.x = float(-0.01)
+ cmd_vel.linear.y = float(0)
+ cmd_vel.linear.z = float(0)
+ cmd_vel.angular.x = float(0)
+ cmd_vel.angular.y = float(0)
+ cmd_vel.angular.z = float(0)
- base_vel = rospy.Publisher('cmd_vel', PoseDot)
+ base_vel = rospy.Publisher('cmd_vel', Twist)
try:
while not rospy.is_shutdown():
# Set velocity
- cmd_vel.vel.vy = float(0.4)
+ cmd_vel.linear.y = float(0.4)
# Extra iteration adds a negative bias in controller
for i in range(0, num_publishes - 1):
base_vel.publish(cmd_vel)
@@ -95,7 +95,7 @@
if rospy.is_shutdown():
break
- cmd_vel.vel.vy = float(-0.4)
+ cmd_vel.linear.y = float(-0.4)
for i in range(0, num_publishes):
base_vel.publish(cmd_vel)
if rospy.is_shutdown():
@@ -106,7 +106,7 @@
traceback.print_exc()
finally:
# Set velocity = 0
- cmd_vel.vel.vy = float(0)
+ cmd_vel.linear.y = float(0)
base_vel.publish(cmd_vel)
kill_controller('base_controller')
Modified: pkg/trunk/pr2/hot_box_test/base_swivvel.py
===================================================================
--- pkg/trunk/pr2/hot_box_test/base_swivvel.py 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/pr2/hot_box_test/base_swivvel.py 2009-08-07 22:25:37 UTC (rev 21070)
@@ -45,7 +45,7 @@
# Loads interface with the robot.
import rospy
-from robot_msgs.msg import PoseDot
+from geometry_msgs.msg import Twist,Vector3
from mechanism_control import mechanism
@@ -68,15 +68,15 @@
# Publishes velocity every 0.05s, calculates number of publishes
num_publishes = int(distance * 20 * 2)
- cmd_vel = PoseDot()
- cmd_vel.vel.vx = float(0)
- cmd_vel.vel.vy = float(0)
- cmd_vel.vel.vz = float(0)
- cmd_vel.ang_vel.vx = float(0)
- cmd_vel.ang_vel.vy = float(0)
- cmd_vel.ang_vel.vz = float(0)
+ cmd_vel = Twist()
+ cmd_vel.linear.x = float(0)
+ cmd_vel.linear.y = float(0)
+ cmd_vel.linear.z = float(0)
+ cmd_vel.angular.x = float(0)
+ cmd_vel.angular.y = float(0)
+ cmd_vel.angular.z = float(0)
- base_vel = rospy.Publisher('cmd_vel', PoseDot)
+ base_vel = rospy.Publisher('cmd_vel', Twist)
try:
while not rospy.is_shutdown():
Modified: pkg/trunk/pr2/hot_box_test/manifest.xml
===================================================================
--- pkg/trunk/pr2/hot_box_test/manifest.xml 2009-08-07 22:25:37 UTC (rev 21069)
+++ pkg/trunk/pr2/hot_box_test/manifest.xml 2009-08-07 22:25:37 UTC (rev 21070)
@@ -18,7 +18,7 @@
<depend package="pr2_default_controllers" />
<depend package="life_test" />
<depend package="ocean_battery_driver" />
- <depend package="robot_msgs" />
+ <depend package="geometry_msgs" />
<depend package="mechanism_msgs" />
</package>
Modified: pkg/trunk/sandbox/annotated_map_builder/manifest.xml
===================================================================
--- pkg/trunk/sandbox/annotate...
[truncated message content] |
|
From: <mee...@us...> - 2009-08-08 00:15:26
|
Revision: 21089
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21089&view=rev
Author: meeussen
Date: 2009-08-08 00:13:36 +0000 (Sat, 08 Aug 2009)
Log Message:
-----------
move wrench message from robot_msgs to geometry_msgs and remove header from message
Modified Paths:
--------------
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/msg/CartesianHybridState.msg
pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_hybrid_controller.cpp
pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_wrench_controller.cpp
pkg/trunk/motion_planning/planning_research/sbpl_arm_planner_node/include/sbpl_arm_planner_node/sbpl_arm_planner_node.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/plug_controller.h
Removed Paths:
-------------
pkg/trunk/stacks/common_msgs/robot_msgs/msg/Wrench.msg
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h 2009-08-08 00:13:36 UTC (rev 21089)
@@ -39,7 +39,7 @@
#include <kdl/frames.hpp>
#include <kdl/chainjnttojacsolver.hpp>
#include <ros/node_handle.h>
-#include <robot_msgs/Wrench.h>
+#include <geometry_msgs/Wrench.h>
#include <mechanism_control/controller.h>
#include <mechanism_model/chain.h>
#include <tf/transform_datatypes.h>
@@ -70,7 +70,7 @@
ros::NodeHandle node_;
ros::Subscriber sub_command_;
- void command(const robot_msgs::WrenchConstPtr& wrench_msg);
+ void command(const geometry_msgs::WrenchConstPtr& wrench_msg);
mechanism::RobotState *robot_state_;
mechanism::Chain chain_;
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h 2009-08-08 00:13:36 UTC (rev 21089)
@@ -42,7 +42,7 @@
#include "kdl/chainfksolver.hpp"
#include "kdl/chainjnttojacsolver.hpp"
#include "ros/node.h"
-#include "robot_msgs/Wrench.h"
+#include "geometry_msgs/Wrench.h"
#include "misc_utils/subscription_guard.h"
#include "mechanism_control/controller.h"
#include "tf/transform_datatypes.h"
@@ -132,7 +132,7 @@
EndeffectorConstraintController controller_;
SubscriptionGuard guard_command_;
- robot_msgs::Wrench wrench_msg_;
+ geometry_msgs::Wrench wrench_msg_;
unsigned int loop_count_;
};
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h 2009-08-08 00:13:36 UTC (rev 21089)
@@ -59,7 +59,7 @@
#include <kdl/chainjnttojacsolver.hpp>
#include "ros/node.h"
#include "control_toolbox/pid.h"
-#include "robot_msgs/Wrench.h"
+#include "geometry_msgs/Wrench.h"
#include "robot_mechanism_controllers/ChangeConstraints.h"
#include "robot_mechanism_controllers/JointConstraint.h"
#include "mechanism_control/controller.h"
@@ -173,7 +173,7 @@
JointChainConstraintController controller_;
mechanism::RobotState *robot_;
- robot_msgs::Wrench wrench_msg_;
+ geometry_msgs::Wrench wrench_msg_;
};
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h 2009-08-08 00:13:36 UTC (rev 21089)
@@ -41,7 +41,7 @@
#include "kdl/frames.hpp"
#include "kdl/chainfksolver.hpp"
#include "ros/node.h"
-#include "robot_msgs/Wrench.h"
+#include "geometry_msgs/Wrench.h"
#include "robot_msgs/PoseStamped.h"
#include "robot_msgs/Transform.h"
#include "robot_mechanism_controllers/PlugInternalState.h"
@@ -166,7 +166,7 @@
SubscriptionGuard guard_outlet_pose_;
AdvertisedServiceGuard guard_set_tool_frame_;
- robot_msgs::Wrench wrench_msg_;
+ geometry_msgs::Wrench wrench_msg_;
robot_msgs::PoseStamped outlet_pose_msg_;
unsigned int loop_count_;
Modified: pkg/trunk/controllers/robot_mechanism_controllers/msg/CartesianHybridState.msg
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/msg/CartesianHybridState.msg 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/controllers/robot_mechanism_controllers/msg/CartesianHybridState.msg 2009-08-08 00:13:36 UTC (rev 21089)
@@ -8,7 +8,7 @@
geometry_msgs/Twist last_twist_meas
geometry_msgs/Twist last_twist_meas_filtered
geometry_msgs/Twist last_twist_desi
-robot_msgs/Wrench last_wrench_desi
+geometry_msgs/Wrench last_wrench_desi
float64[] desired_torque
float64[] measured_torque
Modified: pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_hybrid_controller.cpp
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_hybrid_controller.cpp 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_hybrid_controller.cpp 2009-08-08 00:13:36 UTC (rev 21089)
@@ -66,7 +66,7 @@
m.angular.z = k.rot.z();
}
-void WrenchKDLToMsg(const KDL::Wrench &k, robot_msgs::Wrench &m)
+void WrenchKDLToMsg(const KDL::Wrench &k, geometry_msgs::Wrench &m)
{
m.force.x = k.force.x();
m.force.y = k.force.y();
Modified: pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_wrench_controller.cpp
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_wrench_controller.cpp 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/controllers/robot_mechanism_controllers/src/cartesian_wrench_controller.cpp 2009-08-08 00:13:36 UTC (rev 21089)
@@ -130,7 +130,7 @@
// subscribe to wrench commands
- sub_command_ = node_.subscribe<robot_msgs::Wrench>
+ sub_command_ = node_.subscribe<geometry_msgs::Wrench>
("command", 1, &CartesianWrenchController::command, this);
return true;
@@ -203,7 +203,7 @@
-void CartesianWrenchController::command(const robot_msgs::WrenchConstPtr& wrench_msg)
+void CartesianWrenchController::command(const geometry_msgs::WrenchConstPtr& wrench_msg)
{
// convert to wrench command
wrench_desi_.force(0) = wrench_msg->force.x;
Modified: pkg/trunk/motion_planning/planning_research/sbpl_arm_planner_node/include/sbpl_arm_planner_node/sbpl_arm_planner_node.h
===================================================================
--- pkg/trunk/motion_planning/planning_research/sbpl_arm_planner_node/include/sbpl_arm_planner_node/sbpl_arm_planner_node.h 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/motion_planning/planning_research/sbpl_arm_planner_node/include/sbpl_arm_planner_node/sbpl_arm_planner_node.h 2009-08-08 00:13:36 UTC (rev 21089)
@@ -50,7 +50,7 @@
#include <kdl/chainjnttojacsolver.hpp>
/** Messages **/
-#include <robot_msgs/Wrench.h>
+#include <geometry_msgs/Wrench.h>
#include <geometry_msgs/Pose.h>
#include <manipulation_msgs/JointTraj.h>
#include <mapping_msgs/CollisionMap.h>
Modified: pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/plug_controller.h
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/plug_controller.h 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/plug_controller.h 2009-08-08 00:13:36 UTC (rev 21089)
@@ -42,7 +42,7 @@
#include "kdl/chainfksolver.hpp"
#include "kdl/chainjnttojacsolver.hpp"
#include "ros/node.h"
-#include "robot_msgs/Wrench.h"
+#include "geometry_msgs/Wrench.h"
#include "geometry_msgs/PoseStamped.h"
#include "geometry_msgs/Transform.h"
#include "experimental_controllers/PlugInternalState.h"
@@ -167,7 +167,7 @@
SubscriptionGuard guard_outlet_pose_;
AdvertisedServiceGuard guard_set_tool_frame_;
- robot_msgs::Wrench wrench_msg_;
+ geometry_msgs::Wrench wrench_msg_;
geometry_msgs::PoseStamped outlet_pose_msg_;
unsigned int loop_count_;
Deleted: pkg/trunk/stacks/common_msgs/robot_msgs/msg/Wrench.msg
===================================================================
--- pkg/trunk/stacks/common_msgs/robot_msgs/msg/Wrench.msg 2009-08-07 23:39:29 UTC (rev 21088)
+++ pkg/trunk/stacks/common_msgs/robot_msgs/msg/Wrench.msg 2009-08-08 00:13:36 UTC (rev 21089)
@@ -1,3 +0,0 @@
-Header header
-geometry_msgs/Vector3 force
-geometry_msgs/Vector3 torque
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|