From: <jl...@us...> - 2009-01-05 02:22:13
|
Revision: 8824 http://personalrobots.svn.sourceforge.net/personalrobots/?rev=8824&view=rev Author: jleibs Date: 2009-01-05 01:31:58 +0000 (Mon, 05 Jan 2009) Log Message: ----------- Putting the connect failure message into the diagnostic messages. Modified Paths: -------------- pkg/trunk/drivers/laser/hokuyo_node/hokuyo_node.cpp Modified: pkg/trunk/drivers/laser/hokuyo_node/hokuyo_node.cpp =================================================================== --- pkg/trunk/drivers/laser/hokuyo_node/hokuyo_node.cpp 2009-01-05 01:25:39 UTC (rev 8823) +++ pkg/trunk/drivers/laser/hokuyo_node/hokuyo_node.cpp 2009-01-05 01:31:58 UTC (rev 8824) @@ -140,6 +140,7 @@ string frameid_; string device_id_; string device_status_; + string connect_fail_; HokuyoNode() : ros::node("hokuyo"), running_(false), count_(0), self_test_(this), diagnostic_(this) { @@ -256,6 +257,8 @@ } catch (hokuyo::Exception& e) { ROS_WARN("Exception thrown while starting urg.\n%s", e.what()); + connect_fail_ = e.what(); + return -1; } @@ -350,7 +353,7 @@ if (!running_) { status.level = 2; - status.message = "Not connected"; + status.message = "Not connected. " + connect_fail_; } else if (device_status_ != std::string("Sensor works well.")) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |