文章目录
前言
不一定全面,未来还需要继续梳理
检索关键词:apply force time ros
1 在gazebo图形界面中进行操作
http://gazebosim.org/tutorials?tut=apply_force_torque&cat=tools_utilities
![]() | ![]() |
---|
2 MATLAB
2.1 mathworks官网
https://www.mathworks.com/help/ros/ug/apply-forces-and-torques-in-gazebo.html
2.2 ROS与Matlab语言入门教程-在Gazebo中应用力和力矩
https://www.ncnynl.com/archives/201909/3314.html
3 ROS ANSWERS
3.1 applying variable body wrench
https://answers.ros.org/question/350700/applying-variable-body-wrench/
3.2 gazebo simulation with payload
https://answers.gazebosim.org/question/23749/gazebo-simulation-with-payload/
3.3 applying a force to a rigid body
https://answers.ros.org/question/11047/applying-a-force-to-a-rigid-body/
4 举个栗子
以turtlebot3为例,程序调用好之后
重新打开一个终端,参考上面的“3.2”输入
rosservice call /gazebo/apply_body_wrench "body_name: 'turtlebot3_burger::base_footprint'
reference_frame: 'turtlebot3_burger::base_footprint'
reference_point: {x: 0.0, y: 0.0, z: 0.0}
wrench:
force: {x: 0.0, y: 1.0, z: 0.0}
torque: {x: 0.0, y: 0.0, z: 0.0}
start_time: {secs: 0, nsecs: 0}
duration: {secs: 5, nsecs: 0}"
rosservice call /gazebo/apply_body_wrench "body_name: 'turtlebot3_burger::base_footprint'
reference_frame: 'world'
reference_point: {x: 0.0, y: 0.0, z: 0.0}
wrench:
force: {x: 0.0, y: 0.0, z: 10.0}
torque: {x: 0.0, y: 0.0, z: 0.0}
start_time: {secs: 0, nsecs: 0}
duration: {secs: 10, nsecs: 0}"
似乎duration里面的nsecs值设为-1的话,就是持续施加力了。
5 会出现的小问题
https://answers.ros.org/question/65077/errors-while-applying-force-on-a-model/