|
rm_controllers
|
#include <chassis_base.h>


Public Member Functions | |
| ChassisBase ()=default | |
| bool | init (hardware_interface::RobotHW *robot_hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh) override |
| Get and check params for covariances. Setup odometry realtime publisher + odom message constant fields. init odom tf. | |
| void | update (const ros::Time &time, const ros::Duration &period) override |
| Receive real_time command from manual. Execute different action according to current mode. Set necessary params of chassis. Execute power limit. | |
Protected Types | |
| enum | { RAW , FOLLOW , TWIST } |
Protected Member Functions | |
| void | raw () |
| virtual void | follow (const ros::Time &time, const ros::Duration &period) |
| The mode FOLLOW: chassis will follow gimbal. | |
| void | twist (const ros::Time &time, const ros::Duration &period) |
| The mode TWIST: Just moving chassis. | |
| virtual void | moveJoint (const ros::Time &time, const ros::Duration &period)=0 |
| virtual geometry_msgs::Twist | odometry ()=0 |
| void | updateOdom (const ros::Time &time, const ros::Duration &period) |
| Init frame on base_link. Integral vel to current_pos_ and angle. | |
| void | recovery () |
| Set chassis velocity to zero. | |
| void | tfVelToBase (const std::string &from) |
| Transform tf velocity to base link frame. | |
| virtual void | powerLimit () |
| To limit the chassis power according to current power limit. | |
| virtual void | updatePowerStatus () |
| void | cmdChassisCallback (const rm_msgs::ChassisCmdConstPtr &msg) |
| Write current command from rm_msgs::ChassisCmd. | |
| void | cmdVelCallback (const geometry_msgs::Twist::ConstPtr &msg) |
| Write current command from geometry_msgs::Twist. | |
| void | initialize_parameters (ros::NodeHandle &controller_nh) |
| void | slamCallback (const nav_msgs::Odometry::ConstPtr &msg) |
| void | localizationCallback (const geometry_msgs::TransformStamped::ConstPtr &msg) |
| void | capacityCallback (const rm_msgs::PowerManagementSampleAndStatusData::ConstPtr &msg) |
Protected Attributes | |
| rm_control::RobotStateHandle | robot_state_handle_ {} |
| hardware_interface::EffortJointInterface * | effort_joint_interface_ {} |
| std::vector< hardware_interface::JointHandle > | joint_handles_ {} |
| realtime_tools::RealtimeBuffer< Command > | cmd_rt_buffer_ {} |
| realtime_tools::RealtimeBuffer< nav_msgs::Odometry > | slam_rt_buffer_ {} |
| realtime_tools::RealtimeBuffer< geometry_msgs::TransformStamped > | localization_rt_buffer_ {} |
| std::unique_ptr< realtime_tools::RealtimePublisher< nav_msgs::Odometry > > | odom_pub_ |
| std::unique_ptr< realtime_tools::RealtimePublisher< std_msgs::Float64 > > | cpower_pub_ |
| std::unique_ptr< realtime_tools::RealtimePublisher< std_msgs::Float64 > > | epower_pub_ |
| std::unique_ptr< realtime_tools::RealtimePublisher< std_msgs::Float64 > > | chassis_power_pub_ |
| rm_common::TfRtBroadcaster | brcst4global_map2robot_odom_ {} |
| rm_common::TfRtBroadcaster | brcst4global_map2camera_init_ {} |
| rm_common::TfRtBroadcaster | brcst4robot_odom2robot_base_ {} |
| geometry_msgs::TransformStamped | global_map2robot_odom_ {} |
| geometry_msgs::TransformStamped | global_map2camera_init_ {} |
| geometry_msgs::TransformStamped | robot_odom2robot_base_ {} |
| geometry_msgs::TransformStamped | robot_base2lidar_base_ {} |
| tf2::Transform | T_global_map2robot_odom_ {} |
| tf2::Transform | T_robot_odom_2robot_base_ {} |
| tf2::Transform | T_lidar_odom2lidar_base_ {} |
| tf2::Transform | T_robot_base2lidar_base_ {} |
| tf2::Transform | T_global_map2lidar_odom_ {} |
| ros::Subscriber | cmd_vel_sub_ |
| ros::Subscriber | cmd_chassis_sub_ |
| ros::Subscriber | slam_sub_ |
| ros::Subscriber | localization_sub_ |
| ros::Subscriber | capacity_sub_ |
| std::unique_ptr< RampFilter< double > > | ramp_x_ { nullptr } |
| std::unique_ptr< RampFilter< double > > | ramp_y_ { nullptr } |
| std::unique_ptr< RampFilter< double > > | ramp_w_ { nullptr } |
| double | publish_rate_ { 100.0 } |
| bool | publish_map_tf_ { false } |
| bool | publish_odom_tf_ { false } |
| bool | gravity_estimation_offset_ { false } |
| double | roll_ { 0.0 } |
| double | pitch_ { 0.0 } |
| double | yaw_ { 0.0 } |
| double | wheel_radius_ { 0.02 } |
| double | twist_angular_ { M_PI / 6 } |
| double | max_odom_vel_ { 10.0 } |
| double | timeout_ { 0.1 } |
| double | chassis_power_ { 0.0 } |
| bool | capacity_update_flag_ { false } |
| bool | use_rls_ { false } |
| bool | use_K_angle_ { false } |
| bool | odom_initialized_ { false } |
| bool | slam_updated_ { false } |
| bool | localization_updated_ { false } |
| bool | state_changed_ { true } |
| int | state_ { RAW } |
| std::string | follow_source_frame_ {} |
| std::string | command_source_frame_ {} |
| std::string | global_map_frame_id_ { "map" } |
| std::string | robot_odom_frame_id_ { "odom" } |
| std::string | robot_base_frame_id_ { "base_link" } |
| std::string | lidar_base_frame_id_ { "livox_frame" } |
| std::string | slam_topic_ { "/slam/odometry" } |
| std::string | localization_topic_ { "/shinji/result" } |
| std::string | capacity_topic_ { "/rm_referee/power_management/sample_and_status" } |
| ros::Time | last_publish_time_ {} |
| geometry_msgs::Vector3 | vel_cmd_ {} |
| std::array< double, 36 > | twist_covariance_ {} |
| control_toolbox::Pid | pid_follow_ {} |
| Command | cmd_struct_ {} |
| PowerLimitor | wheel_power_limitor_ {} |
|
default |
|
protected |
|
protected |
Write current command from rm_msgs::ChassisCmd.
| msg | This message contains various state parameter settings for basic chassis control |
|
protected |
Write current command from geometry_msgs::Twist.
| msg | This expresses velocity in free space broken into its linear and angular parts. |
|
protectedvirtual |
The mode FOLLOW: chassis will follow gimbal.
The mode FOLLOW: The chassis's direct will follow gimbal's direct all the time.
| time | The current time. |
| period | The time passed since the last call to update. |
|
override |
Get and check params for covariances. Setup odometry realtime publisher + odom message constant fields. init odom tf.
| robot_hw | The robot hardware abstraction. |
| root_nh | A NodeHandle in the root of the controller manager namespace. This is where the ROS interfaces are setup (publishers, subscribers, services). |
| controller_nh | A NodeHandle in the namespace of the controller. This is where the controller-specific configuration resides. |
|
protected |
|
protected |
|
protectedpure virtual |
Implemented in rm_chassis_controllers::BipedalController, and rm_chassis_controllers::OmniController.
|
protectedpure virtual |
|
protectedvirtual |
To limit the chassis power according to current power limit.
Receive power limit from command. Set max_effort command to chassis to avoid exceed power limit.
|
protected |
@briefThe The mode RAW: original state.
The mode raw: original state. Linear velocity will be set zero to stop move.
|
protected |
Set chassis velocity to zero.
|
protected |
|
protected |
Transform tf velocity to base link frame.
| from | The father frame. |
|
protected |
The mode TWIST: Just moving chassis.
The mode TWIST: Chassis will move independent and will not effect by gimbal's move.
| time | The current time. |
| period | The time passed since the last call to update. |
|
override |
Receive real_time command from manual. Execute different action according to current mode. Set necessary params of chassis. Execute power limit.
Receive real_time command from manual and check whether it is normally, if can not receive command from manual for a while, chassis's velocity will be set zero to avoid out of control. Execute different action according to current mode such as RAW, FOLLOW, TWIST.(Their specific usage will be explain in the next). UpdateOdom,Set necessary params such as Acc and vel_tfed. Execute moving action and powerlimit.
| time | The current time. |
| period | The time passed since the last call to update. |
|
protected |
Init frame on base_link. Integral vel to current_pos_ and angle.
| time | The current time. |
| period | The time passed since the last call to update. |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |