This package enables teleoperation between the 4DOF leader with the haptic wrist and the 7DOF follower. While this is a ros package, communication between WAMs does not use ros, and instead uses UDP. Ros is only used to publish the state of arm for easier data collection, and is not intended to receive any incoming messages or services to control the arm.
Place this package in <catkin_ws>/src/.
By default, this package builds the leader and follower node. If you only wish to build the follower node you can configure this from the command line:
catkin_make --cmake-args -DBUILD_LEADER=OFF or set the option to OFF in CMakeLists.txt:
option(BUILD_LEADER "Build leader executable" OFF)To build the leader node, the haptic_wrist library is required as a dependency, build and install instructions can be found here.
config/ contains the Barrett configuration files for the leader and follower.
You can set the correct config file by using source scripts/setup_leader.sh and source scripts/setup_follower.sh. These will set the env variable BARRETT_CONFIG_FILE to the correct path.
You may need to modify the bus port in config/leader.conf and config/follower.conf depending on the can interface. Note that these environment variables only persist for the current terminal session.
Each node has the same command line options:
rosrun wam_teleop leader [remoteHost] [recPort] [sendPort]
rosrun wam_teleop follower [remoteHost] [recPort] [sendPort]Use -h or --help to see options description.
Start the master node with: roscore.
In a separate terminal session, start the leader:
source scripts/leader.sh
rosrun wam_teleop leader 127.0.0.1 5555 5554In another separate terminal session, start the follower:
source scripts/follower.sh
rosrun wam_teleop follower 127.0.0.1 5554 5555Note the matching recPort and sendPort between leader and follower, that is, the leader receives on 5555 and the follower sends on 5555 and vice versa.
Once both nodes have started:
- On the leader use
lto go to the sync position. - On the follower use
lto go to the sync position. Ensure both arms have reached the sync position before continuing. - Press enter to link leader
- Press enter to link follower
The arm is now ready for user teleoperation.
To turn off, it is recommended to go through the following procedure to ensure proper thread and socket cleanup.
- Return both wams to home position
- On the leader, press
xto exit the loop. - Shift idle the leader
- Repeat for follower. Press
xto exit the loop - Shift idle the follower