def _set_motor_positions(self, pos):
gain = 1 / 0.009
msg = Float32()
if not USE_F32:
msg.header.stamp = rospy.rostime.get_rostime()
if (pos - 0.95).all() and self._hyperparams['constraint']:
pos = self._constraint.find_nearest_valid_values(pos)
for i in range(12):
msg.data = min(max(7.5, ((0.95 - pos[i]) * gain)), 40)
self._motor_pubs[i].publish(msg)
agent_superball.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录