Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnewman committed Jun 22, 2015
2 parents 4297cad + bbe4f60 commit 0b39687
Show file tree
Hide file tree
Showing 9 changed files with 364 additions and 2 deletions.
2 changes: 0 additions & 2 deletions catkin/src/cwru_376_student/cwru_urdf/abby_w_arm_rviz.launch
Expand Up @@ -27,7 +27,5 @@

<node pkg="tf" type="static_transform_publisher" name="camera_link_frame_bdcst" args="0 0 0 0 0 0 1 kinect_link camera_link 100"/>

<include file="$(find openni_launch)/launch/openni.launch"/>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find cwru_urdf)/abby.rviz"></node>
</launch>
27 changes: 27 additions & 0 deletions catkin/src/cwru_base_hydro/cwru_base/launch/start_abby_base.launch
@@ -0,0 +1,27 @@
<launch>
<include file="$(find cwru_configs)/abby/base/static_transform.launch" />
<node pkg="cwru_base" type="crio_receiver" name="crio_receiver" output="screen">
<rosparam command="load" file="$(find cwru_configs)/abby/base/diagnostics.yaml" />
<rosparam command="load" file="$(find cwru_configs)/abby/base/base.yaml" />
</node>
<node pkg="cwru_base" type="odom_translator.py" name="odom_translator">
<rosparam command="load" file="$(find cwru_configs)/$(optenv ROBOT sim)/base/base.yaml" />
</node>

<include file="$(find cwru_configs)/abby/base/sonar.launch" />

<node pkg="sicktoolbox_wrapper" type="sicklms" name="base_laser1" respawn="true">
<param name="port" type="string" value="/dev/ttyUSB0" />
<param name="baud" type="int" value="500000" />
<param name="frame_id" type="string" value="/base_laser1_link" />
<param name="resolution" type="double" value="1.0" />
<remap from="scan" to="base_laser1_scan" />
</node>

<node pkg="cwru_base" type="twist_receiver.py" name="twist_receiver">
<rosparam command="load" file="$(find cwru_configs)/abby/base/base.yaml" />
</node>
<node pkg="sound_play" type="soundplay_node.py" name="sound_play" />
<include file="$(find openni_launch)/launch/openni.launch"/>

</launch>
@@ -0,0 +1,43 @@
<launch>
<include file="$(find cwru_configs)/abby/base/static_transform.launch" />
<node pkg="cwru_base" type="crio_receiver" name="crio_receiver" output="screen">
<rosparam command="load" file="$(find cwru_configs)/abby/base/diagnostics.yaml" />
<rosparam command="load" file="$(find cwru_configs)/abby/base/base.yaml" />
</node>
<node pkg="cwru_base" type="odom_translator.py" name="odom_translator">
<rosparam command="load" file="$(find cwru_configs)/$(optenv ROBOT sim)/base/base.yaml" />
</node>

<include file="$(find cwru_configs)/abby/base/sonar.launch" />

<node pkg="sicktoolbox_wrapper" type="sicklms" name="base_laser1" respawn="true">
<param name="port" type="string" value="/dev/ttyUSB0" />
<param name="baud" type="int" value="500000" />
<param name="frame_id" type="string" value="/base_laser1_link" />
<param name="resolution" type="double" value="1.0" />
<remap from="scan" to="base_laser1_scan" />
</node>

<node pkg="cwru_base" type="twist_receiver.py" name="twist_receiver">
<rosparam command="load" file="$(find cwru_configs)/abby/base/base.yaml" />
</node>
<node pkg="sound_play" type="soundplay_node.py" name="sound_play" />

<!-- start up the Kinect interface -->
<include file="$(find openni_launch)/launch/openni.launch"/>

<!-- start up the ros_industrial interface nodes -->
<!-- robot_ip: IP-address of the robot's socket-messaging server -->
<arg name="robot_ip" />
<!-- copy the specified IP address to the Parameter Server, for use by nodes below -->
<param name="/robot_ip_address" type="str" value="192.168.0.50"/>

<!-- robot_state: publishes joint positions and robot-state data
(from socket connection to robot) -->
<node pkg="industrial_robot_client" type="robot_state" name="robot_state"/>
<!-- motion_download_interface: sends robot motion commands by DOWNLOADING path to robot
(using socket connection to robot) -->
<node pkg="industrial_robot_client" type="motion_download_interface" name="motion_download_interface"/>


