[bullet3]固定物体

方法一

利用loadURDF在加载模型时将模型固定

b3RobotSimulatorClientAPI m_robotSim;
m_robotSim.setGuiHelper(m_guiHelper);
bool connected = m_robotSim.connect(mode);
m_robotSim.configureDebugVisualizer(COV_ENABLE_RGB_BUFFER_PREVIEW, 0);
m_robotSim.configureDebugVisualizer(COV_ENABLE_DEPTH_BUFFER_PREVIEW, 0);
m_robotSim.configureDebugVisualizer(COV_ENABLE_SEGMENTATION_MARK_PREVIEW, 0);

b3RobotSimulatorLoadUrdfFileArgs args;
args.m_forceOverrideFixedBase = true;
cubeIndex= m_robotSim.loadURDF("cube.urdf", args);

方法二

利用changeDynamics将模型质量置零

b3RobotSimulatorChangeDynamicsArgs args;
args.m_mass = 0;
m_robotSim.changeDynamics(cubeIndex, -1, args);

方法三

在urdf模型中增加与世界坐标系固连的关节

<link name="world"/>
<joint name="worldJoint" type="fixed">
  <parent link="world"/>
  <child link="linkBase"/>
  <origin rpy="0 0 0" xyz="0 0 0"/>
</joint>

方法四

修改urdf模型中的mass属性为零

<mass value=".0"/>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值