ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

teleop_twist_keyboard in launch file has no output

asked 2020-04-05 03:08:23 -0500

PeterB gravatar image

I'm trying to start the teleop_twist_keyboard node from within a launch file. I'm following the explanation at the bottom of this page:

And this is my launch file:

  <group ns="turtlesim">
    <node pkg="turtlesim" name="sim" type="turtlesim_node"/>
  <node pkg="teleop_twist_keyboard" name="keyboard" type="">
    <remap from="cmd_vel" to="turtlesim/cmd_vel"/>

It looks like this is launched correctly, however, I can't see the output of the teleop node and I'm not able to control the turtle.

Is there anything specific I should do to use the component? I'm guessing that roslaunch is not 'forwarding' my keyboard input to the right node, but I have no idea how to solve this.

update: I'm pretty new to ROS, so after investigating the topics and graph, it turns out I wasn't properly remapping the topic. This version of the teleop_twist_keyboard works, but I still don't have any output by the teleop_twist_keyboard node

  <node pkg="teleop_twist_keyboard" name="keyboard" type="">
    <remap from="/cmd_vel" to="/turtlesim/turtle1/cmd_vel"/>

So, still my question is, how can I have the teleop node output its text in the launch window.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-05 06:00:19 -0500

gvdhoorn gravatar image

So, still my question is, how can I have the teleop node output its text in the launch window.

If with "launch window" you are referring to the terminal window in which you've started roslaunch, and you're only looking to have teleop_twist_keyboard print its stdout into that terminal window, then I believe it should be sufficient to add the output="screen" attribute to your node element.

See also the roslaunch/XML/node documentation.

edit flag offensive delete link more


Awesome, that's exactly what I was looking for.

PeterB gravatar image PeterB  ( 2020-04-05 10:56:51 -0500 )edit

Question Tools

1 follower


Asked: 2020-04-05 02:53:52 -0500

Seen: 1,201 times

Last updated: Apr 05 '20