ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

JonPortugal's profile - activity

2014-07-20 20:57:28 -0500 received badge  Famous Question (source)
2014-06-11 14:24:58 -0500 received badge  Notable Question (source)
2014-06-08 01:56:42 -0500 received badge  Popular Question (source)
2014-06-07 17:23:35 -0500 answered a question Can i call a callback funcion on my main funcion?

Because i wanted to call the function even if it had no new data... But i understood already that spinOnce is my only and best option!

2014-06-07 16:37:19 -0500 asked a question Can i call a callback funcion on my main funcion?

Hi,

I'm a noob at ros but i'm trying to do some school work. I have a cameraCallback funcion and it is subscribed as "// Setup camera subscriber ros::Subscriber sub_cam = nh.subscribe(robot_name+"/camera_front/image_raw", 1, cameraCallback);"

Now, i need to call only the funtion cameraCallback, withouth calling ros::spinOnce. Can anyone tell me how to do it? cameraCallback function if defined like this: "void cameraCallback(const sensor_msgs::ImageConstPtr& msg){}" and i can't call it on my main, with "cameraCallback(&msg);"

Any answer will be helpfull. Thanks in advance