Tutorials: launch file problem
I'm a new user of Linux and ROS. I'm running the Groovy on Ubuntu 12.04. I meet some problems with the tutorials on roslaunch. Using the launch file turtlemimic.launch:
<launch>
<group ns="turtlesim1">
<node pkg="turtlesim" name="sim" type="turtlesim_node"/>
</group>
<group ns="turtlesim2">
<node pkg="turtlesim" name="sim" type="turtlesim_node"/>
</group>
<node pkg="turtlesim" name="mimic" type="mimic">
<remap from="input" to="turtlesim1/turtle1"/>
<remap from="output" to="turtlesim2/turtle1"/>
</node>
</launch>
After running the launch file, I can get two turtlesims started. Command
$ rostopic pub /turtlesim1/turtle1/command_velocity turtlesim/Velocity -r 1 -- 2.0 -1.8
also allowed me to control the two turtles moving in circles. But after I ran the command
$ rosrun rqt_graph rqt_graph
the result shows as followed:
/turtlesim1/turtle1/pose /turtlesim2/turtle1/command_velocity
/turtlesim1/sim --------------------------> /mimic--------------------> /turtlesim2/sim
This is different from the one in tutorials:
/turtle1/command_velocity
teleop_turtle----------------------->
/turtle1/command_velocity /turtlesim
rostopic....------------------------>
I don't know whether it's the problem of my setting or not. The result I got makes more sense to me. I also tried to add several lines in the launch file:
<node pkg="turtlesim" name="tele" type="turtle_teleop_key">
<remap from="output" to="turtlesim1/turtle1"/>
</node>
But I still can't control the turtle using keyboard. I checked the node information of "tele", the results are:
Node [/tele]
Publications:
* /rosout [rosgraph_msgs/Log]
* /turtle1/command_velocity [turtlesim/Velocity]
Subscriptions: None
Services:
* /tele/get_loggers
* /tele/set_logger_level
contacting node htt p://localhost:36452/ ...
Pid: 9285
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
Can anyone tell me what's happening? Thanks in advance.
It seems that I can't comment under your answer. Thank you very much for you help. It works. It also helps me to better understand how nodes communicate with each other. I have never edit ROS wiki before, I will try later.