|
From: <jfa...@us...> - 2009-04-14 17:43:24
|
Revision: 13826
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=13826&view=rev
Author: jfaustwg
Date: 2009-04-14 17:43:14 +0000 (Tue, 14 Apr 2009)
Log Message:
-----------
Compile fixes for Node fixes, since Node now no longer incorrectly casts to itself
Modified Paths:
--------------
pkg/trunk/highlevel/highlevel_controllers/src/joy_batt_sender.cpp
pkg/trunk/highlevel/highlevel_controllers/src/move_base.cpp
pkg/trunk/robot_control_loops/pr2_etherCAT/src/main.cpp
pkg/trunk/world_models/costmap_2d/src/costmap_node.cpp
Modified: pkg/trunk/highlevel/highlevel_controllers/src/joy_batt_sender.cpp
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/src/joy_batt_sender.cpp 2009-04-14 17:40:30 UTC (rev 13825)
+++ pkg/trunk/highlevel/highlevel_controllers/src/joy_batt_sender.cpp 2009-04-14 17:43:14 UTC (rev 13826)
@@ -45,8 +45,7 @@
ros::Node::instance()->param<int>("~stop_button", stop_button_, 7);
ros::Node::instance()->param<int>("~go_button", go_button_, 5);
ros::Node::instance()->param<int>("~deadman_button", deadman_button_, 4);
- robot_msgs::BatteryState bs;
- ros::Node::instance()->advertise("bogus_battery_state", bs, &JoyBattSender::sendHeartbeat, 2);
+ ros::Node::instance()->advertise<robot_msgs::BatteryState>("bogus_battery_state", boost::bind(&JoyBattSender::sendHeartbeat, this, _1), 2);
ros::Node::instance()->subscribe("joy", joy_msg_, &JoyBattSender::handleJoyMsg, this, 2);
}
@@ -108,7 +107,7 @@
node.spin();
-
+
return 0;
}
Modified: pkg/trunk/highlevel/highlevel_controllers/src/move_base.cpp
===================================================================
--- pkg/trunk/highlevel/highlevel_controllers/src/move_base.cpp 2009-04-14 17:40:30 UTC (rev 13825)
+++ pkg/trunk/highlevel/highlevel_controllers/src/move_base.cpp 2009-04-14 17:43:14 UTC (rev 13826)
@@ -358,7 +358,7 @@
// Might be worth eventually having a dedicated node provide this service and all
// nodes including move_base access the costmap through it, but for now leaving costmap
// in move_base for fast access
- ros::Node::instance()->advertiseService("costmap", &MoveBase::costmapCallback);
+ ros::Node::instance()->advertiseService("costmap", &MoveBase::costmapCallback, this);
// The cost map is populated with either laser scans in the case that we are unable to use a
// world model source, or point clouds if we are. We shall pick one, and will be dominated by
Modified: pkg/trunk/robot_control_loops/pr2_etherCAT/src/main.cpp
===================================================================
--- pkg/trunk/robot_control_loops/pr2_etherCAT/src/main.cpp 2009-04-14 17:40:30 UTC (rev 13825)
+++ pkg/trunk/robot_control_loops/pr2_etherCAT/src/main.cpp 2009-04-14 17:43:14 UTC (rev 13826)
@@ -301,23 +301,17 @@
g_quit = 1;
}
-class Shutdown {
-public:
- bool shutdownService(std_srvs::Empty::Request &req, std_srvs::Empty::Response &resp)
- {
- quitRequested(0);
- return true;
- }
-};
+bool shutdownService(std_srvs::Empty::Request &req, std_srvs::Empty::Response &resp)
+{
+ quitRequested(0);
+ return true;
+}
-class Reset {
-public:
- bool resetMotorsService(std_srvs::Empty::Request &req, std_srvs::Empty::Response &resp)
- {
- g_reset_motors = true;
- return true;
- }
-};
+bool resetMotorsService(std_srvs::Empty::Request &req, std_srvs::Empty::Response &resp)
+{
+ g_reset_motors = true;
+ return true;
+}
void warnOnSecondary(int sig)
{
@@ -369,7 +363,7 @@
ROS_FATAL("Unable to create pid file '%s': %s", PIDFILE, strerror(errno));
goto end;
}
-
+
if ((fd = open(PIDFILE, O_RDWR)) < 0)
{
ROS_FATAL("Unable to open pid file '%s': %s", PIDFILE, strerror(errno));
@@ -522,8 +516,8 @@
// Catch if we fall back to secondary mode
signal(SIGXCPU, warnOnSecondary);
- node->advertiseService("shutdown", &Shutdown::shutdownService);
- node->advertiseService("reset_motors", &Reset::resetMotorsService);
+ node->advertiseService("shutdown", shutdownService);
+ node->advertiseService("reset_motors", resetMotorsService);
//Start thread
int rv;
Modified: pkg/trunk/world_models/costmap_2d/src/costmap_node.cpp
===================================================================
--- pkg/trunk/world_models/costmap_2d/src/costmap_node.cpp 2009-04-14 17:40:30 UTC (rev 13825)
+++ pkg/trunk/world_models/costmap_2d/src/costmap_node.cpp 2009-04-14 17:43:14 UTC (rev 13826)
@@ -309,7 +309,7 @@
// Might be worth eventually having a dedicated node provide this service and all
// nodes including move_base access the costmap through it, but for now leaving costmap
// in move_base for fast access
- ros::Node::instance()->advertiseService("costmap", &CostMapNode::costmapCallback);
+ ros::Node::instance()->advertiseService("costmap", &CostMapNode::costmapCallback, this);
// The cost map is populated with either laser scans in the case that we are unable to use a
// world model source, or point clouds if we are. We shall pick one, and will be dominated by
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|