localize by triangle note
1.当拟合结果不为1时,取和上次相近的作为结果
2.python画三角拟合图bug
(3.减小三角拟合波动:对激光雷达数据进行滤波等处理)
(4.在计算三角起始和结束位置时,添加用距离值过滤)
theta:三角角平分线与小车坐标系x轴的夹角,三角位于x轴右侧时夹角为负值,左侧为正值,单位弧度 (衡量小车中心在三角角平分线的左右侧)
beta:三角顶点与小车坐标系x轴的夹角,三角位于x轴右侧时夹角为负值,左侧为正值,单位弧度 (衡量三角顶点在小车头的左右侧)
alpha = triangle_angle_with_axisX - theta:用来度量小车与最终目标方向的偏差程度
rho:是三角到小车中心的距离值
转角 + 车头控制
转角 + 车中心在三角角平分线上 + 转角 + 车头控制
转角 + 车中心在三角角平分线上 + 转角 + 车头控制(车中心检测)
车中心控制法:转角 + 车中心在三角角平分线上 + 转角
线速度为0时,角速度<0.001小车不动,所以没有意义;线速度为0.002时,角速度为0.0005小车有微小转角
TransMsgToCart(): laser_cart_points(0, i) = X0 + range * cos(q);//雷达倒立时添加负号
//:雷达正放和倒放时line1和line2,相反。正:从左向右是line2,line1;倒立:从左向右是line1,line2
//计算两条线的夹角及交点
/*设直线l1、l2的斜率存在,分别为k1、k2,且夹角不是90度,l1到l2的转向角为θ,则tanθ=(k2- k1)/(1+ k1k2)
l1与l2的夹角为θ,则tanθ=∣(k2- k1)/(1+ k1k2)∣. 直线的斜率公式:k=(y2-y1)/(x2-x1)
注意:两直线的夹角指的是两直线所成的小于90°的锐角,显然夹角公式中的“角”并不都是两直线的夹角*/
5.从tf获得欧拉角roll, pitch, yaw
static tf::TransformListener tf_listener;
tf::StampedTransform laser_transform;
try
{
ros::Time now = ros::Time::now();
tf_listener.waitForTransform (frame_id_laser_, now, frame_id_laser_, now, frame_id_agv_, ros::Duration ( 0.05 ) );
tf_listener.lookupTransform(frame_id_agv_, frame_id_laser_, now, laser_transform);
}
catch (tf::TransformException ex)
{
ROS_WARN("handeld tf laser to agv error: %s\n",ex.what());
return;
}
double roll, pitch, yaw;
laser_transform.getBasis().getEulerYPR(yaw, pitch, roll);
6.关于三角正倒立问题
1),不管激光雷达位置如何旋转变化,三角相对激光雷达的位置是固定的,因此把激光点从极坐标转换到激光雷达直角坐标系时不需要考虑雷达的旋转
2),使用python观察激光点从极坐标转换到激光雷达直角坐标系时,注意雷达的坐标系(雷达的旋转),因为python画的直角坐标系是右手坐标系
3),三角位置的计算可在激光雷达坐标系下进行,计算出三角pose后可将该pose转换到机器人坐标系下使用(此时会用到激光雷达的旋转)
localize by triangle note的更多相关文章
- [LeetCode] Pascal's Triangle II 杨辉三角之二
Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3, ...
- Pascal's Triangle II 解答
Question Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Ret ...
- [Swift]LeetCode119. 杨辉三角 II | Pascal's Triangle II
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note t ...
- Inside Triangle
Inside Triangle https://hihocoder.com/contest/hiho225/problem/1 时间限制:10000ms 单点时限:1000ms 内存限制:256MB ...
- leetcode-119-Pascal's Triangle II(生成某一行的帕斯卡三角形)
题目描述: Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle ...
- 119. Pascal's Triangle II (Amazon) from leetcode
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note t ...
- 119. Pascal's Triangle II@python
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note t ...
- [LeetCode] 119. Pascal's Triangle II 杨辉三角之二
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note t ...
- LeetCode 118:杨辉三角 II Pascal's Triangle II
公众号:爱写bug(ID:icodebugs) 作者:爱写bug 给定一个非负索引 k,其中 k ≤ 33,返回杨辉三角的第 k 行. Given a non-negative index k whe ...
随机推荐
- python 3 使用cmp函数报错
python3 中已经不使用cmp函数进行比较大小,使用operator模块 import operator lt(a,b) 相当于 a<b 从第一个数字或字母(ASCII)比大小 le(a,b ...
- HDU 4101 Ali and Baba (思路好题)
与其说这是个博弈,倒不如说是个搜索.这题思路不错,感觉很难把情况考虑周全. 在地图外围填充一圈0,两次BFS,第一次从-1点出发,把从-1到达的0点以及包围0的那一圈石头标记出来.如下图: 1 1 1 ...
- iOS如何隐藏状态栏,包括网络标志、时间标志、电池标志等
我们在开发App的时候,在遇到有状态栏时,NavigationBar上面的按钮,是极难点击的,所以这个时候,最好我们能够人为的隐藏掉状态栏. 如果一直需要隐藏的话,直接在info.plist里面,添加 ...
- PAT 甲级 1011 World Cup Betting
https://pintia.cn/problem-sets/994805342720868352/problems/994805504927186944 With the 2010 FIFA Wor ...
- servlet 图片流
http://www.cnblogs.com/focusj/archive/2011/04/30/2057577.html https://segmentfault.com/q/10100000004 ...
- hdu 3986 Harry Potter and the Final Battle (最短路径)
Harry Potter and the Final Battle Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65536/6553 ...
- P3141 [USACO16FEB]围栏Fenced In_Platinum
题目描述 Farmer John has realized that many of his cows are strangely agoraphobic (being fearful of larg ...
- [BZOJ4205][FJ2015集训] 卡牌配对 [建图+最大流]
题面 这是bzoj权限题,题面可以去下面的离线题库找 离线4205,只有题面,不能提交 思路 二分图匹配 这道题模型显然就是个二分图匹配嘛 那我们两两判断一下然后连边匹配.....就只有30分了 因为 ...
- BZOJ2756 [SCOI2012]奇怪的游戏 【网络流 + 二分】
题目 Blinker最近喜欢上一个奇怪的游戏. 这个游戏在一个 N*M 的棋盘上玩,每个格子有一个数.每次 Blinker 会选择两个相邻 的格子,并使这两个数都加上 1. 现在 Blinker 想知 ...
- python下载链接内容
下面代码下载京东注册码,可接收参数num dir 可以将连接构造成其它网址,比如移动联通网上营业厅的验证码都是固定网址+13位时间戳的结构. #!/usr/bin/python #code utf-8 ...