当前位置:网站首页>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.
边栏推荐
- Yyds dry goods inventory three JS source code interpretation eventdispatcher
- 企微服务商平台收费接口对接教程
- JVM performance tuning and practical basic theory - Part 1
- MySQL learning records 12jdbc operation transactions
- Research Report on Market Research and investment strategy of microcrystalline graphite materials in China (2022 Edition)
- MySQL learning record 11jdbcstatement object, SQL injection problem and Preparedstatement object
- 游戏解包的危害及资源加密的重要性
- Colorlog结合logging打印有颜色的日志
- swagger设置字段required必填
- leetcode刷题 (5.28) 哈希表
猜你喜欢

Fibonacci sequence

查看局域网中电脑设备

What is CSRF (Cross Site Request Forgery)?

指针进阶---指针数组,数组指针

egg. JS getting started navigation: installation, use and learning

Trying to use is on a network resource that is unavailable

Visual implementation and inspection of visdom

Hungry for 4 years + Ali for 2 years: some conclusions and Thoughts on the road of research and development

synchronized 解决共享带来的问题

目标检测——Pytorch 利用mobilenet系列(v1,v2,v3)搭建yolov4目标检测平台
随机推荐
FairGuard游戏加固:游戏出海热潮下,游戏安全面临新挑战
China vanadium battery Market Research and future prospects report (2022 Edition)
指针进阶---指针数组,数组指针
Analysis of the source code of cocos2d-x for mobile game security (mobile game reverse and protection)
Indentation of tabs and spaces when writing programs for sublime text
Double pointeur en langage C - - modèle classique
移位运算符
[luatos-air551g] 6.2 repair: restart caused by line drawing
The mysqlbinlog command uses
Sort according to a number in a string in a column of CSV file
PC easy to use essential software (used)
CISP-PTE实操练习讲解
Image,cv2读取图片的numpy数组的转换和尺寸resize变化
Sublime text in CONDA environment plt Show cannot pop up the problem of displaying pictures
pytorch训练好的模型在加载和保存过程中的问题
egg. JS getting started navigation: installation, use and learning
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
PLT in Matplotlib tight_ layout()
Cisp-pte practice explanation
ROS编译 调用第三方动态库(xxx.so)