I got this error today.
Problem
[ERROR] [1576785283.032878520]: Client [/rostopic_21515_1576784759002] wants topic /timestamp to have datatype/md5sum std_msgs/Float64MultiArray/4b7d974086d4060e7db4613a7e6c3ba4], but our version has [std_msgs/Float64/fdb28210bfa9d7c91146260178d9a584]. Dropping connection.
What I did is that I wanted to publish a topic with std_msgs::Float64
.
define:
std_msgs::Float64 time_msg;
std::chrono::duration<double> t;
assignment:
time_msg.data = t.count();
time_pub_.publish(time_msg);
Solution
Becuase the error showed that the type of message is error (std_msgs::Float64
-> std_msgs::Float64MultiArray
), so I think the mistake is on t.count()
. It looks like std_msgs::Float64MultiArray
.
I add a type conversion for it.
time_msg.data = (double)t.count();
It does work!!!
Super:)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)