Package Summary

Tags No category tags.
Version 0.1.1
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/rm-controls/rm_controllers.git
VCS Type git
VCS Version master
Last Updated 2021-10-19
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

RoboMaster standard robot Chassis controller

Additional Links

No additional links.

Maintainers

  • Qiayuan Liao

Authors

  • Qiayuan Liao

rm_chassis_controllers

Overview

There are four states: raw, follow, gyro and twist. The output torque and speed of each motor of the chassis can be calculated according to the current state of the control, the received speed and pose of the pan/tilt, and the speed and acceleration commands, and the data is returned by the motor to calculate The speed and posture of the chassis are released. The control algorithm involved in the chassis controller is PID algorithm.

Keywords: mecanum, swerve, balance, chassis, ROS, RoboMaster

Hardware interface type

  • JointStateInterface Used to get the position and speed of chassis wheel joint.

  • EffortJointInterface Used to send the torque command of chassis wheel joint.

  • RoboSateInterface Used for high-frequency maintenance of the transformation relationship of changing odom to base_link.

Installation

Installation from Packages

To install all packages from the this repository as Debian packages use

sudo apt-get install ros-noetic-rm-chassis-controllers

Or better, use rosdep:

sudo rosdep install --from-paths src

Building from Source

Dependencies

  • Robot Operating System (ROS) (middleware for robotics),
  • roscpp
  • roslint
  • rm_msgs
  • rm_common
  • pluginlib
  • hardware_interface
  • controller_interface
  • forward_command_controller
  • realtime_tools
  • control_toolbox
  • effort_controllers
  • tf2
  • tf2_geometry_msgs
  • angles
  • imu_sensor_controller
  • robot_localization

Building

  • Build this package with catkin build. Clone the latest version from this repository into your catkin workspace.
catkin_workspace/src
git clone https://github.com/rm-controls/rm_controllers.git
rosdep install --from-paths . --ignore-src
catkin build

Usage

Run the controller with mon launch:

mon launch rm_chassis_controllers load_controllers.launch

Launch files

  • load_controllers.launch: It loads tf, robot_localization and some controllers, robot_state_controller, joint_state_controller and chassis controller are included.

ROS API

Subscribed Topics

The inertial measurement unit data of base command.

  • command (rm_msgs::ChassisCmd)

Set the mode, acceleration, and maximum power of the chassis.

Set the speed of the chassis.

Published Topics

Chassis odometer information (speed, position, covariance).

Parameters

common
  • wheel_radius (double)

Radius of the wheels.

  • wheel_track (double)

The distance between the center of the left and right wheels on the same side.

  • wheel_base (double)

The distance between the center of the front and rear wheels on the same side.

  • twist_angle (double)

Amplitude of twist at twist state.

  • enable_odom_tf (bool, default: true)

Option.If set this param true, it will send Transform from odom to base.

  • twist_covariance_diagonal (double[6])

The diagonal covariance matrix of twist.

  • publish_rate (double, default: 50)

Frequency (in Hz) of publishing Transform.

  • coeff (double)

A coefficient. Adjust this coefficient to reduce the impact of power loss.

  • min_vel (double)

The minimum velocity of chassis joint which is used to calculate the max torque.

  • timeout (double)

Allowed period (in s) between two commands. If the time is exceed this period, the speed of chassis will be set 0.

Balance
  • joint_left_name (string, default: "joint_left")

Left wheel joint name or list of joint names.

  • joint_right_name (string, default: "joint_right")

Right wheel joint name or list of joint names.

  • com_pitch_offset (double, default: 0)

The reduction ratio of pitch.

  • a (double[16])

State space expression.

  • b (double[8])

State space expression.

  • q (double[16])

Weight matrix.

  • r (double[4])

Weight matrix.

Swerve
  • /modules/<module_name>/position (double[2])

The position of module.

  • /modules/<module_name>/pivot/joint (string)

Joint between chassis and privot.

  • /modules/<module_name>/pivot/offset (double)

Angle between the wheel rotation axis and the chassis's Y axis.

  • /modules/<module_name>/wheel/joint (string)

Joint between privot and wheel.

  • /modules/<module_name>/wheel/radius (double)

The radius of wheel.

Controller configuration examples

Complete description

chassis_controller:
    type: rm_chassis_controllers/MecanumController
    publish_rate: 100
    enable_odom_tf: true
    wheel_radius: 0.07625
    left_front:
      joint: "left_front_wheel_joint"
      pid: { p: 0.8, i: 0, d: 0.0, i_max: 0.0, i_min: 0.0, antiwindup: true, publish_state: true }
    right_front:
      joint: "right_front_wheel_joint"
      pid: { p: 0.8, i: 0, d: 0.0, i_max: 0.0, i_min: 0.0, antiwindup: true, publish_state: true }
    left_back:
      joint: "left_back_wheel_joint"
      pid: { p: 0.8, i: 0, d: 0.0, i_max: 0.0, i_min: 0.0, antiwindup: true, publish_state: true }
    right_back:
      joint: "right_back_wheel_joint"
      pid: { p: 0.8, i: 0, d: 0.0, i_max: 0.0, i_min: 0.0, antiwindup: true, publish_state: true }
    twist_covariance_diagonal: [ 0.001, 0.001, 0.001, 0.001, 0.001, 0.001 ]
    wheel_base: 0.395
    wheel_track: 0.374
    power:
      coeff: 0.535
      min_vel: 4.4
    twist_angular: 0.5233
    timeout: 0.1
    pid_follow: { p: 5, i: 0, d: 0.8, i_max: 0.0, i_min: 0.0, antiwindup: true, publish_state: true }

Bugs & Feature Requests

Please report bugs and request features using the Issue Tracker.

CHANGELOG

Changelog for package rm_chassis_controllers

0.1.1 (2021-08-12)

  • Set all version to the same
  • Add license to rm_chassis_controllers and rm_gimbal_controllers source files
  • Remove test_depend of rm_chassis_controllers
  • Merge remote-tracking branch \'alias_memory/metapackage\'
  • Move all files to rm_chassis_controllers/rm_chassis_controllers, prepare for merge
  • Contributors: qiayuan

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

  • launch/load_controllers.launch
      • robot_type [default: $(env ROBOT_TYPE)] — Robot type [standard, hero, engineer]
      • ekf [default: false]
      • odom_tf [default: true]

Messages

No message files found.

Services

No service files found

Recent questions tagged rm_chassis_controllers at answers.ros.org