On Thu, Apr 22, 2010 at 5:52 PM, Dan
Lazewatsky
<lazewatskyd@cse.wustl.edu>
wrote:
Hi
all -
I have a cvMat that I'm trying to send out in a ROS message, but I'm
having some issues getting it to work right.
My message definition is: float64[9] mat
I'm loading data into the message as follows:
myMessage h_m;
for(int j=0; j<3;++j){
for(int k=0; k<3; ++k){
h_m.mat[j+k*3] = cvmGet(&_h, j, k);
}
}
No errors here, but when I look at the data from a subscriber (or using
rostopic echo), but numbers are wrong. Numbers that should be in the
range of 0-10 end up in 10^6-10^-5. I've tried creating a
std_msgs::Float64 and casting to a Float64 first, neither of which
worked. I'm at a bit of a loss as to what's going on. Any help would be
appreciated.
Thanks,
-Dan
_______________________________________________
ros-users mailing list
ros-users@code.ros.org
https://code.ros.org/mailman/listinfo/ros-users