Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3de8839
update install scripts
Jun 19, 2017
9f5a36b
update install for kinetic again
Jun 19, 2017
7b45773
commenting out robotiq issues in gripper manager and in robotiq predi…
Jun 19, 2017
fc04a95
bring in fixes to costar dvrk
bcjiang Jun 20, 2017
56d8956
Add CATKIN_IGNORE to packages not compilable in kinetic.
bcjiang Jun 22, 2017
bdfc97e
modify install files
Jun 22, 2017
71a4e48
Solved the psm gripper issue and robot not-connected issue.
bcjiang Jun 27, 2017
35e3af6
Merge branch 'dvrk' of https://github.com/cpaxton/costar_stack into dvrk
Jun 28, 2017
054e5fa
Switch to PSM2 for real system implementation.
Jul 6, 2017
02b4975
Correct PSM2 config file directory in dvrk_real launch file.
Jul 11, 2017
c02d544
Switch back to PSM1 due to hardware issue.
Jul 12, 2017
346348b
Enabled recording waypoint through foot pedal clutch.
Jul 13, 2017
4f6838c
hide the label in the middle
Jul 17, 2017
370e948
Update instructor UI codes.
Jul 21, 2017
4f231a2
Initial commit for predicator_dvrk
bcjiang Jul 22, 2017
3ffa290
Modified predicator codes for dvrk (without testing).
Jul 22, 2017
692d320
Modified predicator_dvrk package, still not showing up in knowledge t…
Jul 23, 2017
86b47a1
Add launch file for both arms teleoperation.
Jul 23, 2017
aca82d7
fix predicator dvrk messages
Jul 24, 2017
138c1b1
fix predicator clutch stuff
Jul 24, 2017
c7bdb97
fix up description and if statement
Jul 24, 2017
b27437e
Fix psm gripper orientation error and pedal press predicator issue.
Aug 27, 2017
36d8b3a
Merge commit from remote master to dvrk local.
Aug 29, 2017
93f217b
Fix the gripper bug.
Aug 30, 2017
1f024e8
Merging from remote master
Jun 6, 2018
9daa873
Get merged CoSTAR running on dvrk.
Jun 8, 2018
18636b5
Add README file for CoSTAR-dVRK
bcjiang Jun 10, 2018
4075a18
rename README file
bcjiang Jun 10, 2018
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
6 changes: 5 additions & 1 deletion costar_bringup/launch/config/dvrk.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
<group ns="costar">
<rosparam param="home">[0.30, -1.33, -1.80, -0.27, 1.50, 1.60]</rosparam>
<group ns="robot">
<!--gripper not programmed in the same way as UR5/IIWA -->
<rosparam param="has_gripper">false</rosparam>
<rosparam param="has_planning_scene">false</rosparam>
<rosparam param="dof">6</rosparam>
<rosparam param="joint_weights">[1.0, 1.0, 1.0, 1.0, 1.0, 1.0]</rosparam>
<rosparam param="translation_weight">1.0</rosparam>
<rosparam param="rotation_weight">1.0</rosparam>
<rosparam param="base_link">PSM1_psm_base_link</rosparam>
<rosparam param="end_link">PSM1_tool_tip_link_virtual</rosparam>
<rosparam param="table_frame">table_center</rosparam>
<rosparam param="has_planning_scene">false</rosparam>
</group>
<group ns="smartmove">
<rosparam param="available_objects">
Expand Down
3 changes: 3 additions & 0 deletions costar_bringup/launch/dvrk_psm.launch
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
<!-- Interactive Marker -->
<node name="instructor_marker" pkg="costar_robot_manager" type="instructor_marker.py"/>

<!-- Gripper -->
<node name= "simple_psm_gripper" pkg="gripper_dvrk" type="psm_gripper.py" />

