Plugin to apply external force.
More...
#include <ExternalForce.h>
|
| ExternalForce (const mjModel *m, mjData *d, int body_id, const std::string &topic_name, mjtNum vis_scale) |
| Constructor. More...
|
|
void | callback (const mujoco_ros_utils::msg::ExternalForce::SharedPtr msg) |
| Constructor. More...
|
|
|
rclcpp::Node::SharedPtr | nh_ |
| ROS node handle. More...
|
|
rclcpp::executors::SingleThreadedExecutor::SharedPtr | executor_ |
| ROS callback queue. More...
|
|
rclcpp::Subscription< mujoco_ros_utils::msg::ExternalForce >::SharedPtr | sub_ |
| ROS publisher for external force. More...
|
|
int | body_id_ = -1 |
| Body ID. More...
|
|
std::string | topic_name_ |
| Topic name of external force. More...
|
|
std::shared_ptr< mujoco_ros_utils::msg::ExternalForce > | msg_ |
| External force message. More...
|
|
mjtNum | end_time_ = -1 |
| End time to apply external force (-1 if no external force is applied) More...
|
|
mjtNum | vis_scale_ |
| Arrow length scale (negative value for no visualization) More...
|
|
Plugin to apply external force.
Definition at line 17 of file ExternalForce.h.
◆ ExternalForce() [1/2]
MujocoRosUtils::ExternalForce::ExternalForce |
( |
ExternalForce && |
| ) |
|
|
default |
◆ ExternalForce() [2/2]
MujocoRosUtils::ExternalForce::ExternalForce |
( |
const mjModel * |
m, |
|
|
mjData * |
d, |
|
|
int |
body_id, |
|
|
const std::string & |
topic_name, |
|
|
mjtNum |
vis_scale |
|
) |
| |
|
protected |
Constructor.
- Parameters
-
m | model |
d | data |
body_id | body ID |
topic_name | topic name of external force |
vis_scale | arrow length scale |
Definition at line 112 of file ExternalForce.cpp.
◆ callback()
void MujocoRosUtils::ExternalForce::callback |
( |
const mujoco_ros_utils::msg::ExternalForce::SharedPtr |
msg | ) |
|
|
protected |
◆ compute()
void MujocoRosUtils::ExternalForce::compute |
( |
const mjModel * |
m, |
|
|
mjData * |
d, |
|
|
int |
plugin_id |
|
) |
| |
Compute.
- Parameters
-
m | model |
d | data |
plugin_id | plugin ID |
Definition at line 147 of file ExternalForce.cpp.
◆ Create()
ExternalForce * MujocoRosUtils::ExternalForce::Create |
( |
const mjModel * |
m, |
|
|
mjData * |
d, |
|
|
int |
plugin_id |
|
) |
| |
|
static |
Create an instance.
- Parameters
-
m | model |
d | data |
plugin_id | plugin ID |
Definition at line 74 of file ExternalForce.cpp.
◆ RegisterPlugin()
MujocoRosUtils::ExternalForce::RegisterPlugin |
( |
| ) |
|
|
static |
◆ reset()
void MujocoRosUtils::ExternalForce::reset |
( |
const mjModel * |
m, |
|
|
int |
plugin_id |
|
) |
| |
◆ visualize()
void MujocoRosUtils::ExternalForce::visualize |
( |
const mjModel * |
m, |
|
|
mjData * |
d, |
|
|
const mjvOption * |
opt, |
|
|
mjvScene * |
scn, |
|
|
int |
plugin_id |
|
) |
| |
Visualize.
- Parameters
-
m | model |
d | data |
opt | visualization option |
scn | rendering scene |
plugin_id | plugin ID |
Definition at line 193 of file ExternalForce.cpp.
◆ body_id_
int MujocoRosUtils::ExternalForce::body_id_ = -1 |
|
protected |
◆ end_time_
mjtNum MujocoRosUtils::ExternalForce::end_time_ = -1 |
|
protected |
End time to apply external force (-1 if no external force is applied)
Definition at line 91 of file ExternalForce.h.
◆ executor_
rclcpp::executors::SingleThreadedExecutor::SharedPtr MujocoRosUtils::ExternalForce::executor_ |
|
protected |
◆ msg_
std::shared_ptr<mujoco_ros_utils::msg::ExternalForce> MujocoRosUtils::ExternalForce::msg_ |
|
protected |
◆ nh_
rclcpp::Node::SharedPtr MujocoRosUtils::ExternalForce::nh_ |
|
protected |
◆ sub_
rclcpp::Subscription<mujoco_ros_utils::msg::ExternalForce>::SharedPtr MujocoRosUtils::ExternalForce::sub_ |
|
protected |
◆ topic_name_
std::string MujocoRosUtils::ExternalForce::topic_name_ |
|
protected |
◆ vis_scale_
mjtNum MujocoRosUtils::ExternalForce::vis_scale_ |
|
protected |
Arrow length scale (negative value for no visualization)
Definition at line 94 of file ExternalForce.h.
The documentation for this class was generated from the following files:
- /home/runner/work/MujocoRosUtils/MujocoRosUtils/colcon_ws/src/isri-aist/MujocoRosUtils/plugin/ExternalForce.h
- /home/runner/work/MujocoRosUtils/MujocoRosUtils/colcon_ws/src/isri-aist/MujocoRosUtils/plugin/ExternalForce.cpp
- /home/runner/work/MujocoRosUtils/MujocoRosUtils/colcon_ws/src/isri-aist/MujocoRosUtils/plugin/Plugin.cpp