您当前的位置: 首页 >  ar

RuiH.AI

暂无认证

  • 0浏览

    0关注

    274博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Ceres: conversion from ‘double’ to non-scalar type ‘ceres::Jet<double, 6>’ requested

RuiH.AI 发布时间:2022-01-05 13:16:04 ,浏览量:0

错误日志 使用Ceres Solver,在定义CostFunction时,报错:

error: conversion from ‘int’ to non-scalar type ‘ceres::Jet’ requested

解决方法 Ceres里,变量不是C++内置的double型,而是专属的Ceres::Jet型,因此需要将double强制转换为Ceres::Jet:

template
T var = 0.; // error!
T var = T(0.); // pass.
关注
打赏
1658651101
查看更多评论
立即登录/注册

微信扫码登录

0.2046s