-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
128 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,67 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
cmake_minimum_required(VERSION 3.5) | ||
project(mc_rtc_msgs VERSION 1.1.0) | ||
|
||
find_package(catkin REQUIRED COMPONENTS message_generation geometry_msgs) | ||
|
||
add_service_files( | ||
DIRECTORY srv | ||
FILES | ||
EnableController.srv | ||
open_grippers.srv | ||
close_grippers.srv | ||
set_gripper.srv | ||
get_joint_pos.srv | ||
set_joint_pos.srv | ||
play_next_stance.srv | ||
send_msg.srv | ||
send_recv_msg.srv | ||
move_com.srv | ||
) | ||
|
||
add_message_files( | ||
DIRECTORY msg | ||
FILES | ||
JointSensors.msg | ||
) | ||
generate_messages(DEPENDENCIES geometry_msgs) | ||
|
||
catkin_package( | ||
CATKIN_DEPENDS geometry_msgs | ||
) | ||
|
||
install(DIRECTORY include/${PROJECT_NAME}/ | ||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | ||
FILES_MATCHING PATTERN "*.h") | ||
if(NOT DEFINED ENV{ROS_VERSION}) | ||
message(FATAL_ERROR "ROS_VERSION is not set in the environment") | ||
endif() | ||
|
||
if($ENV{ROS_VERSION} EQUAL 1) | ||
find_package(catkin REQUIRED COMPONENTS message_generation geometry_msgs) | ||
|
||
add_service_files( | ||
DIRECTORY srv | ||
FILES | ||
EnableController.srv | ||
open_grippers.srv | ||
close_grippers.srv | ||
set_gripper.srv | ||
get_joint_pos.srv | ||
set_joint_pos.srv | ||
play_next_stance.srv | ||
send_msg.srv | ||
send_recv_msg.srv | ||
move_com.srv | ||
) | ||
|
||
add_message_files( | ||
DIRECTORY msg | ||
FILES | ||
JointSensors.msg | ||
) | ||
generate_messages(DEPENDENCIES geometry_msgs) | ||
|
||
catkin_package( | ||
CATKIN_DEPENDS geometry_msgs | ||
) | ||
|
||
install(DIRECTORY include/${PROJECT_NAME}/ | ||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | ||
FILES_MATCHING PATTERN "*.h") | ||
elseif($ENV{ROS_VERSION} EQUAL 2) | ||
find_package(ament_cmake REQUIRED) | ||
find_package(rosidl_default_generators REQUIRED) | ||
find_package(geometry_msgs REQUIRED) | ||
|
||
rosidl_generate_interfaces(${PROJECT_NAME} | ||
msg/ros2/JointSensors.msg | ||
srv/ros2/CloseGrippers.srv | ||
srv/EnableController.srv | ||
srv/ros2/GetJointPos.srv | ||
srv/ros2/MoveCoM.srv | ||
srv/ros2/OpenGrippers.srv | ||
srv/ros2/PlayNextStance.srv | ||
srv/ros2/SendMsg.srv | ||
srv/ros2/SendRecvMsg.srv | ||
srv/ros2/SetGripper.srv | ||
srv/ros2/SetJointPos.srv | ||
DEPENDENCIES geometry_msgs | ||
) | ||
|
||
install(DIRECTORY include/ | ||
DESTINATION include/${PROJECT_NAME} | ||
FILES_MATCHING PATTERN "*.h") | ||
|
||
ament_package() | ||
else() | ||
message(FATAL_ERROR "Unknown ROS version: $ENV{ROS_VERSION}") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
std_msgs/Header header | ||
string[] name | ||
float64[] motor_temperature | ||
float64[] driver_temperature | ||
float64[] motor_current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
<package> | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>mc_rtc_msgs</name> | ||
<description>mc_rtc_msgs</description> | ||
<version>1.1.0</version> | ||
<author>Pierre Gergondet</author> | ||
<description>mc_rtc_msgs</description> | ||
<maintainer email="[email protected]">Pierre Gergondet</maintainer> | ||
<license>BSD</license> | ||
<url>https://github.com/jrl-umi3218/mc_rtc_msgs</url> | ||
<author>Pierre Gergondet</author> | ||
|
||
<buildtool_depend>catkin</buildtool_depend> | ||
<buildtool_depend condition="$ROS_VERSION == 1">catkin</buildtool_depend> | ||
<buildtool_depend condition="$ROS_VERSION == 2">ament_cmake</buildtool_depend> | ||
<buildtool_depend condition="$ROS_VERSION == 2">rosidl_default_generators</buildtool_depend> | ||
|
||
<build_depend>message_generation</build_depend> | ||
<build_depend>geometry_msgs</build_depend> | ||
<build_depend condition="$ROS_VERSION == 1">message_generation</build_depend> | ||
|
||
<run_depend>geometry_msgs</run_depend> | ||
<run_depend>message_runtime</run_depend> | ||
</package> | ||
<depend>geometry_msgs</depend> | ||
|
||
<exec_depend condition="$ROS_VERSION == 1">message_runtime</exec_depend> | ||
<exec_depend condition="$ROS_VERSION == 2">rosidl_default_runtime</exec_depend> | ||
|
||
<member_of_group condition="$ROS_VERSION == 2">rosidl_interface_packages</member_of_group> | ||
|
||
<export> | ||
<build_type condition="$ROS_VERSION == 1">catkin</build_type> | ||
<build_type condition="$ROS_VERSION == 2">ament_cmake</build_type> | ||
</export> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
bool success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
string jname | ||
--- | ||
bool success | ||
float64 q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
float64[3] com | ||
--- | ||
bool success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
bool success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
bool success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
string msg | ||
--- | ||
bool success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
string msg | ||
--- | ||
bool success | ||
string msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
string gname | ||
float64[] values | ||
--- | ||
bool success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
string jname | ||
float64 q | ||
--- | ||
bool success |