From: Walter Fetter Lages Date: Wed, 28 Nov 2018 14:25:23 +0000 (-0200) Subject: Initial Hydro commit. X-Git-Tag: rosbook2015initial~4 X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=086556c1e0f41301dfa0d8078a042bdde0547dfd;p=ufrgs_wam.git Initial Hydro commit. --- diff --git a/bhand_description/CMakeLists.txt b/bhand_description/CMakeLists.txt deleted file mode 100644 index f8f1c9c..0000000 --- a/bhand_description/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) - -# Set the build type. Options are: -# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage -# Debug : w/ debug symbols, w/o optimization -# Release : w/o debug symbols, w/ optimization -# RelWithDebInfo : w/ debug symbols, w/ optimization -# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries -#set(ROS_BUILD_TYPE RelWithDebInfo) - -rosbuild_init() - -#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 -#rosbuild_genmsg() -#uncomment if you have defined services -#rosbuild_gensrv() - -#common commands for building c++ executables and libraries -#rosbuild_add_library(${PROJECT_NAME} src/example.cpp) -#target_link_libraries(${PROJECT_NAME} another_library) -#rosbuild_add_boost_directories() -#rosbuild_link_boost(${PROJECT_NAME} thread) -#rosbuild_add_executable(example examples/example.cpp) -#target_link_libraries(example ${PROJECT_NAME}) diff --git a/bhand_description/Makefile b/bhand_description/Makefile deleted file mode 100644 index b75b928..0000000 --- a/bhand_description/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake.mk \ No newline at end of file diff --git a/bhand_description/launch/bhand.launch b/bhand_description/launch/bhand.launch deleted file mode 100644 index 1875c7c..0000000 --- a/bhand_description/launch/bhand.launch +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/bhand_description/launch/bhand_sim.launch b/bhand_description/launch/bhand_sim.launch deleted file mode 100644 index 09797be..0000000 --- a/bhand_description/launch/bhand_sim.launch +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/bhand_description/manifest.xml b/bhand_description/manifest.xml deleted file mode 100644 index 80a2f17..0000000 --- a/bhand_description/manifest.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - bhand_description - - - Walter Fetter Lages - GNU - - http://ros.org/wiki/bhand_description - - - - diff --git a/bhand_description/meshes/bh_base.stl b/bhand_description/meshes/bh_base.stl deleted file mode 100644 index dce76f7..0000000 Binary files a/bhand_description/meshes/bh_base.stl and /dev/null differ diff --git a/bhand_description/meshes/bh_link1.stl b/bhand_description/meshes/bh_link1.stl deleted file mode 100644 index bf35bd9..0000000 Binary files a/bhand_description/meshes/bh_link1.stl and /dev/null differ diff --git a/bhand_description/meshes/bh_link2.stl b/bhand_description/meshes/bh_link2.stl deleted file mode 100644 index f74e529..0000000 Binary files a/bhand_description/meshes/bh_link2.stl and /dev/null differ diff --git a/bhand_description/meshes/bh_link3.stl b/bhand_description/meshes/bh_link3.stl deleted file mode 100644 index d9361c6..0000000 Binary files a/bhand_description/meshes/bh_link3.stl and /dev/null differ diff --git a/bhand_description/xacro/bhand.urdf.xacro b/bhand_description/xacro/bhand.urdf.xacro deleted file mode 100644 index b8fb615..0000000 --- a/bhand_description/xacro/bhand.urdf.xacro +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bhand_description/xacro/bhand0.urdf.xacro b/bhand_description/xacro/bhand0.urdf.xacro deleted file mode 100644 index 79f781a..0000000 --- a/bhand_description/xacro/bhand0.urdf.xacro +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bhand_description/xacro/bhand_base.urdf.xacro b/bhand_description/xacro/bhand_base.urdf.xacro deleted file mode 100644 index a397d3a..0000000 --- a/bhand_description/xacro/bhand_base.urdf.xacro +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - Gazebo/Blue - - - - - - - - - - - - - - diff --git a/bhand_description/xacro/bhand_finger.urdf.xacro b/bhand_description/xacro/bhand_finger.urdf.xacro deleted file mode 100644 index e8b7e88..0000000 --- a/bhand_description/xacro/bhand_finger.urdf.xacro +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gazebo/Grey - true - - - - - - - - - - - - - - - - - - - - - - - 1 - 1 - - - - - - diff --git a/plier_description/launch/display.launch b/plier_description/launch/display.launch deleted file mode 100644 index a113ced..0000000 --- a/plier_description/launch/display.launch +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/plier_description/launch/gazebo.launch b/plier_description/launch/gazebo.launch deleted file mode 100644 index c829339..0000000 --- a/plier_description/launch/gazebo.launch +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/plier_description/launch/plier.launch b/plier_description/launch/plier.launch deleted file mode 100644 index 8376d88..0000000 --- a/plier_description/launch/plier.launch +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/plier_description/launch/plier_sim.launch b/plier_description/launch/plier_sim.launch deleted file mode 100644 index c9bf77f..0000000 --- a/plier_description/launch/plier_sim.launch +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/plier_description/manifest.xml b/plier_description/manifest.xml deleted file mode 100644 index 97a62e2..0000000 --- a/plier_description/manifest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - plier_description - - Walter Fetter Lags - BSD - \ No newline at end of file diff --git a/plier_description/meshes/base_link.stl b/plier_description/meshes/base_link.stl deleted file mode 100644 index eab1cf1..0000000 Binary files a/plier_description/meshes/base_link.stl and /dev/null differ diff --git a/plier_description/meshes/link1.stl b/plier_description/meshes/link1.stl deleted file mode 100644 index 6bcdc08..0000000 Binary files a/plier_description/meshes/link1.stl and /dev/null differ diff --git a/plier_description/meshes/link2.stl b/plier_description/meshes/link2.stl deleted file mode 100644 index 6f95350..0000000 Binary files a/plier_description/meshes/link2.stl and /dev/null differ diff --git a/plier_description/urdf/plier.urdf b/plier_description/urdf/plier.urdf deleted file mode 100644 index 6ad1514..0000000 --- a/plier_description/urdf/plier.urdf +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gazebo/Yellow - - - - - Gazebo/White - - - - - Gazebo/Grey - - - diff --git a/stack.xml b/stack.xml deleted file mode 100644 index a22a793..0000000 --- a/stack.xml +++ /dev/null @@ -1,8 +0,0 @@ - - UFRGS WAM - Maintained by Walter Fetter Lages - GPL - - http://ros.org/wiki/ufrgs_wam - - diff --git a/ufrgs_wam/CMakeLists.txt b/ufrgs_wam/CMakeLists.txt new file mode 100644 index 0000000..cabb467 --- /dev/null +++ b/ufrgs_wam/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 2.8.3) +project(ufrgs_wam) +find_package(catkin REQUIRED) +catkin_metapackage() diff --git a/ufrgs_wam/package.xml b/ufrgs_wam/package.xml new file mode 100644 index 0000000..84822fb --- /dev/null +++ b/ufrgs_wam/package.xml @@ -0,0 +1,55 @@ + + + ufrgs_wam + 2.0.0 + The ufrgs_wam package + + + + + Walter Fetter Lages + + + + + + GPLv3 + + + + + + + http://www.ece.ufrgs.br/~fetter/ufrgs_wam + + + + + + + + + + + + + + + + + + + + catkin + + + + + + + + + + + + \ No newline at end of file diff --git a/wam_control_gazebo/CMakeLists.txt b/wam_control_gazebo/CMakeLists.txt index 97ce471..f7d5625 100644 --- a/wam_control_gazebo/CMakeLists.txt +++ b/wam_control_gazebo/CMakeLists.txt @@ -1,33 +1,159 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) - -# Set the build type. Options are: -# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage -# Debug : w/ debug symbols, w/o optimization -# Release : w/o debug symbols, w/ optimization -# RelWithDebInfo : w/ debug symbols, w/ optimization -# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries -#set(ROS_BUILD_TYPE RelWithDebInfo) - -rosbuild_init() - -#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 -#rosbuild_genmsg() -#uncomment if you have defined services -#rosbuild_gensrv() - -#common commands for building c++ executables and libraries -#rosbuild_add_library(${PROJECT_NAME} src/example.cpp) -#target_link_libraries(${PROJECT_NAME} another_library) -#rosbuild_add_boost_directories() -#rosbuild_link_boost(${PROJECT_NAME} thread) -#rosbuild_add_executable(example examples/example.cpp) -#target_link_libraries(example ${PROJECT_NAME}) - -# Build RobotSim Interface -rosbuild_add_library(wam_control_gazebo src/robot_sim_wam.cpp) +cmake_minimum_required(VERSION 2.8.3) +project(wam_control_gazebo) + +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED) + +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) +find_package(gazebo REQUIRED) + + +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html +# catkin_python_setup() + +################################################ +## Declare ROS messages, services and actions ## +################################################ + +## To declare and build messages, services or actions from within this +## package, follow these steps: +## * Let MSG_DEP_SET be the set of packages whose message types you use in +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). +## * In the file package.xml: +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependencies might have been +## pulled in transitively but can be declared for certainty nonetheless: +## * add a build_depend tag for "message_generation" +## * add a run_depend tag for "message_runtime" +## * In this file (CMakeLists.txt): +## * add "message_generation" and every package in MSG_DEP_SET to +## find_package(catkin REQUIRED COMPONENTS ...) +## * add "message_runtime" and every package in MSG_DEP_SET to +## catkin_package(CATKIN_DEPENDS ...) +## * uncomment the add_*_files sections below as needed +## and list every .msg/.srv/.action file to be processed +## * uncomment the generate_messages entry below +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) + +## Generate messages in the 'msg' folder +# add_message_files( +# FILES +# Message1.msg +# Message2.msg +# ) + +## Generate services in the 'srv' folder +# add_service_files( +# FILES +# Service1.srv +# Service2.srv +# ) + +## Generate actions in the 'action' folder +# add_action_files( +# FILES +# Action1.action +# Action2.action +# ) + +## Generate added messages and services with any dependencies listed here +# generate_messages( +# DEPENDENCIES +# std_msgs # Or other packages containing msgs +# ) + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if you package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( +# INCLUDE_DIRS include +# LIBRARIES wam_control_gazebo +# CATKIN_DEPENDS other_catkin_pkg +# DEPENDS system_lib +) + +########### +## Build ## +########### + +## Specify additional locations of header files +## Your package locations should be listed before other locations +include_directories(include + ${GAZEBO_INCLUDE_DIRS} +) + +## Declare a cpp library +add_library(wam_control_gazebo + src/robot_sim_wam.cpp +) + +## Declare a cpp executable +# add_executable(wam_control_gazebo_node src/wam_control_gazebo_node.cpp) + +## Add cmake target dependencies of the executable/library +## as an example, message headers may need to be generated before nodes +# add_dependencies(wam_control_gazebo_node wam_control_gazebo_generate_messages_cpp) + +## Specify libraries to link a library or executable target against +# target_link_libraries(wam_control_gazebo_node +# ${catkin_LIBRARIES} +# ) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination +# install(PROGRAMS +# scripts/my_python_script +# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark executables and/or libraries for installation +# install(TARGETS wam_control_gazebo wam_control_gazebo_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) +# install(FILES +# # myfile1 +# # myfile2 +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +# ) + +############# +## Testing ## +############# + +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_wam_control_gazebo.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() + +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) diff --git a/wam_control_gazebo/Makefile b/wam_control_gazebo/Makefile deleted file mode 100644 index b75b928..0000000 --- a/wam_control_gazebo/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake.mk \ No newline at end of file diff --git a/wam_control_gazebo/mainpage.dox b/wam_control_gazebo/mainpage.dox deleted file mode 100644 index 590fcdc..0000000 --- a/wam_control_gazebo/mainpage.dox +++ /dev/null @@ -1,14 +0,0 @@ -/** -\mainpage -\htmlinclude manifest.html - -\b twil_control_gazebo - - - ---> - - -*/ diff --git a/wam_control_gazebo/manifest.xml b/wam_control_gazebo/manifest.xml deleted file mode 100644 index 8aa7c58..0000000 --- a/wam_control_gazebo/manifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - wam_control_gazebo - - - Walter Fetter Lages - GPL - - http://ros.org/wiki/wam_control_gazebo - - - - - - - - - - diff --git a/wam_control_gazebo/package.xml b/wam_control_gazebo/package.xml new file mode 100644 index 0000000..52219d1 --- /dev/null +++ b/wam_control_gazebo/package.xml @@ -0,0 +1,61 @@ + + + wam_control_gazebo + 2.0.0 + The wam_control_gazebo package + + + + + Walter Fetter Lages + + + + + + GPLv3 + + + + + + + http://www.ece.ufrgs.br/~fetter/ufrgs_wam + + + + + + + Walter Fetter Lages + + + + + + + + + + + + + + catkin + + gazebo_ros_control + gazebo_ros_control_plugin + wam_description + gazebo + + + + + + + + + + + + \ No newline at end of file diff --git a/wam_control_gazebo/robot_sim_plugins.xml b/wam_control_gazebo/robot_sim_plugins.xml index 94e66ad..d9d450b 100644 --- a/wam_control_gazebo/robot_sim_plugins.xml +++ b/wam_control_gazebo/robot_sim_plugins.xml @@ -3,7 +3,7 @@ + base_class_type="gazebo_ros_control::RobotHWSim"> A ROS/Gazebo interface for Barrett WAM, exporting a joint_state_interface and a joint_effort_interface. diff --git a/wam_control_gazebo/src/robot_sim_wam.cpp b/wam_control_gazebo/src/robot_sim_wam.cpp index 203216c..905a6f8 100644 --- a/wam_control_gazebo/src/robot_sim_wam.cpp +++ b/wam_control_gazebo/src/robot_sim_wam.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include @@ -13,7 +13,7 @@ namespace wam_control_gazebo { - class RobotSimWam:public ros_control_gazebo::RobotSim + class RobotSimWam:public gazebo_ros_control::RobotHWSim { unsigned int n_dof_; @@ -46,20 +46,22 @@ namespace wam_control_gazebo joint_position_[j]=0.0; joint_velocity_[j]=0.0; joint_effort_[j]=0.0; - js_interface_.registerJoint(joint_name_[j],&joint_position_[j], - &joint_velocity_[j],&joint_effort_[j]); + js_interface_.registerHandle(hardware_interface::JointStateHandle(joint_name_[j],&joint_position_[j], + &joint_velocity_[j],&joint_effort_[j])); joint_effort_command_[j] = 0.0; - ej_interface_.registerJoint(js_interface_.getJointStateHandle(joint_name_[j]), - &joint_effort_command_[j]); + ej_interface_.registerHandle(hardware_interface::JointHandle(js_interface_.getHandle(joint_name_[j]), + &joint_effort_command_[j])); } registerInterface(&js_interface_); registerInterface(&ej_interface_); } - - bool initSim(ros::NodeHandle nh,gazebo::physics::ModelPtr model) + bool initSim(const std::string& robot_namespace, + ros::NodeHandle nh,gazebo::physics::ModelPtr model, + const urdf::Model *const urdf_model, + std::vector transmissions) { for(unsigned int j=0;j < n_dof_;j++) { @@ -80,7 +82,7 @@ namespace wam_control_gazebo { for(unsigned int j=0; j < n_dof_;j++) { - joint_position_[j]=sim_joints_[j]->GetAngle(0).GetAsRadian(); + joint_position_[j]=sim_joints_[j]->GetAngle(0).Radian(); joint_velocity_[j]=sim_joints_[j]->GetVelocity(0); joint_effort_[j]=joint_effort_command_[j]; } @@ -96,4 +98,4 @@ namespace wam_control_gazebo } PLUGINLIB_DECLARE_CLASS(wam_control_gazebo,RobotSimWam,wam_control_gazebo::RobotSimWam, - ros_control_gazebo::RobotSim) + gazebo_ros_control::RobotHWSim) diff --git a/wam_controllers/CMakeLists.txt b/wam_controllers/CMakeLists.txt index 95ad1f8..47250cb 100644 --- a/wam_controllers/CMakeLists.txt +++ b/wam_controllers/CMakeLists.txt @@ -1,30 +1,161 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) - -# Set the build type. Options are: -# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage -# Debug : w/ debug symbols, w/o optimization -# Release : w/o debug symbols, w/ optimization -# RelWithDebInfo : w/ debug symbols, w/ optimization -# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries -#set(ROS_BUILD_TYPE RelWithDebInfo) - -rosbuild_init() - -#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 -#rosbuild_genmsg() -#uncomment if you have defined services -#rosbuild_gensrv() - -#common commands for building c++ executables and libraries -rosbuild_add_library(${PROJECT_NAME} src/computed_torque_controller.cpp) -#target_link_libraries(${PROJECT_NAME} another_library) -#rosbuild_add_boost_directories() -#rosbuild_link_boost(${PROJECT_NAME} thread) -#rosbuild_add_executable(example examples/example.cpp) -#target_link_libraries(example ${PROJECT_NAME}) +cmake_minimum_required(VERSION 2.8.3) +project(wam_controllers) + +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED) + +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) +find_package(Eigen REQUIRED) + + +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html +# catkin_python_setup() + +################################################ +## Declare ROS messages, services and actions ## +################################################ + +## To declare and build messages, services or actions from within this +## package, follow these steps: +## * Let MSG_DEP_SET be the set of packages whose message types you use in +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). +## * In the file package.xml: +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependencies might have been +## pulled in transitively but can be declared for certainty nonetheless: +## * add a build_depend tag for "message_generation" +## * add a run_depend tag for "message_runtime" +## * In this file (CMakeLists.txt): +## * add "message_generation" and every package in MSG_DEP_SET to +## find_package(catkin REQUIRED COMPONENTS ...) +## * add "message_runtime" and every package in MSG_DEP_SET to +## catkin_package(CATKIN_DEPENDS ...) +## * uncomment the add_*_files sections below as needed +## and list every .msg/.srv/.action file to be processed +## * uncomment the generate_messages entry below +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) + +## Generate messages in the 'msg' folder +# add_message_files( +# FILES +# Message1.msg +# Message2.msg +# ) + +## Generate services in the 'srv' folder +# add_service_files( +# FILES +# Service1.srv +# Service2.srv +# ) + +## Generate actions in the 'action' folder +# add_action_files( +# FILES +# Action1.action +# Action2.action +# ) + +## Generate added messages and services with any dependencies listed here +# generate_messages( +# DEPENDENCIES +# std_msgs # Or other packages containing msgs +# ) + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if you package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( +# INCLUDE_DIRS include +# LIBRARIES wam_controllers +# CATKIN_DEPENDS other_catkin_pkg +# DEPENDS system_lib + DEPENDS eigen +) + +########### +## Build ## +########### + +## Specify additional locations of header files +## Your package locations should be listed before other locations +include_directories(include + ${catkin_INCLUDE_DIRS} + ${Eigen_INCLUDE_DIRS} +) + +## Declare a cpp library +add_library(wam_controllers + src/computed_torque_controller.cpp +) + +## Declare a cpp executable +# add_executable(wam_controllers_node src/wam_controllers_node.cpp) + +## Add cmake target dependencies of the executable/library +## as an example, message headers may need to be generated before nodes +# add_dependencies(wam_controllers_node wam_controllers_generate_messages_cpp) + +## Specify libraries to link a library or executable target against +# target_link_libraries(wam_controllers_node +# ${catkin_LIBRARIES} +# ) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination +# install(PROGRAMS +# scripts/my_python_script +# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark executables and/or libraries for installation +# install(TARGETS wam_controllers wam_controllers_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) +# install(FILES +# # myfile1 +# # myfile2 +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +# ) + +############# +## Testing ## +############# + +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_wam_controllers.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() + +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) diff --git a/wam_controllers/Makefile b/wam_controllers/Makefile deleted file mode 100644 index b75b928..0000000 --- a/wam_controllers/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake.mk \ No newline at end of file diff --git a/wam_controllers/include/wam_controllers/computed_torque_controller.h b/wam_controllers/include/wam_controllers/computed_torque_controller.h index 825dac1..2bbbe22 100644 --- a/wam_controllers/include/wam_controllers/computed_torque_controller.h +++ b/wam_controllers/include/wam_controllers/computed_torque_controller.h @@ -56,7 +56,7 @@ namespace wam_controllers bool init(hardware_interface::EffortJointInterface *robot, ros::NodeHandle &n); void starting(const ros::Time& time); - void update(const ros::Time& time); + void update(const ros::Time& time,const ros::Duration& duration); }; } #endif diff --git a/wam_controllers/mainpage.dox b/wam_controllers/mainpage.dox deleted file mode 100644 index deb448e..0000000 --- a/wam_controllers/mainpage.dox +++ /dev/null @@ -1,14 +0,0 @@ -/** -\mainpage -\htmlinclude manifest.html - -\b twil_controllers - - - ---> - - -*/ diff --git a/wam_controllers/manifest.xml b/wam_controllers/manifest.xml deleted file mode 100644 index 8f8c463..0000000 --- a/wam_controllers/manifest.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - wam_controllers - - - Walter Fetter Lages - GPL - - http://ros.org/wiki/wam_controllers - - - - - - - - - - - - - diff --git a/wam_controllers/package.xml b/wam_controllers/package.xml new file mode 100644 index 0000000..991f3a2 --- /dev/null +++ b/wam_controllers/package.xml @@ -0,0 +1,62 @@ + + + wam_controllers + 2.0.0 + The wam_controllers package + + + + + Walter Fetter Lages + + + + + + GPLv3 + + + + + + + http://www.ece.ufrgs.br/ufrgs_wam + + + + + + + Walter Fetter Lages + + + + + + + + + + + + + catkin + + wam_control_gazebo + controller_interface + orocos_kdl + kdl_parser + trajectory_msgs + + + joint_state_controller + + + + + + + + + + \ No newline at end of file diff --git a/wam_controllers/src/computed_torque_controller.cpp b/wam_controllers/src/computed_torque_controller.cpp index 3c82b8e..86f24f3 100644 --- a/wam_controllers/src/computed_torque_controller.cpp +++ b/wam_controllers/src/computed_torque_controller.cpp @@ -53,7 +53,7 @@ namespace wam_controllers } hardware_interface::JointHandle j=robot-> - getJointHandle((std::string)name_value); + getHandle((std::string)name_value); joints_.push_back(j); } sub_command_=node_.subscribe("command",1000, @@ -123,7 +123,7 @@ namespace wam_controllers SetToZero(ddqr); } - void ComputedTorqueController::update(const ros::Time& time) + void ComputedTorqueController::update(const ros::Time& time,const ros::Duration& duration) { for(unsigned int i=0;i < joints_.size();i++) { diff --git a/wam_description/CMakeLists.txt b/wam_description/CMakeLists.txt index f8f1c9c..a89d6ea 100644 --- a/wam_description/CMakeLists.txt +++ b/wam_description/CMakeLists.txt @@ -1,30 +1,156 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) - -# Set the build type. Options are: -# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage -# Debug : w/ debug symbols, w/o optimization -# Release : w/o debug symbols, w/ optimization -# RelWithDebInfo : w/ debug symbols, w/ optimization -# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries -#set(ROS_BUILD_TYPE RelWithDebInfo) - -rosbuild_init() - -#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 -#rosbuild_genmsg() -#uncomment if you have defined services -#rosbuild_gensrv() - -#common commands for building c++ executables and libraries -#rosbuild_add_library(${PROJECT_NAME} src/example.cpp) -#target_link_libraries(${PROJECT_NAME} another_library) -#rosbuild_add_boost_directories() -#rosbuild_link_boost(${PROJECT_NAME} thread) -#rosbuild_add_executable(example examples/example.cpp) -#target_link_libraries(example ${PROJECT_NAME}) +cmake_minimum_required(VERSION 2.8.3) +project(wam_description) + +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED) + +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) + + +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html +# catkin_python_setup() + +################################################ +## Declare ROS messages, services and actions ## +################################################ + +## To declare and build messages, services or actions from within this +## package, follow these steps: +## * Let MSG_DEP_SET be the set of packages whose message types you use in +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). +## * In the file package.xml: +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependencies might have been +## pulled in transitively but can be declared for certainty nonetheless: +## * add a build_depend tag for "message_generation" +## * add a run_depend tag for "message_runtime" +## * In this file (CMakeLists.txt): +## * add "message_generation" and every package in MSG_DEP_SET to +## find_package(catkin REQUIRED COMPONENTS ...) +## * add "message_runtime" and every package in MSG_DEP_SET to +## catkin_package(CATKIN_DEPENDS ...) +## * uncomment the add_*_files sections below as needed +## and list every .msg/.srv/.action file to be processed +## * uncomment the generate_messages entry below +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) + +## Generate messages in the 'msg' folder +# add_message_files( +# FILES +# Message1.msg +# Message2.msg +# ) + +## Generate services in the 'srv' folder +# add_service_files( +# FILES +# Service1.srv +# Service2.srv +# ) + +## Generate actions in the 'action' folder +# add_action_files( +# FILES +# Action1.action +# Action2.action +# ) + +## Generate added messages and services with any dependencies listed here +# generate_messages( +# DEPENDENCIES +# std_msgs # Or other packages containing msgs +# ) + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if you package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( +# INCLUDE_DIRS include +# LIBRARIES wam_description +# CATKIN_DEPENDS other_catkin_pkg +# DEPENDS system_lib +) + +########### +## Build ## +########### + +## Specify additional locations of header files +## Your package locations should be listed before other locations +# include_directories(include) + +## Declare a cpp library +# add_library(wam_description +# src/${PROJECT_NAME}/wam_description.cpp +# ) + +## Declare a cpp executable +# add_executable(wam_description_node src/wam_description_node.cpp) + +## Add cmake target dependencies of the executable/library +## as an example, message headers may need to be generated before nodes +# add_dependencies(wam_description_node wam_description_generate_messages_cpp) + +## Specify libraries to link a library or executable target against +# target_link_libraries(wam_description_node +# ${catkin_LIBRARIES} +# ) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination +# install(PROGRAMS +# scripts/my_python_script +# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark executables and/or libraries for installation +# install(TARGETS wam_description wam_description_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) +# install(FILES +# # myfile1 +# # myfile2 +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +# ) + +############# +## Testing ## +############# + +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_wam_description.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() + +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) diff --git a/wam_description/Makefile b/wam_description/Makefile deleted file mode 100644 index b75b928..0000000 --- a/wam_description/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake.mk \ No newline at end of file diff --git a/wam_description/launch/wam.launch b/wam_description/launch/wam.launch index e13ade7..e74ec50 100644 --- a/wam_description/launch/wam.launch +++ b/wam_description/launch/wam.launch @@ -1,4 +1,4 @@ - + diff --git a/wam_description/launch/wam_bhand.launch b/wam_description/launch/wam_bhand.launch deleted file mode 100644 index 5302c4b..0000000 --- a/wam_description/launch/wam_bhand.launch +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/wam_description/launch/wam_bhand_sim.launch b/wam_description/launch/wam_bhand_sim.launch deleted file mode 100644 index 60b4beb..0000000 --- a/wam_description/launch/wam_bhand_sim.launch +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/wam_description/launch/wam_sim.launch b/wam_description/launch/wam_sim.launch index b22b8d0..8a08305 100644 --- a/wam_description/launch/wam_sim.launch +++ b/wam_description/launch/wam_sim.launch @@ -2,7 +2,7 @@ - + diff --git a/wam_description/manifest.xml b/wam_description/manifest.xml deleted file mode 100644 index 123238f..0000000 --- a/wam_description/manifest.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - wam_description - - - Walter Fetter Lages - GPL - - http://ros.org/wiki/wam_description - - - - diff --git a/wam_description/package.xml b/wam_description/package.xml new file mode 100644 index 0000000..77ce6de --- /dev/null +++ b/wam_description/package.xml @@ -0,0 +1,54 @@ + + + wam_description + 2.0.0 + The wam_description package + + + + + Walter Fetter Lages + + + + + + GPLv3 + + + + + + + http://www.ece.ufrgs.br/~fetter/ufrgs_wam + + + + + + + Walter Fetter Lages + + + + + + + + + + + + + catkin + + + + + + + + + + + \ No newline at end of file diff --git a/wam_description/xacro/wam.urdf.xacro b/wam_description/xacro/wam.urdf.xacro index 8a70fd3..ed28763 100644 --- a/wam_description/xacro/wam.urdf.xacro +++ b/wam_description/xacro/wam.urdf.xacro @@ -5,16 +5,16 @@ xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:xacro="http://ros.org/wiki/xacro"> - - - - - - - - + + + + + + + + - + @@ -36,12 +36,10 @@ - + wam wam_control_gazebo/RobotSimWam 0.001 - + diff --git a/wam_description/xacro/wam_bhand.urdf.xacro b/wam_description/xacro/wam_bhand.urdf.xacro deleted file mode 100644 index f9bec07..0000000 --- a/wam_description/xacro/wam_bhand.urdf.xacro +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/wam_description/xacro/wam_table.urdf.xacro b/wam_description/xacro/wam_table.urdf.xacro index ddb7493..40739c2 100644 --- a/wam_description/xacro/wam_table.urdf.xacro +++ b/wam_description/xacro/wam_table.urdf.xacro @@ -9,7 +9,7 @@ - + @@ -18,7 +18,7 @@ - +