Go to the documentation of this file.
43 #include <nav_msgs/Odometry.h>
44 #include <tf/tfMessage.h>
181 const std::string& wheel0_name,
182 const std::string& wheel1_name,
183 const std::string& wheel2_name,
184 const std::string& wheel3_name);
192 bool getWheelRadius(
const urdf::ModelInterfaceSharedPtr model,
const urdf::LinkConstSharedPtr& wheel_link,
double& wheel_radius);
double cmd_vel_timeout_
Timeout to consider cmd_vel commands old:
hardware_interface::JointHandle wheel2_jointHandle_
ros::Subscriber sub_command_
SpeedLimiter limiter_linY_
void update(const ros::Time &time, const ros::Duration &period)
Updates controller, i.e. computes the odometry and sets the new velocity commands.
double wheel_separation_y_
void starting(const ros::Time &time)
Starts controller.
The Odometry class handles odometry readings (2D pose and velocity with related timestamp)
size_t wheel_joints_size_
Number of wheel joints:
PLUGINLIB_EXPORT_CLASS(RobotLocalization::EkfNodelet, nodelet::Nodelet)
SpeedLimiter limiter_linX_
hardware_interface::JointHandle wheel3_jointHandle_
bool init(hardware_interface::VelocityJointInterface *hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh)
Initialize controller.
void setupRtPublishersMsg(ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh)
Sets the odometry publishing fields.
void stopping(const ros::Time &time)
Stops controller.
bool setWheelParamsFromUrdf(ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh, const std::string &wheel0_name, const std::string &wheel1_name, const std::string &wheel2_name, const std::string &wheel3_name)
Sets odometry parameters from the URDF, i.e. the wheel radius and separation.
void cmdVelCallback(const geometry_msgs::Twist &command)
Velocity command callback.
bool enable_odom_tf_
Whether to publish odometry to tf or not:
ros::Time last_state_publish_time_
boost::shared_ptr< realtime_tools::RealtimePublisher< nav_msgs::Odometry > > odom_pub_
Odometry related:
double wheel_separation_x_
std::string odom_frame_id_
hardware_interface::JointHandle wheel0_jointHandle_
Hardware handles:
bool getWheelRadius(const urdf::ModelInterfaceSharedPtr model, const urdf::LinkConstSharedPtr &wheel_link, double &wheel_radius)
Get the radius of a given wheel.
std::string base_frame_id_
Frame to use for the robot base:
geometry_msgs::TransformStamped odom_frame_
SpeedLimiter limiter_ang_
void brake()
Brakes the wheels, i.e. sets the velocity to 0.
realtime_tools::RealtimeBuffer< Commands > command_
boost::shared_ptr< realtime_tools::RealtimePublisher< tf::tfMessage > > tf_odom_pub_
bool use_realigned_roller_joints_
Wheel radius (assuming it's the same for the left and right wheels):
ros::Duration publish_period_
Odometry related:
hardware_interface::JointHandle wheel1_jointHandle_