Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using deprecated jsk_topic_tools/log_utils.h #1470

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions jsk_topic_tools/src/connection_based_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ namespace jsk_topic_tools
bool use_multithread;
ros::param::param<bool>("~use_multithread_callback", use_multithread, true);
if (use_multithread) {
JSK_NODELET_DEBUG("use multithread callback");
NODELET_DEBUG("use multithread callback");
nh_.reset (new ros::NodeHandle (getMTNodeHandle ()));
pnh_.reset (new ros::NodeHandle (getMTPrivateNodeHandle ()));
} else {
JSK_NODELET_DEBUG("use singlethread callback");
NODELET_DEBUG("use singlethread callback");
nh_.reset (new ros::NodeHandle (getNodeHandle ()));
pnh_.reset (new ros::NodeHandle (getPrivateNodeHandle ()));
}
Expand Down Expand Up @@ -78,14 +78,14 @@ namespace jsk_topic_tools
void ConnectionBasedNodelet::warnNeverSubscribedCallback(const ros::WallTimerEvent& event)
{
if (!ever_subscribed_) {
JSK_NODELET_WARN("'%s' subscribes topics only with child subscribers.", nodelet::Nodelet::getName().c_str());
NODELET_WARN("'%s' subscribes topics only with child subscribers.", nodelet::Nodelet::getName().c_str());
}
}