</launch>
164 changes: 164 additions & 0 deletions catkin/src/cwru_base_hydro/motor_controller/CMakeLists.txt
@@ -0,0 +1,164 @@
cmake_minimum_required(VERSION 2.8.3)
project(motor_controller)

## 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
dynamixel_controllers
roscpp
rospy
std_msgs
)

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

###################################
## 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 my_dynamixel_tutorial
# CATKIN_DEPENDS dynamixel_controllers roscpp rospy std_msgs
# DEPENDS system_lib
)

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

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

## Declare a cpp library
# add_library(my_dynamixel_tutorial
# src/${PROJECT_NAME}/my_dynamixel_tutorial.cpp
# )

## Declare a cpp executable
# add_executable(my_dynamixel_tutorial_node src/my_dynamixel_tutorial_node.cpp)

## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# add_dependencies(my_dynamixel_tutorial_node my_dynamixel_tutorial_generate_messages_cpp)

## Specify libraries to link a library or executable target against
# target_link_libraries(my_dynamixel_tutorial_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 my_dynamixel_tutorial my_dynamixel_tutorial_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_my_dynamixel_tutorial.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)
36 changes: 36 additions & 0 deletions catkin/src/cwru_base_hydro/motor_controller/README.md
@@ -0,0 +1,36 @@
motor_controller
===============



ROS stack for interfacing with Robotis Dynamixel MX-64 servo motor.
Aimed at controlling Abby gripper in Case Western Reserve University.

Need Python compiler!!
Any subversion of Python 2 is okay. Not tested on Python 3.

use:
In terminal:
roslaunch motor_controller controller_manager.launch
In another terminal:
roslaunch motor_controller tilt_controller.launch
Then:
Spread hand:
rostopic pub -1 /tilt_controller/command std_msgs/Float64 -- -3.5
Grab object:
rostopic pub -1 /tilt_controller/command std_msgs/Float64 -- -4.0

DO NOT CHANGE THE VALUE!! IT MAY BREAK GRIPPER!

Default mount point for usb2dynamixel is at /dev/ttyUSB0. You can change this in controller_manager.launch

Motor ID is constraint within 1 to 20. This could be modified in the same file.

An Zhigang Apr. 20, 2015
Revision: An Zhigang Apr. 29, 2015
Revision: An Zhigang Apr. 30, 2015

If you have any further questions, please contact me through email:
anzhg@icloud.com
or:
zxa41@case.edu
@@ -0,0 +1,15 @@
<!-- -*- mode: XML -*- -->
<launch>
<node name="dynamixel_manager" pkg="dynamixel_controllers" type="controller_manager.py" required="true" output="screen">
<rosparam>
namespace: dxl_manager
serial_ports:
pan_tilt_port:
port_name: "/dev/ttyUSB1"
baud_rate: 57600
min_motor_id: 1
max_motor_id: 25
update_rate: 20
</rosparam>
</node>
</launch>
@@ -0,0 +1,9 @@
<launch>
<!-- Start tilt joint controller -->
<rosparam file="$(find motor_controller)/tilt.yaml" command="load"/>
<node name="tilt_controller_spawner" pkg="dynamixel_controllers" type="controller_spawner.py"
args="--manager=dxl_manager
--port pan_tilt_port
tilt_controller"
output="screen"/>
</launch>
58 changes: 58 additions & 0 deletions catkin/src/cwru_base_hydro/motor_controller/package.xml
@@ -0,0 +1,58 @@
<?xml version="1.0"?>
<package>
<name>motor_controller</name>
<version>0.0.0</version>
<description>The motor_controller package</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="anzhg@icloud.com">An Zhigang</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>BSD</license>


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


<!-- Author tags are optional, mutiple are allowed, one per tag -->
<!-- Authors do not have to be maintianers, 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>dynamixel_controllers</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<run_depend>dynamixel_controllers</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</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 catkin/src/cwru_base_hydro/motor_controller/tilt.yaml
@@ -0,0 +1,12 @@
tilt_controller:
controller:
package: dynamixel_controllers
module: joint_position_controller
type: JointPositionController
joint_name: tilt_joint
joint_speed: 1.17
motor:
id: 1
init: 4096
min: 0
max: 1048575

0 comments on commit 0b39687

Please sign in to comment.