</launch>
25 changes: 25 additions & 0 deletions costar_bringup/launch/dvrk_real.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<launch>
<!-- dvrk bringup -->
<arg name="arm" default="PSM1"/>
<arg name="cisst_root" default="$(env HOME)/catkin_ws/src/cisst-saw"/>
<arg name="psm_config" default="$(arg cisst_root)/sawIntuitiveResearchKit/share/jhu-dVRK/console-PSM1.json"/>

<include file="$(find dvrk_robot)/launch/dvrk_arm_rviz.launch">
<arg name="arm" value="$(arg arm)"/>
<arg name="config" value="$(arg psm_config)"/>
</include>

<!-- CoSTAR bringup -->
<include file="$(find costar_bringup)/launch/utilities.launch"/>
<include file="$(find costar_robot_manager)/launch/simple_psm_driver.launch"/>
<include file="$(find costar_bringup)/launch/config/dvrk.launch"/>


<!-- Interactive Marker -->
<node name="instructor_marker" pkg="costar_robot_manager" type="instructor_marker.py"/>

<!-- Gripper -->
<node name= "simple_psm_gripper" pkg="gripper_dvrk" type="psm_gripper.py" />

</launch>
34 changes: 34 additions & 0 deletions costar_bringup/launch/dvrk_teleop.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<launch>
<!-- dvrk bringup -->
<arg name="master" default="MTMR"/>
<arg name="slave" default="PSM1"/>
<arg name="cisst_root" default="$(env HOME)/catkin_ws/src/cisst-saw"/>
<arg name="arms_config" default="$(arg cisst_root)/sawIntuitiveResearchKit/share/jhu-dVRK/console-MTMR-PSM1-Teleop.json"/>

<!-- set to dvrk to hide extra options -->
<arg name="case" default=""/>


<include file="$(find dvrk_robot)/launch/dvrk_master_slave_rviz.launch">
<arg name="master" value="$(arg master)"/>
<arg name="slave" value="$(arg slave)"/>
<arg name="config" value="$(arg arms_config)"/>
</include>

<!-- CoSTAR bringup -->
<include file="$(find costar_bringup)/launch/utilities.launch">
<arg name="instructor_cases" value="$(arg case)"/>
</include>
<include file="$(find costar_robot_manager)/launch/simple_psm_driver.launch"/>
<include file="$(find costar_bringup)/launch/config/dvrk.launch"/>
<node name="predicator_dvrk" pkg="predicator_dvrk" type="simple_predicator_dvrk.py"/>


<!-- Interactive Marker -->
<node name="instructor_marker" pkg="costar_robot_manager" type="instructor_marker.py"/>

<!-- Gripper -->
<node name= "simple_psm_gripper" pkg="gripper_dvrk" type="psm_gripper.py" />

</launch>
32 changes: 32 additions & 0 deletions costar_bringup/launch/dvrk_teleop_two_arms.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0"?>
<launch>
<!-- dvrk bringup -->
<arg name="master" default="MTMR"/>
<arg name="slave" default="PSM1"/>
<arg name="arms_config" default="$(find dvrk_config)/jhu-dVRK/console-MTMR-PSM1-MTML-PSM2-Teleop.json"/>

<!-- set to dvrk to hide extra options -->
<arg name="case" default=""/>

<include file="$(find dvrk_robot)/launch/dvrk_master_slave_rviz.launch">
<arg name="master" value="$(arg master)"/>
<arg name="slave" value="$(arg slave)"/>
<arg name="config" value="$(arg arms_config)"/>
</include>

<!-- CoSTAR bringup -->
<include file="$(find costar_bringup)/launch/utilities.launch">
<arg name="instructor_cases" value="$(arg case)"/>
</include>
<include file="$(find costar_robot_manager)/launch/simple_psm_driver.launch"/>
<include file="$(find costar_bringup)/launch/config/dvrk.launch"/>
<node name="predicator_dvrk" pkg="predicator_dvrk" type="simple_predicator_dvrk.py"/>


