摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- import rospy import math from sensor_msgs.msg import Imu from geometry_msgs.msg import Pose, Quaternion,PoseWithCovarianceStamped import PyKDL def qua... 阅读全文
posted @ 2019-07-09 21:36 anobscureretreat 阅读(3409) 评论(0) 推荐(0)
摘要: 安装: 使用: 阅读全文
posted @ 2019-07-09 21:32 anobscureretreat 阅读(1820) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import rospy import time from common_msgs.msg import alarminfo def talker(): rospy.init_node('NetWorking', anonymous=True) networking_moni... 阅读全文
posted @ 2019-07-09 21:30 anobscureretreat 阅读(413) 评论(0) 推荐(0)
摘要: #! /usr/bin/python import PyKDL import rospy from sensor_msgs.msg import Imu from nav_msgs.msg import Odometry from geometry_msgs.msg import Twist from math import * import threading import os imp... 阅读全文
posted @ 2019-07-09 21:26 anobscureretreat 阅读(2963) 评论(0) 推荐(0)
摘要: import mathmath.asin(x) x : -1 到 1 之间的数值。如果 x 是大于 1,会产生一个错误。 #!/usr/bin/pythonimport math print "asin(0.64) : ", math.asin(0.64)print "asin(0) : ", ma 阅读全文
posted @ 2019-07-09 19:11 anobscureretreat 阅读(361) 评论(0) 推荐(0)
摘要: sudo apt-get install ros-indigo-kdl-parser-py http://debian.2.n7.nabble.com/Bug-913803-python3-pykdl-PyKDL-fails-to-import-tp4418454.htmlhttps://githu 阅读全文
posted @ 2019-07-09 19:09 anobscureretreat 阅读(1333) 评论(0) 推荐(0)
摘要: #coding=utf-8 import matplotlib.pyplot as pltx_data = ['2011','2012','2013','2014','2015','2016','2017']y_data = [58000,60200,63000,71000,84000,90500, 阅读全文
posted @ 2019-07-09 16:19 anobscureretreat 阅读(389) 评论(0) 推荐(0)
摘要: Quaternion.Euler(x,y,z)返回一个绕x轴旋转x度再绕y轴旋转y度再绕z轴旋转z度的Quaternion,因此Quaternion.Euler(0,90,0)返回一个绕y轴旋转90度的旋转操作. Quaternion作用于Vector3的右乘操作(*)返回一个将向量做旋转操作后的向 阅读全文
posted @ 2019-07-09 16:16 anobscureretreat 阅读(919) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python import numpy as npfrom geometry_msgs.msg import Pose, Point, Quaternion, Twistfrom tf.transformations import quaternion_from_eul 阅读全文
posted @ 2019-07-09 16:15 anobscureretreat 阅读(709) 评论(0) 推荐(0)
摘要: import sysimport math w = -0.99114048481x = -0.00530699081719y = 0.00178255140781z = -0.133612662554 r = math.atan2(2*(w*x+y*z),1-2*(x*x+y*y))p = math 阅读全文
posted @ 2019-07-09 16:06 anobscureretreat 阅读(2666) 评论(0) 推荐(0)