Go to the documentation of this file.
46 #include <rm_msgs/ChassisCmd.h>
47 #include <geometry_msgs/TwistStamped.h>
48 #include <geometry_msgs/Vector3Stamped.h>
49 #include <nav_msgs/Odometry.h>
60 template <
typename... T>
113 virtual geometry_msgs::Twist
odometry() = 0;
172 std::shared_ptr<realtime_tools::RealtimePublisher<nav_msgs::Odometry> >
odom_pub_;
std::string follow_source_frame_
void twist(const ros::Time &time, const ros::Duration &period)
The mode TWIST: Just moving chassis.
RampFilter< double > * ramp_y_
std::shared_ptr< realtime_tools::RealtimePublisher< nav_msgs::Odometry > > odom_pub_
void update(const ros::Time &time, const ros::Duration &period) override
Receive real_time command from manual. Execute different action according to current mode....
void recovery()
Set chassis velocity to zero.
std::string command_source_frame_
RampFilter< double > * ramp_x_
void follow(const ros::Time &time, const ros::Duration &period)
The mode FOLLOW: chassis will follow gimbal.
geometry_msgs::Vector3 vel_cmd_
hardware_interface::EffortJointInterface * effort_joint_interface_
virtual geometry_msgs::Twist odometry()=0
rm_common::TfRtBroadcaster tf_broadcaster_
void updateOdom(const ros::Time &time, const ros::Duration &period)
Init frame on base_link. Integral vel to pos and angle.
control_toolbox::Pid pid_follow_
tf2::Transform world2odom_
RampFilter< double > * ramp_w_
ros::Subscriber outside_odom_sub_
rm_msgs::ChassisCmd cmd_chassis_
ros::Time last_publish_time_
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 field...
virtual void moveJoint(const ros::Time &time, const ros::Duration &period)=0
void outsideOdomCallback(const nav_msgs::Odometry::ConstPtr &msg)
realtime_tools::RealtimeBuffer< Command > cmd_rt_buffer_
ros::Subscriber cmd_chassis_sub_
void cmdChassisCallback(const rm_msgs::ChassisCmdConstPtr &msg)
Write current command from rm_msgs::ChassisCmd.
void tfVelToBase(const std::string &from)
Transform tf velocity to base link frame.
std::vector< hardware_interface::JointHandle > joint_handles_
rm_control::RobotStateHandle robot_state_handle_
ros::Subscriber cmd_vel_sub_
geometry_msgs::Twist cmd_vel_
geometry_msgs::TransformStamped odom2base_
void cmdVelCallback(const geometry_msgs::Twist::ConstPtr &msg)
Write current command from geometry_msgs::Twist.
realtime_tools::RealtimeBuffer< nav_msgs::Odometry > odom_buffer_
void powerLimit()
To limit the chassis power according to current power limit.