|
MFCPP
1.0
|
Corentin Chauvin-Hameau – 2019-2020
|
|
Coverage Path Planning for an underwater robot surveying a marine farm
|
|
Robot simulator. More...
#include <robot_simulator.hpp>

Public Member Functions | |
| RobotSimulator () | |
| ~RobotSimulator () | |
| void | init_node () |
| Initialise the node and its parameters. More... | |
| void | run_node () |
| Run the simulator. More... | |
| void | disp_state () |
| Display the current state. More... | |
Private Member Functions | |
| void | control_input_cb (const mf_robot_simulator::Command::ConstPtr &msg) |
| Callback for the control input. More... | |
| void | cart_input_cb (const mf_robot_simulator::CartesianCommand::ConstPtr &msg) |
| Callback for the debug cartesian control input. More... | |
| void | pose_input_cb (const geometry_msgs::Pose::ConstPtr &msg) |
| Callback for setting the pose. More... | |
| void | update_state (float dt) |
| Updates the robot state by integrating the ODE. More... | |
| void | publish_state () |
| Publishes the robot state. More... | |
Private Attributes | |
| ros::NodeHandle | nh_ |
| ROS node handler. More... | |
| ros::Subscriber | control_input_sub_ |
| ROS subscriber for the control input. More... | |
| ros::Subscriber | cart_input_sub_ |
| ROS subscriber for the debug cartesian control input. More... | |
| ros::Subscriber | pose_input_sub_ |
| ROS subscriber for setting the pose. More... | |
| ros::Publisher | odom_pub_ |
| ROS publisher for the odometry output. More... | |
| ros::Publisher | state_pub_ |
| ROS publisher for the current state. More... | |
| ros::Publisher | rviz_pub_ |
| ROS publisher for rviz markers. More... | |
| tf2_ros::TransformBroadcaster | tf_br_ |
| Tf broadcaster. More... | |
| RobotModel | robot_model_ |
| Robot model. More... | |
| RobotModel::state_type | state_ |
| Current state of the robot. More... | |
| RobotModel::input_type | input_ |
| Current control input. More... | |
| std::vector< float > | cart_input_ |
| Current debug cartesian control input. More... | |
ROS parameters | |
| float | update_freq_ |
| State update frequency. More... | |
| std::string | fixed_frame_ |
| Frame in which the pose is expressed. More... | |
| std::string | robot_frame_ |
| Frame of the robot. More... | |
| float | robot_length_ |
| Length of the robot (assuming cylindrical shape) More... | |
| float | robot_radius_ |
| Radius of the robot (assuming cylindrical shape) More... | |
| int | nbr_int_steps_ |
| Initial number of integration steps during the update. More... | |
| float | bnd_delta_m_ |
| Bound on delta_m (ballast control) More... | |
| RobotModel::input_type | bnd_input_ |
Robot simulator.
Definition at line 25 of file robot_simulator.hpp.
| mfcpp::RobotSimulator::RobotSimulator | ( | ) |
Definition at line 30 of file robot_simulator.cpp.
| mfcpp::RobotSimulator::~RobotSimulator | ( | ) |
Definition at line 37 of file robot_simulator.cpp.
|
private |
Callback for the debug cartesian control input.
| Cartesian | speed input |
Definition at line 124 of file robot_simulator.cpp.
|
private |
Callback for the control input.
| Control | input |
Definition at line 110 of file robot_simulator.cpp.
| void mfcpp::RobotSimulator::disp_state | ( | ) |
Display the current state.
Definition at line 99 of file robot_simulator.cpp.
| void mfcpp::RobotSimulator::init_node | ( | ) |
Initialise the node and its parameters.
Definition at line 43 of file robot_simulator.cpp.
|
private |
Callback for setting the pose.
| msg | Pose in fixed frame |
Definition at line 132 of file robot_simulator.cpp.
|
private |
Publishes the robot state.
Definition at line 162 of file robot_simulator.cpp.
| void mfcpp::RobotSimulator::run_node | ( | ) |
Run the simulator.
Definition at line 79 of file robot_simulator.cpp.
|
private |
Updates the robot state by integrating the ODE.
| dt | Duration of the update |
Definition at line 144 of file robot_simulator.cpp.
|
private |
Bound on delta_m (ballast control)
Definition at line 69 of file robot_simulator.hpp.
|
private |
Bounds on the control input
Definition at line 70 of file robot_simulator.hpp.
|
private |
Current debug cartesian control input.
Definition at line 59 of file robot_simulator.hpp.
|
private |
ROS subscriber for the debug cartesian control input.
Definition at line 49 of file robot_simulator.hpp.
|
private |
ROS subscriber for the control input.
Definition at line 48 of file robot_simulator.hpp.
|
private |
Frame in which the pose is expressed.
Definition at line 64 of file robot_simulator.hpp.
|
private |
Current control input.
Definition at line 58 of file robot_simulator.hpp.
|
private |
Initial number of integration steps during the update.
Definition at line 68 of file robot_simulator.hpp.
|
private |
ROS node handler.
Definition at line 47 of file robot_simulator.hpp.
|
private |
ROS publisher for the odometry output.
Definition at line 51 of file robot_simulator.hpp.
|
private |
ROS subscriber for setting the pose.
Definition at line 50 of file robot_simulator.hpp.
|
private |
Frame of the robot.
Definition at line 65 of file robot_simulator.hpp.
|
private |
Length of the robot (assuming cylindrical shape)
Definition at line 66 of file robot_simulator.hpp.
|
private |
Robot model.
Definition at line 56 of file robot_simulator.hpp.
|
private |
Radius of the robot (assuming cylindrical shape)
Definition at line 67 of file robot_simulator.hpp.
|
private |
ROS publisher for rviz markers.
Definition at line 53 of file robot_simulator.hpp.
|
private |
Current state of the robot.
Definition at line 57 of file robot_simulator.hpp.
|
private |
ROS publisher for the current state.
Definition at line 52 of file robot_simulator.hpp.
|
private |
Tf broadcaster.
Definition at line 54 of file robot_simulator.hpp.
|
private |
State update frequency.
Definition at line 63 of file robot_simulator.hpp.
1.8.11