Sending null twist when the core node send no action

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/ros-pkg@314 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2011-08-25 20:24:39 +00:00
parent 3b455408e3
commit 06eb9a2424
2 changed files with 9 additions and 1 deletions
+2 -1
View File
@@ -89,7 +89,8 @@ void imgReceivedCallback(const sensor_msgs::ImageConstPtr & imgMsg)
if(image)
{
UTimer processTimer;
rtabmap::SMState * smState = kpThreatment.process(image);
rtabmap::SMState * smState = new rtabmap::SMState(image);
kpThreatment.process(smState);
double processTime = processTimer.ticks();
if(smState)
{
+7
View File
@@ -62,6 +62,13 @@ int main(int argc, char** argv)
ROS_INFO("Publishing vel");
rosPublisher.publish(vel);
}
else
{
//publish null
geometry_msgs::TwistPtr vel(new geometry_msgs::Twist());
ROS_INFO("Publishing null vel");
rosPublisher.publish(vel);
}
ros::spinOnce();
loop_rate.sleep();