cozmo_driver.py 文件源码

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

项目:cozmo_driver 作者: OTL 项目源码 文件源码
def _publish_joint_state(self):
        """
        Publish joint states as JointStates.

        """
        # only publish if we have a subscriber
        if self._joint_state_pub.get_num_connections() == 0:
            return

        js = JointState()
        js.header.stamp = rospy.Time.now()
        js.header.frame_id = 'cozmo'
        js.name = ['head', 'lift']
        js.position = [self._cozmo.head_angle.radians,
                       self._cozmo.lift_height.distance_mm * 0.001]
        js.velocity = [0.0, 0.0]
        js.effort = [0.0, 0.0]
        self._joint_state_pub.publish(js)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号