Documentation
A good place to start is to read the User Manual.
The code is split in these following packages:
sr_edc_controller_configuration contains the configuration files and the launch files for the different controllers.
sr_edc_ethercat_drivers contains the driver for the etherCAT hand.
sr_edc_launch contains the main launch file (sr_edc.launch)
sr_external_dependencies will upload the latest stable protocol header and compiled motor firmware.
sr_robot_lib is a library used by the sr_edc_ethercat_drivers to interpret the incoming etherCAT packets and to build the etherCAT packets we're going to send.
Installation Instructions
You can use this rosinstall file to install whole the necessary packages.
To use it, just download the rosinstall (to the /tmp directory in this example):
$ cd /tmp $ wget "http://www.ros.org/wiki/shadow_robot_etherCAT?action=AttachFile&do=get&target=shadow_robot.rosinstall" -O shadow_robot.rosinstall
Go to the directory where you want to install the packages (in this example, we'll assume it's /code/etherCAT_overlay, and ros is installed in /code/ros/diamondback), create an overlay, and then install the packages using rosinstall:
$ cd /code/etherCAT_overlay $ rosinstall /code/etherCAT_overlay /code/ros/diamondback $ rosinstall /code/etherCAT_overlay /tmp/shadow_robot.rosinstall
Then don't forget to source the generated setup.bash.
You can now follow the Tutorials.
EtherCAT Instructions (with the REAL hand attached)
To start running the EtherCAT software you can follow the instructions in tutorial Starting the EtherCAT hand.
The following sections summarize the main features of the etherCAT software that are available through topics and services.
Topics
The topics list is obtained by typing
rostopic list
/debug_etherCAT_data (only available when compiling with DEBUG=1) Shows the (almost) raw incoming etherCAT packet.
/srh/debug_0 - /srh/debug_19 (only available when compiling with DEBUG=1) Can be used by the developers to debug additional data. This would require modification of sr_robot_lib.cpp and recompilation of sr_robot_lib.
/diagnostics Shows the current status information as it's being received from the different elements in the robot.
/diagnostics_agg Shows the latest status information received from the different elements in the robot.
/joint_states Shows the current state of every joint in the robot. Three parameters are published for every joint: position (the angle in radians), velocity and effort. In the robot hand, joints J1 and J2 of the FF, MF, RF, LF have separate values in this topic (although they share the same actuator and the same force sensor, they have separate position sensors).
/joint_0s/joint_states Shows the current state of the joints J0 of the robot hand. The joint J0 is the addition of J1 and J2 (only for FF, MF, RF and LF). The values published in this topic can be calculated from the values in /joint_states. The same three values as in /joint_states exist for every joint: position, velocity, effort.
/mechanism_statistics Shows statistics (current value, last value, historic max and min) of different parameters for every actuator, joint and controller.
/pr2_etherCAT/motors_halted
/rftip/position
Services
The service list is obtained by typing
rosservice list
/SimpleMotorFlasher This service allows to reprogram a motor board with the desired firmware. The user needs to tell the service the motor_id and the file containing the firmware.
/ff_kinematics/get_fk
/ff_kinematics/get_fk_solver_info
/ff_kinematics/get_ik
/ff_kinematics/get_ik_solver_info
/ff_kinematics/tf_frames
/fftip_pos_pub/tf_frames
/pr2_controller_manager/list_controller_types Returns a list of the existing (defined in the software) controller types. Please keep in mind that most of the existing types are not used.
/pr2_controller_manager/list_controllers
/pr2_controller_manager/load_controller
/pr2_controller_manager/reload_controller_libraries
/pr2_controller_manager/switch_controller
/pr2_controller_manager/unload_controller
/pr2_etherCAT/halt_motors
/pr2_etherCAT/publish_trace
/pr2_etherCAT/reset_motors
/realtime_loop/change_control_type
/realtime_loop/change_force_PID_FFJ0 - FFJ2 ... This service exists for every actuator and allows to set the values of the force PID filter in every motor board.
/realtime_loop/change_motor_system_controls
/realtime_loop/nullify_demand
/realtime_loop/reset_motor_FFJ0 This service exists for every actuator and allows to reset the microcontroller in every motor board.
/rf_kinematics/get_fk
/rf_kinematics/get_fk_solver_info
/rf_kinematics/get_ik
/rf_kinematics/get_ik_solver_info
/rf_kinematics/tf_frames