agent_superball.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:gps_superball_public 作者: young-geng 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号