void ConnectionBasedNodelet::connectionCallback(const ros::SingleSubscriberPublisher& pub)
{
if (verbose_connection_) {
JSK_NODELET_INFO("New connection or disconnection is detected");
NODELET_INFO("New connection or disconnection is detected");
}
if (!always_subscribe_) {
boost::mutex::scoped_lock lock(connection_mutex_);
Expand All @@ -97,7 +97,7 @@ namespace jsk_topic_tools
}
if (connection_status_ != SUBSCRIBED) {
if (verbose_connection_) {
JSK_NODELET_INFO("Subscribe input topics");
NODELET_INFO("Subscribe input topics");
}
subscribe();
connection_status_ = SUBSCRIBED;
Expand All @@ -107,7 +107,7 @@ namespace jsk_topic_tools
}
if (connection_status_ == SUBSCRIBED) {
if (verbose_connection_) {
JSK_NODELET_INFO("Unsubscribe input topics");
NODELET_INFO("Unsubscribe input topics");
}
unsubscribe();
connection_status_ = NOT_SUBSCRIBED;
Expand All @@ -119,7 +119,7 @@ namespace jsk_topic_tools
const image_transport::SingleSubscriberPublisher& pub)
{
if (verbose_connection_) {
JSK_NODELET_INFO("New image connection or disconnection is detected");
NODELET_INFO("New image connection or disconnection is detected");
}
if (!always_subscribe_) {
boost::mutex::scoped_lock lock(connection_mutex_);
Expand All @@ -131,7 +131,7 @@ namespace jsk_topic_tools
}
if (connection_status_ != SUBSCRIBED) {
if (verbose_connection_) {
JSK_NODELET_INFO("Subscribe input topics");
NODELET_INFO("Subscribe input topics");
}
subscribe();
connection_status_ = SUBSCRIBED;
Expand All @@ -141,7 +141,7 @@ namespace jsk_topic_tools
}
if (connection_status_ == SUBSCRIBED) {
if (verbose_connection_) {
JSK_NODELET_INFO("Unsubscribe input topics");
NODELET_INFO("Unsubscribe input topics");
}
unsubscribe();
connection_status_ = NOT_SUBSCRIBED;
Expand All @@ -164,7 +164,7 @@ namespace jsk_topic_tools
void ConnectionBasedNodelet::cameraConnectionBaseCallback()
{
if (verbose_connection_) {
JSK_NODELET_INFO("New image connection or disconnection is detected");
NODELET_INFO("New image connection or disconnection is detected");
}
if (!always_subscribe_) {
boost::mutex::scoped_lock lock(connection_mutex_);
Expand All @@ -176,7 +176,7 @@ namespace jsk_topic_tools
}
if (connection_status_ != SUBSCRIBED) {
if (verbose_connection_) {
JSK_NODELET_INFO("Subscribe input topics");
NODELET_INFO("Subscribe input topics");
}
subscribe();
connection_status_ = SUBSCRIBED;
Expand All @@ -186,7 +186,7 @@ namespace jsk_topic_tools
}
if (connection_status_ == SUBSCRIBED) {
if (verbose_connection_) {
JSK_NODELET_INFO("Unsubscribe input topics");
NODELET_INFO("Unsubscribe input topics");
}
unsubscribe();
connection_status_ = NOT_SUBSCRIBED;
Expand Down
2 changes: 1 addition & 1 deletion jsk_topic_tools/src/deprecated_relay_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace jsk_topic_tools
void DeprecatedRelay::inputCallback(
const boost::shared_ptr<topic_tools::ShapeShifter const>& msg)
{
JSK_NODELET_WARN(
NODELET_WARN(
"%s is deprecated", pub_.getTopic().c_str());
Relay::inputCallback(msg);
}
Expand Down
28 changes: 14 additions & 14 deletions jsk_topic_tools/src/standalone_complexed_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int main(int argc, char** argv)
private_nh.param(root_name, nodelets_values, nodelets_values);
if (nodelets_values.getType() == XmlRpc::XmlRpcValue::TypeArray) {
for (size_t i_nodelet = 0; i_nodelet < nodelets_values.size(); i_nodelet++) {
JSK_ROS_INFO("i_nodelet %lu", i_nodelet);
ROS_INFO("i_nodelet %lu", i_nodelet);
XmlRpc::XmlRpcValue onenodelet_param = nodelets_values[i_nodelet];
if (onenodelet_param.getType() == XmlRpc::XmlRpcValue::TypeStruct) {
std::string name, type;
Expand All @@ -96,14 +96,14 @@ int main(int argc, char** argv)
name = nh.resolveName((std::string)onenodelet_param["name"]);
}
else {
JSK_ROS_FATAL("element ~nodelets should have name field");
ROS_FATAL("element ~nodelets should have name field");
return 1;
}
if (onenodelet_param.hasMember("type")) {
type = (std::string)onenodelet_param["type"];
}
else {
JSK_ROS_FATAL("element ~nodelets should have type field");
ROS_FATAL("element ~nodelets should have type field");
return 1;
}
if (onenodelet_param.hasMember("remappings")) {
Expand Down Expand Up @@ -132,51 +132,51 @@ int main(int argc, char** argv)
ros::NodeHandle nodelet_nh = ros::NodeHandle(parentName(name));
to = nodelet_nh.resolveName(to);
}
JSK_ROS_INFO("remapping: %s => %s", from.c_str(), to.c_str());
ROS_INFO("remapping: %s => %s", from.c_str(), to.c_str());
remappings[from] = to;
}
else {
JSK_ROS_FATAL("remappings parameter requires from and to fields");
ROS_FATAL("remappings parameter requires from and to fields");
return 1;
}
}
else {
JSK_ROS_FATAL("remappings should be an array");
ROS_FATAL("remappings should be an array");
return 1;
}
}
}
else {
JSK_ROS_FATAL("remappings should be an array");
ROS_FATAL("remappings should be an array");
return 1;
}
}
// Done reading parmaeter for one nodelet

if (!manager.load(name, type, remappings, my_argv)) {
JSK_ROS_ERROR("Failed to load nodelet [%s -- %s]", name.c_str(), type.c_str());
ROS_ERROR("Failed to load nodelet [%s -- %s]", name.c_str(), type.c_str());
}
else {
JSK_ROS_INFO("Succeeded to load nodelet [%s -- %s]", name.c_str(), type.c_str());
ROS_INFO("Succeeded to load nodelet [%s -- %s]", name.c_str(), type.c_str());
}
}
else {
JSK_ROS_FATAL("element ~nodelets should be a dictionay");
ROS_FATAL("element ~nodelets should be a dictionay");
return 1;
}
}
}
else {
JSK_ROS_FATAL("~nodelets should be a list");
ROS_FATAL("~nodelets should be a list");
return 1;
}
}
}
JSK_ROS_INFO("done reading parmaeters");
ROS_INFO("done reading parmaeters");
std::vector<std::string> loaded_nodelets = manager.listLoadedNodelets();
JSK_ROS_INFO("loaded nodelets: %lu", loaded_nodelets.size());
ROS_INFO("loaded nodelets: %lu", loaded_nodelets.size());
for (size_t i = 0; i < loaded_nodelets.size(); i++) {
JSK_ROS_INFO("loaded nodelet: %s", loaded_nodelets[i].c_str());
ROS_INFO("loaded nodelet: %s", loaded_nodelets[i].c_str());
}
ros::spin();
return 0;
Expand Down