terminate called after throwing an instance of ‘GeographicLib::GeographicErr‘

调试robot_localization,运行navsat_transform_node节点时遇到如下错误,大概意思是GPS的LLA坐标在转换为UTM数据的时候,转换的结果超过了理论范围。

terminate called after throwing an instance of 'GeographicLib::GeographicErr'
  what():  Easting 59208.5km not in UTM range for N hemisphere [0km, 1000km]

原因:

排查了下GPS数据发现是正常的,于是去看了看robot_localization源码。发现有个配置参数use_local_cartesian默认是false。当use_local_cartesian=false时,会将LLA数据转换为UTM格式;当use_local_cartesian=true时,会将LLA数据转换为ENU格式。

解决方法:

很简单了,在相应的launch或yaml文件中将use_local_cartesian参数置为true即可。

<node pkg="robot_localization" type="navsat_transform_node" name="navsat" respawn="true">
        
        <param name="use_local_cartesian" value="true"/>

        <remap from="imu/data" to="imu/data" />
        <remap from="gps/fix" to="fix" /> 
        <remap from="odometry/filtered" to="odometry/navsat" />
    </node>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值