ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You could have a look at this node, which does something similar for kinect data. You should be able to take the general idea and adapt it to your needs with only color images instead of kinect data: https://github.com/SharedAutonomyToolkit/shared_autonomy_perception/blob/hydro-devel/assemble_kinect/src/assemble_kinect.cpp
The .srv
file used in for this node is here: https://github.com/SharedAutonomyToolkit/shared_autonomy_perception/blob/hydro-devel/shared_autonomy_msgs/srv/KinectAssembly.srv
I'm not saying this is the best solution, but maybe it helps.
2 | No.2 Revision |
You could have a look at this node, which does something similar for kinect data. You should be able to take the general idea and adapt it to your needs with only color images instead of kinect data: https://github.com/SharedAutonomyToolkit/shared_autonomy_perception/blob/hydro-devel/assemble_kinect/src/assemble_kinect.cpp
The .srv
file used in for this node is here: https://github.com/SharedAutonomyToolkit/shared_autonomy_perception/blob/hydro-devel/shared_autonomy_msgs/srv/KinectAssembly.srv
I'm not saying this is the best solution, but maybe it helps.
Edit:
In response to your clarification of what you want to do: You could build a node along the following lines:
std_msgs/String
) with which you tell your node to store the current image as the first image. In the callback you copy the one member variable to the otherFor help on converting between ROS image messages and OpenCV images, see http://wiki.ros.org/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages