Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for combined robot hardware #34

Merged
merged 4 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ur_robot_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ find_package(catkin REQUIRED
controller_manager
geometry_msgs
hardware_interface
pluginlib
roscpp
sensor_msgs
std_srvs
Expand All @@ -39,6 +40,7 @@ catkin_package(
controller_manager
geometry_msgs
hardware_interface
pluginlib
roscpp
sensor_msgs
tf
Expand Down Expand Up @@ -88,6 +90,8 @@ add_library(ur_robot_driver
src/primary/robot_message.cpp
src/primary/robot_message/version_message.cpp
src/primary/robot_state/kinematics_info.cpp
src/ros/dashboard_client_ros.cpp
src/ros/hardware_interface.cpp
fmauch marked this conversation as resolved.
Show resolved Hide resolved
src/rtde/control_package_pause.cpp
src/rtde/control_package_setup_inputs.cpp
src/rtde/control_package_setup_outputs.cpp
Expand All @@ -108,8 +112,8 @@ target_link_libraries(ur_robot_driver ${catkin_LIBRARIES})
add_dependencies(ur_robot_driver ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

add_executable(ur_robot_driver_node
src/ros/dashboard_client_ros.cpp
src/ros/hardware_interface.cpp
#src/ros/dashboard_client_ros.cpp
#src/ros/hardware_interface.cpp
fmauch marked this conversation as resolved.
Show resolved Hide resolved
src/ros/hardware_interface_node.cpp
)
target_link_libraries(ur_robot_driver_node ${catkin_LIBRARIES} ur_robot_driver)
Expand Down Expand Up @@ -146,3 +150,7 @@ install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)

install(FILES hardware_interface_plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
7 changes: 7 additions & 0 deletions ur_robot_driver/hardware_interface_plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<library path="lib/libur_robot_driver">
fmauch marked this conversation as resolved.
Show resolved Hide resolved
<class name="ur_driver/HardwareInterface" type="ur_driver::HardwareInterface" base_class_type="hardware_interface::RobotHW">
<description>
Universal Robots ROS Driver as plugin
</description>
</class>
</library>
2 changes: 2 additions & 0 deletions ur_robot_driver/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<depend>controller_manager</depend>
<depend>geometry_msgs</depend>
<depend>hardware_interface</depend>
<depend>pluginlib</depend>
<depend>roscpp</depend>
<depend>sensor_msgs</depend>
<depend>tf</depend>
Expand All @@ -47,6 +48,7 @@
<exec_depend>velocity_controllers</exec_depend>

<export>
<hardware_interface plugin="${prefix}/hardware_interface_plugin.xml" />
<rosdoc config="doc/rosdoc.yaml" />
</export>

Expand Down
4 changes: 3 additions & 1 deletion ur_robot_driver/src/ros/hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
*/
//----------------------------------------------------------------------

#include <pluginlib/class_list_macros.hpp>
#include "ur_robot_driver/ros/hardware_interface.h"
#include "ur_robot_driver/ur/tool_communication.h"
#include <ur_robot_driver/exceptions.h>
Expand Down Expand Up @@ -744,3 +744,5 @@ void HardwareInterface::publishRobotAndSafetyMode()
}
}
} // namespace ur_driver

PLUGINLIB_EXPORT_CLASS(ur_driver::HardwareInterface, hardware_interface::RobotHW)
fmauch marked this conversation as resolved.
Show resolved Hide resolved