当前位置:网站首页>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.
边栏推荐
- String to leading 0
- JVM 快速入门
- Hungry for 4 years + Ali for 2 years: some conclusions and Thoughts on the road of research and development
- Zhong Xuegao, who cannot be melted, cannot escape the life cycle of online celebrity products
- China's high purity aluminum target market status and investment forecast report (2022 Edition)
- 被破解毁掉的国产游戏之光
- 个人电脑好用必备软件(使用过)
- 【Nvidia开发板】常见问题集 (不定时更新)
- Yyds dry goods inventory three JS source code interpretation eventdispatcher
- [MySQL] log
猜你喜欢

软件卸载时遇到trying to use is on a network resource that is unavailable

JS inheritance method

Screenshot in win10 system, win+prtsc save location

sublime text中conda环境中plt.show无法弹出显示图片的问题

What is CSRF (Cross Site Request Forgery)?

704 二分查找

【MySQL】锁

Trying to use is on a network resource that is unavailable

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

Process of obtaining the electronic version of academic qualifications of xuexin.com
随机推荐
深度剖析C语言数据在内存中的存储
3. File operation 3-with
Modify the video name from the name mapping relationship in the table
What is CSRF (Cross Site Request Forgery)?
深度剖析C语言指针
企微服务商平台收费接口对接教程
torch建立的网络模型使用torchviz显示
C語言雙指針——經典題型
2022.02.13 - NC002. sort
win10系统中的截图,win+prtSc保存位置
Chrome浏览器的crash问题
Browser thread
egg. JS project deployment online server
2022 Inner Mongolia latest water conservancy and hydropower construction safety officer simulation examination questions and answers
logback1.3. X configuration details and Practice
Golang force buckle leetcode 1020 Number of enclaves
【ROS】usb_cam相机标定
MySQL learning record 11jdbcstatement object, SQL injection problem and Preparedstatement object
化不掉的钟薛高,逃不出网红产品的生命周期
如何进行接口测试测?有哪些注意事项?保姆级解读