def _set_motor_velocities(self, vel):
pos = self._sensor_readings[MOTOR_POSITIONS].copy()
pos += vel * self._hyperparams['dt']
msg = Float32()
if not USE_F32:
msg.header.stamp = rospy.rostime.get_rostime()
if self._hyperparams['constraint']:
pos = self._constraint.find_nearest_valid_values(pos)
for i in range(12):
msg.data = min(max(0, ((0.95 - pos[i]) / 0.009)), 45)
self._motor_pubs[i].publish(msg)
agent_superball.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录