mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-10 11:39:49 +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)
|
if(image)
|
||||||
{
|
{
|
||||||
UTimer processTimer;
|
UTimer processTimer;
|
||||||
rtabmap::SMState * smState = kpThreatment.process(image);
|
rtabmap::SMState * smState = new rtabmap::SMState(image);
|
||||||
|
kpThreatment.process(smState);
|
||||||
double processTime = processTimer.ticks();
|
double processTime = processTimer.ticks();
|
||||||
if(smState)
|
if(smState)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,6 +62,13 @@ int main(int argc, char** argv)
|
|||||||
ROS_INFO("Publishing vel");
|
ROS_INFO("Publishing vel");
|
||||||
rosPublisher.publish(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();
|
ros::spinOnce();
|
||||||
loop_rate.sleep();
|
loop_rate.sleep();
|
||||||
|
|||||||
Reference in New Issue
Block a user