clever.launch: change log formatting (#175)

* clever.launch: Add node name to output format

* selfcheck: Use new log format

* aruco_pose, clever: Remove node names from messages

* aruco_pose, clever: Use nodelet-aware rosconsole macros

* clever.launch: Use logger name instead of node name

* clever.launch: change rosconsole format a little
This commit is contained in:
Alexey Rogachevskiy
2019-09-06 17:47:31 +03:00
committed by Oleg Kalachev
parent fb5f8e5078
commit 50739a3ea8
7 changed files with 41 additions and 38 deletions

View File

@@ -315,7 +315,7 @@ int main(int argc, char **argv)
timer = nh.createTimer(ros::Duration(0), &proceed, false, false);
ROS_INFO("led: ready");
ROS_INFO("ready");
notify("startup");
ros::spin();
}

View File

@@ -80,7 +80,7 @@ private:
flow_.distance = -1; // no distance sensor available
flow_.temperature = 0;
ROS_INFO("Optical Flow initialized");
NODELET_INFO("Optical Flow initialized");
}
void parseCameraInfo(const sensor_msgs::CameraInfoConstPtr &cinfo) {

View File

@@ -226,7 +226,7 @@ bool getTelemetry(GetTelemetry::Request& req, GetTelemetry::Response& res)
res.pitch = pitch;
res.roll = roll;
} catch (const tf2::TransformException& e) {
ROS_DEBUG("simple_offboard: %s", e.what());
ROS_DEBUG("%s", e.what());
}
if (!TIMEOUT(velocity, velocity_timeout)) {
@@ -273,7 +273,7 @@ void offboardAndArm()
if (state.mode != "OFFBOARD") {
auto start = ros::Time::now();
ROS_INFO("simple_offboard: switch to OFFBOARD");
ROS_INFO("switch to OFFBOARD");
static mavros_msgs::SetMode sm;
sm.request.custom_mode = "OFFBOARD";
@@ -298,7 +298,7 @@ void offboardAndArm()
if (!state.armed) {
ros::Time start = ros::Time::now();
ROS_INFO("simple_offboard: arming");
ROS_INFO("arming");
mavros_msgs::CommandBool srv;
srv.request.value = true;
if (!arming.call(srv)) {
@@ -398,7 +398,7 @@ void publish(const ros::Time stamp)
}
} catch (const tf2::TransformException& e) {
ROS_WARN_THROTTLE(10, "simple_offboard: can't transform");
ROS_WARN_THROTTLE(10, "can't transform");
}
if (setpoint_type == NAVIGATE || setpoint_type == NAVIGATE_GLOBAL) {
@@ -669,7 +669,7 @@ bool serve(enum setpoint_type_t sp_type, float x, float y, float z, float vx, fl
} catch (const std::exception& e) {
message = e.what();
ROS_INFO("simple_offboard: %s", message.c_str());
ROS_INFO("%s", message.c_str());
busy = false;
return true;
}
@@ -745,7 +745,7 @@ bool land(std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
} catch (const std::exception& e) {
res.message = e.what();
ROS_INFO("simple_offboard: %s", e.what());
ROS_INFO("%s", e.what());
busy = false;
return true;
}
@@ -821,6 +821,6 @@ int main(int argc, char **argv)
position_raw_msg.coordinate_frame = PositionTarget::FRAME_LOCAL_NED;
rates_msg.header.frame_id = fcu_frame;
ROS_INFO("simple_offboard: ready");
ROS_INFO("ready");
ros::spin();
}

View File

@@ -40,7 +40,7 @@ void publishZero(const ros::TimerEvent& e)
if (e.current_real - pose.header.stamp < publish_zero_timout) { // have local position
if (got_local_pos.isZero()) {
ROS_INFO("vpe_publisher: got local position");
ROS_INFO("got local position");
got_local_pos = e.current_real;
}
@@ -50,7 +50,7 @@ void publishZero(const ros::TimerEvent& e)
got_local_pos = ros::Time(0);
}
ROS_INFO_THROTTLE(10, "vpe_publisher: publish zero");
ROS_INFO_THROTTLE(10, "publish zero");
static geometry_msgs::PoseStamped zero;
zero.header.frame_id = local_frame_id;
zero.header.stamp = e.current_real;
@@ -91,7 +91,7 @@ void callback(const T& msg)
// offset.header.frame_id = vpe.header.frame_id;
offset.child_frame_id = offset_frame_id;
br.sendTransform(offset);
ROS_INFO("vpe_publisher: offset reset");
ROS_INFO("offset reset");
}
// apply the offset
tf2::doTransform(vpe, vpe, offset);
@@ -102,7 +102,7 @@ void callback(const T& msg)
vpe_pub.publish(vpe);
} catch (const tf2::TransformException& e) {
ROS_WARN_THROTTLE(5, "vpe_publisher: %s", e.what());
ROS_WARN_THROTTLE(5, "%s", e.what());
}
}
@@ -119,9 +119,9 @@ int main(int argc, char **argv) {
offset_timeout = ros::Duration(nh_priv.param("offset_timeout", 3.0));
if (!frame_id.empty()) {
ROS_INFO("vpe_publisher: using data from TF");
ROS_INFO("using data from TF");
} else {
ROS_INFO("vpe_publisher: using data topic");
ROS_INFO("using data topic");
}
auto pose_sub = nh_priv.subscribe<PoseStamped>("pose", 1, &callback);
@@ -139,6 +139,6 @@ int main(int argc, char **argv) {
local_position_sub = nh.subscribe("mavros/local_position/pose", 1, &localPositionCallback);
}
ROS_INFO("vpe_publisher: ready");
ROS_INFO("ready");
ros::spin();
}