Porblem Publishing Sonar and IR Data
Hi all,
Not sure what's the matter here. If I use rostopic list, when my publisher has advertises Sonar messages I see /Sonar in the list. However if I try just the IR data it sometimes works most of the time not. The ad code is simply:
// Sonar Range Test
/* bool publish_sonar = true;
n.param("publish_sonar", publish_sonar, publish_sonar);
ros::Publisher sonar_pub;
if(publish_sonar)
{
sonar_pub = n.advertise<sensor_msgs::Range>("Sonar", 1000);
}
*/ // IR Range Test
bool publish_ir = true;
n.param("publish_ir", publish_ir, publish_ir);
ros::Publisher ir_pub;
if(ir_pub)
{
ir_pub = n.advertise<sensor_msgs::Range>("InfraRed", 1000);
}
Any suggestions would me v welcome - I want my node to publish both at the end of the day. The TF for both works fine.
Many Thanks
Mark