9 #ifndef ROBOT_SIMULATOR_HPP 10 #define ROBOT_SIMULATOR_HPP 13 #include "mf_robot_simulator/Command.h" 14 #include "mf_robot_simulator/CartesianCommand.h" 15 #include <geometry_msgs/Pose.h> 54 tf2_ros::TransformBroadcaster
tf_br_;
85 void cart_input_cb(
const mf_robot_simulator::CartesianCommand::ConstPtr &
msg);
float update_freq_
State update frequency.
Declaration of physical underwater robot model.
ros::Subscriber pose_input_sub_
ROS subscriber for setting the pose.
void init_node()
Initialise the node and its parameters.
ros::Publisher rviz_pub_
ROS publisher for rviz markers.
void control_input_cb(const mf_robot_simulator::Command::ConstPtr &msg)
Callback for the control input.
void pose_input_cb(const geometry_msgs::Pose::ConstPtr &msg)
Callback for setting the pose.
ros::Subscriber cart_input_sub_
ROS subscriber for the debug cartesian control input.
void run_node()
Run the simulator.
tf2_ros::TransformBroadcaster tf_br_
Tf broadcaster.
std::string fixed_frame_
Frame in which the pose is expressed.
std::vector< double > state_type
Data type of the state.
int nbr_int_steps_
Initial number of integration steps during the update.
ros::Publisher state_pub_
ROS publisher for the current state.
RobotModel::input_type bnd_input_
void cart_input_cb(const mf_robot_simulator::CartesianCommand::ConstPtr &msg)
Callback for the debug cartesian control input.
Class defining the robot model.
RobotModel::state_type state_
Current state of the robot.
std::vector< double > input_type
Data type of the input.
void disp_state()
Display the current state.
void update_state(float dt)
Updates the robot state by integrating the ODE.
float bnd_delta_m_
Bound on delta_m (ballast control)
ros::Publisher odom_pub_
ROS publisher for the odometry output.
float robot_radius_
Radius of the robot (assuming cylindrical shape)
std::vector< float > cart_input_
Current debug cartesian control input.
void publish_state()
Publishes the robot state.
RobotModel robot_model_
Robot model.
ros::Subscriber control_input_sub_
ROS subscriber for the control input.
ros::NodeHandle nh_
ROS node handler.
RobotModel::input_type input_
Current control input.
float robot_length_
Length of the robot (assuming cylindrical shape)
std::string robot_frame_
Frame of the robot.