diff --git a/README.md b/README.md index ce839a52bba7f9d2e5b5054712443092cbcfabee..69ffda5f5af286c8129e1f0d0758ba5875f44520 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,49 @@ ## Description -The iri_collision_manager project description +This node provides a system to detect and manage collisions using a [bno055 IMU](https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor). + +This node also provides the following configuration files located in [config](./config) directory: + * **params.yaml**: Node default configuration file. + * **bno055.yaml**: IMU default configuration file + +It also provides a [default bno055 calibration file](./calibration/bno055.cal). # ROS Interface ### Topic subscribers - - /**tf** (tf/tfMessage) - - /**tf** (tf/tfMessage) - - ~**imu** (sensor_msgs/Imu.msg) + - /**tf** (tf/tfMessage): Robot tf. + - ~**imu** (sensor_msgs/Imu.msg): Imu input data. ### Parameters - ~**rate** (Double; default: 10.0; min: 0.1; max: 1000) The main node thread loop rate in Hz. +- ~**fixed_frame** (String; default: base_link) Fixed frame id. +- ~**tf_timeout** (Double; default: 0.2; min: 0.1; max: 2.0) Timeout to find a transform. +- ~**err_msg_rate** (Double; default: 0.5; min: 0.1; max: 1.0) Rate to publish error messages. +- ~**collision_acc_th** (Double; default: 9.8; min: 0.1; max: 160.0) Threshold to detect a collision. +- ~**collision_transition_counter_en** (Boolean; default: False) Enable the collision counter. +- ~**collision_counter_limit** (Integer; default: 6; min: 1; max: 30) Number of low acc imu meassures to detect an end of collision. ## Installation +#### External dependencies + +* **bno055_imu_driver**: This is the [bno055 imu driver](https://gitlab.iri.upc.edu/labrobotica/drivers/bno055_imu_driver). To install it run the following commands: + + ```bash + sudo apt install ca-certificates + sudo sh -c 'echo "deb [arch=amd64] https://labrepo.iri.upc.edu/packages $(lsb_release -cs) main" > /etc/apt/sources.list.d/labrobotica_repo.list' + wget -O - https://labrepo.iri.upc.edu/labrobotica_repo.gpg.key | sudo apt-key add - + sudo apt update && sudo apt install iri-bno055-imu-driver-dev + ``` + +* **iri_base_algorithm**: Move to your active workspace, clone [this repository](https://gitlab.iri.upc.edu/labrobotica/ros/iri_core/iri_base_algorithm) and compile your workspace. + +* **iri_bno055_imu_driver**: Move to your active workspace, clone [this repository](https://gitlab.iri.upc.edu/labrobotica/ros/sensors/imu/iri_bno055_imu_driver) and compile your workspace. + +* **iri_bno055_imu_bringup**: Move to your active workspace, clone [this repository](https://gitlab.iri.upc.edu/labrobotica/ros/sensors/imu/iri_bno055_imu_bringup) and compile your workspace. + + +#### Other dependencies + Move to the active workspace: ```bash roscd && cd ../src @@ -34,9 +65,34 @@ catkin_make ## How to use it -- Standalone test +This node provides the following launch files: + +- **node.launch**: Launch file intended to be included by a general launch file. It has the following arguments: + - *node_name*: Node name. + - *config_file*: Node configuration yaml file. + - *imu_topic*: IMU input data topic name to be remaped. + - *output*: Ros node launch output's parameter. + - *launch_prefix*: Ros node launch launch-prefix's parameter. + +- **test.launch**: Launch file for development purpouses. It has the following arguments: + - *collision_config_file*: Node configuration yaml file. + - *imu_topic*: IMU input data topic name to be remaped. + - *output*: Ros node launch output's parameter. + - *launch_prefix*: Ros node launch launch-prefix's parameter. + - *dr*: Boolean to launch rqt_reconfigure. + - *sim_time*: Boolean to set */use_sim_time* parameter. + +- **imu_and_collisions.launch**: General launch file with IMU driver and collision managment. It has the following arguments: + - *collision_config_file*: Collision managment node configuration yaml file. + - *imu_topic*: IMU input data topic name to be remaped. + - *output*: Ros node launch output's parameter. + - *launch_prefix*: Ros node launch launch-prefix's parameter. + - *dr*: Boolean to launch rqt_reconfigure. + - *sim_time*: Boolean to set */use_sim_time* parameter. + - *imu_config_file*: IMU driver node configuration yaml file. + - *imu_calibration_file*: IMU calibration file (not used for raw data mode). - `roslaunch iri_collision_manager test.launch` +- **rosbag_and_rviz.launch**: Launch file for development and debugging purpouses. ## Disclaimer @@ -47,4 +103,4 @@ This package is distributed in the hope that it will be useful, but without any In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages. -You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/> \ No newline at end of file +You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>