How to convert Float 64 to Double?
Hi I have the following plugin: I like to subscribe to a ROS node which gives me the reset_frequency data (in Float 64) which by default has a value of 2.0. However when compiling, I receive this error:
Error:
invalid use of member ‘gazebo::ParticleShooterPlugin::reset_frequency’ in static member function
reset_frequency= msg->data/1.0
/home/ntu-saab_uwr/uuvsim_ws/src/particle_shooter/particle_shooter/src/particle_shooter_plugin_modify.cpp:323:28: note: declared here
double reset_frequency = 2.0;
Code:
......
void particle_callback(const std_msgs::Float64::ConstPtr& msg)
{
reset_frequency= msg->data;
}
......
double reset_frequency = 2.0;
May I Know how to solve this Problem?
Mh you are asking something like:
???