What should i do when facing " Terminate called after throwing an instance of 'std::runtime_error' "
My goal is build autonomous mobile robot. everything is work fine for at least 40 minutes. then the error messege appear.
Terminate called after throwing an instance of 'std::runtime_error' what(): Duration is out of dual 32-bit range
Terminate called after throwing an instance of 'std::runtime_error' what(): Duration is out of dual 32-bit range
from my experience the error consistenly appear when the system is running for long time. in terminal i can see that the crash one is rviz and move base, please check my image for detail
im using lsc lidar, amcl, wheel python odometry, teb planner, ekf filter, imu sensor, ros melodic, raspberry 4b 8gb
here my launch file:
<?xml version="1.0"?>
<launch>
<arg name="map_file" default="$(find mobile_robot_autonomous_navigation)/maps/asem_e.yaml"/>
<arg name="model" default="$(find mobile_robot_autonomous_navigation)/urdf/mobile_robot.urdf.xacro"/>
<param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" >
</node>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find mobile_robot_autonomous_navigation)/config/nav_config_teb.rviz"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" >
</node>
<include file="$(find lsc_ros_driver)/launch/lsc_c25_launch.launch"/>
<include file="$(find imu_bno055)/launch/imu.launch"/>
<include file="$(find robot_odom)/launch/robot_odom.launch"/>
<include file="$(find mobile_robot_autonomous_navigation)/launch/amcl.launch" />
<include file="$(find mobile_robot_autonomous_navigation)/launch/move_base.launch" />
here my move base:
<?xml version="1.0"?>
<launch>
<!--<arg name="base_global_planner" default="navfn/NavfnROS"/>-->
<arg name="base_global_planner" default="global_planner/GlobalPlanner"/>
<!--<arg name="base_local_planner" default="dwa_local_planner/DWAPlannerROS"/>-->
<arg name="base_local_planner" default="teb_local_planner/TebLocalPlannerROS"/>
<node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen">
<param name="base_global_planner" value="$(arg base_global_planner)"/>-
<param name="base_local_planner" value="$(arg base_local_planner)"/>
<param name="planner_frequency" value="3.0" />
<!--<rosparam file="$(find mobile_robot_autonomous_navigation)/config/planner.yaml" command="load"/> -->
<rosparam file="$(find mobile_robot_autonomous_navigation)/config/base_local_planner_params_teb.yaml" command="load"/>
<rosparam file="$(find mobile_robot_autonomous_navigation)/config/common_costmap.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find mobile_robot_autonomous_navigation)/config/common_costmap.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find mobile_robot_autonomous_navigation)/config/local_costmap.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find mobile_robot_autonomous_navigation)/config/global_costmap.yaml" command="load" ns="global_costmap" />
</node>
</launch>
im not sure if the problem caused by limitation of my raspberry because im already limit the rviz fps to only 3fps and the task manager form "top" command only show about 50% of usage
- i thought that because of the rviz crash, so i try to update the open GL (update mesa) but the problem persist
- trying to do sudo apt-get upgrade and sudo apt-get update but the problem persist
- trying to do sudo apt-get dist-upgrade and sudo apt-get update but the problem persist
if you need more data please inform me to give it ASAP.
Asked by frans on 2023-04-12 00:10:14 UTC
Comments
Please do not link to screenshots of text. Instead, you should copy/paste the actual error text into your question.
Asked by Mike Scheutzow on 2023-04-16 09:12:19 UTC
The fact that this crashes rviz and move_base at the same time strongly hints that there is a corrupt message on a topic that both are subscribed to. One thing to investigate is if any of those message types contain a Duration field.
Asked by Mike Scheutzow on 2023-04-16 09:21:14 UTC