Skip to content

Commit

Permalink
Style: add comments to member functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
WiseL00k committed Dec 15, 2024
1 parent 620fa81 commit 0ad2ffe
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
38 changes: 28 additions & 10 deletions include/hero_chassis_controller/hero_chassis_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,44 @@ class HeroChassisController : public controller_interface::Controller<hardware_i
tf::TransformListener tf_listener_;
geometry_msgs::Vector3Stamped global_vel, base_vel;
/**
* \brief Callback from /cmd_vel subscriber for setpoint
* \brief Callback from /cmd_vel subscriber
*/
void set_chassis_state(const geometry_msgs::Twist::ConstPtr& msg);

/**
* \brief update each wheel velocity for current_vel
*/
void get_wheel_vel();

/**
* \brief update each wheel velocity for target_vel
*/
void calc_wheel_vel();

/**
* \brief update current_chassis_vel
*/
void calc_chassis_vel();

/**
* \brief control chassis
*/
void chassis_control();

/**
* \brief update odometry
*/
void compute_odometry();

/**
* \brief odometry publish /odom and update transform
*/
void updateOdometry();

/**
* \brief chassis acceleration control
*/
void simple_acceleration_planner();

/**
* \brief state publish
*/
void controller_state_publish();

/**
* \brief chassis power limit
*/
void powerLimit();
}; /* hero_chassis_controller */

Expand Down
1 change: 1 addition & 0 deletions src/hero_chassis_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ void HeroChassisController::update(const ros::Time& time, const ros::Duration& p
current_time = time;
period_ = period;

// avoid loss of control due to lack of command
if ((current_time - last_cmd_vel_stamp_).toSec() > timeout_)
{
Vx_target = 0.;
Expand Down

0 comments on commit 0ad2ffe

Please sign in to comment.