<!-- Interactive Marker -->
<node name="instructor_marker" pkg="costar_robot_manager" type="instructor_marker.py"/>

<!-- Gripper -->
<node name= "simple_psm_gripper" pkg="gripper_dvrk" type="psm_gripper.py" />

</launch>
4 changes: 2 additions & 2 deletions costar_component/src/costar_component/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def make_service_proxy(self, name, srv_t, use_namespace=True):
service_name = os.path.join(self.namespace, name)
else:
service_name = name
rospy.logerr("Connecting to service with name: %s"%service_name)
rospy.loginfo("Connecting to service with name: %s"%service_name)
rospy.wait_for_service(service_name)
rospy.logerr("Connected to service successfully.")
rospy.loginfo("Connected to service successfully.")
return rospy.ServiceProxy(service_name,srv_t)

def __init__(self, name, namespace):
Expand Down
197 changes: 197 additions & 0 deletions costar_gripper/gripper_dvrk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
cmake_minimum_required(VERSION 2.8.3)
project(gripper_dvrk)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## 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 COMPONENTS
gripper_manager
)

## 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 tag for "message_generation"
## * 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 dependency has been pulled in
## but can be declared for certainty nonetheless:
## * 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
# )

################################################
## Declare ROS dynamic reconfigure parameters ##
################################################

## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
## * add a build_depend and a run_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
## * add "dynamic_reconfigure" to
## find_package(catkin REQUIRED COMPONENTS ...)
## * uncomment the "generate_dynamic_reconfigure_options" section below
## and list every .cfg file to be processed

## Generate dynamic reconfigure parameters in the 'cfg' folder
# generate_dynamic_reconfigure_options(
# cfg/DynReconf1.cfg
# cfg/DynReconf2.cfg
# )

###################################
## 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 gripper_dvrk
# CATKIN_DEPENDS gripper_manager
# DEPENDS system_lib
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
${catkin_INCLUDE_DIRS}
)

## Declare a C++ library
# add_library(${PROJECT_NAME}
# src/${PROJECT_NAME}/gripper_dvrk.cpp
# )

## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
# add_executable(${PROJECT_NAME}_node src/gripper_dvrk_node.cpp)

## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")

## Add cmake target dependencies of the executable
## same as for the library above
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Specify libraries to link a library or executable target against
# target_link_libraries(${PROJECT_NAME}_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 ${PROJECT_NAME} ${PROJECT_NAME}_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_gripper_dvrk.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)
52 changes: 52 additions & 0 deletions costar_gripper/gripper_dvrk/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<package>
<name>gripper_dvrk</name>
<version>0.0.0</version>
<description>The gripper_dvrk package</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="chris@todo.todo">ziri</maintainer>


<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>


<!-- Url tags are optional, but multiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/gripper_dvrk</url> -->


<!-- Author tags are optional, multiple are allowed, one per tag -->
<!-- Authors do not have to be maintainers, but could be -->
<!-- Example: -->
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->


<!-- The *_depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
<!-- Use build_depend for packages you need at compile time: -->
<!-- <build_depend>message_generation</build_depend> -->
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
<!-- Use run_depend for packages you need at runtime: -->
<!-- <run_depend>message_runtime</run_depend> -->
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<buildtool_depend>catkin</buildtool_depend>
<build_depend>gripper_manager</build_depend>
<run_depend>gripper_manager</run_depend>


<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->

</export>
</package>
12 changes: 12 additions & 0 deletions costar_gripper/gripper_dvrk/scripts/psm_gripper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python

import rospy
from gripper_dvrk import SimplePSMGripperServer

# rospy.init_node("simple_psm_gripper_server")
verbose = rospy.get_param('~verbose',False)
server = SimplePSMGripperServer("/costar/gripper",verbose=verbose)
server.init_gripper()
rospy.sleep(.5)
server.open_gripper()
rospy.spin()
Loading