It is implied that you have already created a catkin workspace, cloned this project, installed all required dependencies and built the project.
- Connect the sensor to PC via USB CAN card
- Initialize the Network Interface Card:
Here
$ sudo ip link set <CAN_DEVICE_NAME> up type can bitrate <BITRATE>
<CAN_DEVICE_NAME>
should be replaced by the corresponding name assigned to your CAN card by the system (if a single CAN card is connected to PC, the device name is usually can0, otherwise can be can0, can1, can2...). In order to list all available network interface cards use command:$ ifconfig -a
<BITRATE>
should be replaced by the baudrate of your sensor's CAN card.
In order to launch the sensor node use following command:
$ roslaunch schunk_ft_sensor schunk_ft_sensor_node.launch can_device:=<CAN_DEVICE_NAME> can_node_id:=<NODE_ID>
As described before, <CAN_DEVICE_NAME>
has to be replaced by the proper device name, furthermore, <NODE_ID>
has to be replaced by the CAN node ID of your sensor's CAN card.
- node_name A name for the ROS node (default is schunk_ft_sensor). Will be used as namespace for the topics and services.
- calibration Number of the calibration slot for the values of calibration matrix (refer to the sensor's manual, default is 0, allowed values are 0...15).
- sample_count Number of data samples read before calculating the average value and publishing to the ROS topic (default value is 50, allowed values are 1...65536). The publishing rate of the ROS topic is inversely proportional to the value of this parameter.
- silence_limit Sensor's "silence" duration limit in seconds (default is 0.1). If sensor does not send response to a data request within specified time, an error will be thrown with corresponding notification via ROS topic, sensor reading will be terminated.
After a successful launch you will get a ROS node with a name specified by the node_name argument in previous step and some topics and services in the corresponding namespace.
- /<node_name>
- /<node_name>/sensor_data Sensor data will be published on this topic. The publishing rate is limited by the PC's computational power and the used baudrate, as well as divided by sample_count parameter. As such, publishing is done without any specific rate or "as fast as possible".
- /<node_name>/failure Any critical failure will be published on this topic followed by interface shutdown.
- /<node_name>/reset_bias Calling this service will treat current measurement values of the sensor as bias and set measurement values to zero until they are changed. Does not require any parameter.
- Move robot arm manually using
rqt_joint_trajectory_controller
. First need to init only right armrosservice call /arm_right/driver/init "{}"
.In order to connect with Care-O-Bot4-25export ROS_MASTER_URI=http://10.4.25.11:11311
and CAN-ID would be set to can2.