How to assign Vector3 value to Float64
I am trying to assign vector3 value to a Float64 variable as my function accepts Float64 arguments. It gives following error
no match for ‘operator=’ (operand types are ‘std_msgs::Float64’ and ‘geometry_msgs::Vector3_<std::allocator<void> >::_z_type {aka double}’)
My function is of the following form
void calc_cartezian_trajectory(double CT[3][N] , Float64 desX , Float64 desY , Float64 desZ , double initial_pose_end_effector[3])
How can I do that ? Is there anyway I can pass vector3 values as vector3.x as parameters to my function ?
I figured another way out. I passed Vector3 to my function instead of Float64 and it worked. But still a way for type conversion might be helpful.