Problem: Ever since I have installed Conda, ROS does not seem to work. And predictably it is because Conda has changed my Python environment. I run ROS Indigo on Ubuntu 14.04. Can someone guide on how can I use both on my machine? I am willing to mak…
#!/usr/bin/env python import rospy import tf import time from tf.transformations import * from std_msgs.msg import String from geometry_msgs.msg import Pose from geometry_msgs.msg import Quaternion filenm="/opt/bp/tmp" tms= tp_x=0.0 tp_y=0.0 tp_…
#!/usr/bin/env python import rospy import math import sys import commands import yaml from tf import transformations from geometry_msgs.msg import PoseWithCovarianceStamped class PoseSetter(rospy.SubscribeListener): def __init__(self, pose): self.pos…
#!/usr/bin/env python import numpy as npfrom geometry_msgs.msg import Pose, Point, Quaternion, Twistfrom tf.transformations import quaternion_from_euler #orientation x,y,z,w#x=i[3]#y=i[4]#z=i[5]#w=i[6] g=np.array([i[3],i[4],i[5],i[6]]) #position x,y,…
https://answers.ros.org/question/113671/catkin-package-cannot-find-own-message-type-python/ 原因是因为.py和包命名成了相同的名字,改一下其中一个的名字成不一样的即可(吐槽一下,官方教程居然说要命名成一样的,被坑惨了)…
https://www.ncnynl.com/archives/201611/1059.html python的节点需要对节点设置权限为可执行,在.py文件所在的路径执行如下命令 $ touch talker.py #生成文件 $ chmod +x talker.py #设置可执行…
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.asin(2*(w*y-z*z))y = math.atan2(2*(w*z+x*y),1-2*(z*z+y*y)) angleR = r*180/math.piangleP = p*180/mat…
1.打开配置文件 sudo nano /boot/config.txt 打开以下选项 "dtparam=i2c_arm=on" ctrl + o 保存 ctrl + x 退出 2.刷新配置文件 sudo raspi-config 3.打开 I2c选项 4.重启 5.再次运行 参考: https://www.raspberrypi.org/forums/viewtopic.php?t=100189…
0.说明: 对于tensorflow配合keras使用,因为linux服务器没有root权限,所以目前最高可用版本是  1.6.0,否则就会报错某些 so找不到 conda install -n xujiandeeplearning tensorflow==1.6.0 ---------------------------分割线 说明:conda两个概念 环境envs,每个环境下可以安装packages,所以是有两个概念 env 和 package 而且conda可以同时安装python环境,所…
conda: conda update --a pip: pip freeze --local | grep -v '^-e' | cut -d = -f 1 | xargs -n1 sudo pip install -U # 有风险 pip freeze --user --local | grep -v '^-e' | cut -d = -f 1 | xargs -n1 pip install --user -U # 升级用户的包 pip更换源: mkdir -p ~/.config/pip…