当前位置:网站首页>The problem and possible causes of the robot's instantaneous return to the origin of the world coordinate during rviz simulation
The problem and possible causes of the robot's instantaneous return to the origin of the world coordinate during rviz simulation
2022-07-06 08:35:00 【Will_ Ye】
1. Problem
During the simulation , Originally, the robot was normally controlled to move , But suddenly the robot instantly returned to the origin of the world coordinates , Break through all restrictions .
At this time, some variables in the algorithm should be calculated nan
, Then the equation for calculating the velocity uses this band nan
The numerical , And get nan
Value , adopt /cmd_vel
This topic Send it to the robot , Cause the robot to return to the origin in an instant
2. Solution
At this time, you can only reverse check in the code , from cmd_vel
Step by step, check the data of , Set a judgment nan
The sentence of , Slowly check which variable is wrong , as follows :
if(isnan(inter_the[2]))
cout <<"nan appear!"<<endl;
Cause these variables to become nan
There are so many reasons , Many are basic computational logic problems , It's easy to do as long as you locate it , Sometimes, for example, give a function input The variable of has a 0, And this 0 Used as denominator , That's the problem .
This is just right Rviz A possible analysis of an abnormal phenomenon during simulation , I have encountered this problem several times , It's all because of nan As a result of speed , So just find out nan Where you can quickly fix This bug.
边栏推荐
- 从表中名称映射关系修改视频名称
- Pointer advanced --- pointer array, array pointer
- Report on Market Research and investment prospects of China's silver powder industry (2022 Edition)
- 被破解毁掉的国产游戏之光
- Let the bullets fly for a while
- Synchronized solves problems caused by sharing
- What is CSRF (Cross Site Request Forgery)?
- PLT in Matplotlib tight_ layout()
- MySQL learning records 12jdbc operation transactions
- Colorlog combined with logging to print colored logs
猜你喜欢
Beijing invitation media
PC easy to use essential software (used)
Online yaml to CSV tool
角色动画(Character Animation)的现状与趋势
leetcode刷题 (5.28) 哈希表
TCP/IP协议
2022 Inner Mongolia latest construction tower crane (construction special operation) simulation examination question bank and answers
Sublime text in CONDA environment plt Show cannot pop up the problem of displaying pictures
[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]
Chrome浏览器的crash问题
随机推荐
Online yaml to CSV tool
Leetcode question brushing (5.28) hash table
China polyether amine Market Forecast and investment strategy report (2022 Edition)
2022 Inner Mongolia latest water conservancy and hydropower construction safety officer simulation examination questions and answers
hutool优雅解析URL链接并获取参数
Analysis of the source code of cocos2d-x for mobile game security (mobile game reverse and protection)
目标检测——Pytorch 利用mobilenet系列(v1,v2,v3)搭建yolov4目标检测平台
torch建立的网络模型使用torchviz显示
Deep analysis of C language pointer
C language double pointer -- classic question type
704 二分查找
On the inverse order problem of 01 knapsack problem in one-dimensional state
查看局域网中电脑设备
堆排序详解
[2022 Guangdong saim] Lagrange interpolation (multivariate function extreme value divide and conquer NTT)
LDAP Application Section (4) Jenkins Access
Summary of MySQL index failure scenarios
Verrouillage [MySQL]
2022.02.13 - NC002. sort
[cloud native topic -45]:kubesphere cloud Governance - Introduction and overall architecture of enterprise container platform based on kubernetes