Why roslaunch couldn't show the ROS_INFO message?
node_test.cpp
#include "ros/ros.h"
int main(int argc, char **argv)
{
//ROS的初始化
ros::init(argc, argv, "basic_node");
ROS_INFO("%s","Hello World!!");
//讓ROS進入無窮迴圈,但能進行事件處理
ros::spin();
return 0;
}
basic.launch
<launch>
<node pkg="basic_node" name="basic" type="basicNode"/>
</launch>
Just run is ok:
sam@/home/sam/code/ros/node/basic_node$ ./bin/basicNode
[ INFO] [1316858268.471014429]: Hello World!!
Why I run with roslaunch is not ok?
sam@/home/sam/code/ros/node/basic_node$ roslaunch basic_node basic.launch
... logging to /home/sam/.ros/log/afeaec82-e691-11e0-9f34-20cf30a2382f/roslaunch-sam-Syst em-Product-Name-11412.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://sam-System-Product-Name:41031/
SUMMARY
========
PARAMETERS
* /rosversion
* /rosdistro
NODES
/
basic (basic_node/basicNode)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[basic-1]: started with pid [11430]
How to show message on roslaunch?
Thank you~