mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user