ros-drivers / rosserial

A ROS client library for small, embedded devices, such as Arduino. See: http://wiki.ros.org/rosserial
517 stars 525 forks source link

Rosserial Vector3 deserialize error with stm32 #558

Open powermanwxy opened 3 years ago

powermanwxy commented 3 years ago

Hi guys!

I'm using rosserial_stm32 with my stm32 board. I've tested other kind of message subscriber such as std_msgs::Int8, sensor_msgs::imu, it all worked fine.

However, I failed on subscribe geometry_msgs\Twist on the stm32. After some reseach, I found it's relvant with the Vector3 deserialization. When I send Twist from my PC rostopic pub -r 1 /publish_cmd geometry_msgs/TwistStamped '{twist:{linear: {x: 10, y: 10, z: 10}, angular: {x: 10.1, y: 10.11, z: 10.1}}}', the stm32 received something very small numbers.

WeChat Screenshot_20210411180720

I'm using Ubuntu 18.04 with ros-melodic. I tried manually complied the rosserial package from the latest source, it still failed. I think it might relvant with https://github.com/ros-drivers/rosserial/issues/150 and https://github.com/ros-drivers/rosserial/pull/144/files.

Please let me know if there's anything I could do.

Thanks guys.