3 #include <geometry_msgs/msg/point_stamped.hpp>
4 #include <geometry_msgs/msg/quaternion_stamped.hpp>
5 #include <geometry_msgs/msg/vector3_stamped.hpp>
6 #include <rclcpp/rclcpp.hpp>
8 #include <mujoco/mjdata.h>
9 #include <mujoco/mjmodel.h>
10 #include <mujoco/mjtnum.h>
11 #include <mujoco/mjvisualize.h>
13 #include <mujoco_ros_utils/msg/scalar_stamped.hpp>
58 void reset(
const mjModel * m,
int plugin_id);
65 void compute(
const mjModel * m, mjData * d,
int plugin_id);
81 const std::string & frame_id,
82 const std::string & topic_name,
99 rclcpp::Node::SharedPtr
nh_;
102 rclcpp::PublisherBase::SharedPtr
pub_;
Plugin to publish sensor data.
std::string topic_name_
Topic name.
rclcpp::Node::SharedPtr nh_
ROS node handle.
SensorPublisher(SensorPublisher &&)=default
Copy constructor.
int publish_skip_
Iteration interval to skip ROS publish.
static void RegisterPlugin()
Register plugin.
static SensorPublisher * Create(const mjModel *m, mjData *d, int plugin_id)
Create an instance.
int sim_cnt_
Iteration count of simulation.
MessageType msg_type_
Type of ROS message.
std::string frame_id_
Frame ID of message header.
enum MujocoRosUtils::SensorPublisher::MessageType_ MessageType
Type of ROS message.
rclcpp::PublisherBase::SharedPtr pub_
ROS publisher.
void reset(const mjModel *m, int plugin_id)
Reset.
void compute(const mjModel *m, mjData *d, int plugin_id)
Compute.
MessageType_
Type of ROS message.
@ MsgQuaternion
Quaternion.