Skip to content
Snippets Groups Projects
Commit 8be83aef authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Change used Empty.srv package from roscpp to std_srvs

parent 83a94a0f
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ find_package(catkin REQUIRED)
# ********************************************************************
# Add catkin additional components here
# ********************************************************************
find_package(catkin REQUIRED COMPONENTS iri_base_driver moby_msgs roscpp move_base_msgs actionlib tf2)
find_package(catkin REQUIRED COMPONENTS iri_base_driver moby_msgs std_srvs move_base_msgs actionlib tf2)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
......@@ -63,7 +63,7 @@ catkin_package(
# ********************************************************************
# Add ROS and IRI ROS run time dependencies
# ********************************************************************
CATKIN_DEPENDS iri_base_driver moby_msgs roscpp move_base_msgs actionlib tf2
CATKIN_DEPENDS iri_base_driver moby_msgs std_srvs move_base_msgs actionlib tf2
# ********************************************************************
# Add system and labrobotica run time dependencies here
# ********************************************************************
......@@ -102,7 +102,7 @@ target_link_libraries(${PROJECT_NAME} ${iriutils_LIBRARIES})
# ********************************************************************
# add_dependencies(${PROJECT_NAME} <msg_package_name>_generate_messages_cpp)
add_dependencies(${PROJECT_NAME} moby_msgs_generate_messages_cpp)
add_dependencies(${PROJECT_NAME} roscpp_generate_messages_cpp)
add_dependencies(${PROJECT_NAME} std_srvs_generate_messages_cpp)
add_dependencies(${PROJECT_NAME} mbf_msgs_generate_messages_cpp)
add_dependencies(${PROJECT_NAME} iri_base_driver_generate_messages_cpp)
add_dependencies(${PROJECT_NAME}_gencfg iri_base_driver_generate_messages_py)
......
......@@ -5,7 +5,7 @@ The looming_modbus project description
# ROS Interface
### Service clients
- ~**mode_change** (moby_msgs/ModeChange.srv)
- ~**clear_costmaps** (roscpp/Empty.srv)
- ~**clear_costmaps** (std_srvs/Empty.srv)
### Action clients
- ~**move_base** (mbf_msgs/MoveBase.action)
......@@ -48,4 +48,4 @@ This package is distributed in the hope that it will be useful, but without any
In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
\ No newline at end of file
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
......@@ -32,7 +32,7 @@
// [service client headers]
#include <moby_msgs/ModeChange.h>
#include <roscpp/Empty.h>
#include <std_srvs/Empty.h>
// [action server client headers]
#include <actionlib/client/simple_action_client.h>
......@@ -70,7 +70,7 @@ class LoomingModbusDriverNode : public iri_base_driver::IriBaseNodeDriver<Loomin
moby_msgs::ModeChange mode_change_srv_;
ros::ServiceClient clear_costmaps_client_;
roscpp::Empty clear_costmaps_srv_;
std_srvs::Empty clear_costmaps_srv_;
// [action server attributes]
......
......@@ -53,7 +53,7 @@
<build_export_depend>iri_base_driver</build_export_depend>
<exec_depend>iri_base_driver</exec_depend>
<depend>moby_msgs</depend>
<depend>roscpp</depend>
<depend>std_srvs</depend>
<depend>move_base_msgs</depend>
<depend>actionlib</depend>
<depend>tf2</depend>
......
......@@ -21,7 +21,7 @@ LoomingModbusDriverNode::LoomingModbusDriverNode(ros::NodeHandle &nh) :
// [init clients]
mode_change_client_ = this->private_node_handle_.serviceClient<moby_msgs::ModeChange>("mode_change");
clear_costmaps_client_ = this->private_node_handle_.serviceClient<roscpp::Empty>("clear_costmaps");
clear_costmaps_client_ = this->private_node_handle_.serviceClient<std_srvs::Empty>("clear_costmaps");
// [init action servers]
......@@ -41,10 +41,7 @@ void LoomingModbusDriverNode::mainNodeThread(void)
// [fill srv structure and make request to the server]
// [fill action structure and make request to the action server]
//// variable to hold the state of the current goal on the server
actionlib::SimpleClientGoalState move_base_state(actionlib::SimpleClientGoalState::PENDING);
// to get the state of the current goal
this->driver_.unlock();
......@@ -210,8 +207,8 @@ bool LoomingModbusDriverNode::move_baseMakeActionRequest()
// ok=false;
return false;
}
// this->driver_.lock();
return ok;
// this->driver_.lock();
return ok;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment