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

Turtlebot2 keyboard_teleop.launch doesnt work

asked 2022-04-10 15:06:29 -0600

distro gravatar image

updated 2022-04-10 15:09:45 -0600

Turtlebot2 keyboard teleop does not launch, I have no clue why. Here is launch file for keyboard_teleop.

  <!-- turtlebot_teleop_key already has its own built in velocity smoother -->
  <node pkg="turtlebot_teleop" type="turtlebot_teleop_key" name="turtlebot_teleop_keyboard"  output="screen">
    <param name="scale_linear" value="0.5" type="double"/>
    <param name="scale_angular" value="1.5" type="double"/>
    <remap from="turtlebot_teleop_keyboard/cmd_vel" to="cmd_vel_mux/input/teleop"/>
  </node>
</launch>

It runs but when I inout the commands, "i,u,j...etc" the robot doesnt move

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-04-11 21:40:24 -0600

distro gravatar image

updated 2022-04-11 21:40:58 -0600

@Asad775889 This is what I get when I launch bring up and teleop and rostopic list

/cmd_vel_mux/input/teleop
/diagnostics
/diagnostics_agg
/diagnostics_toplevel_state
/joint_states
/laptop_charge
/rosout
/rosout_agg
/tf
/tf_static

I rostopic hz /cmd_vel_mux/input/teleop

turtlebot@CPR-TBT-1415:~$ rostopic hz /cmd_vel_mux/input/teleop
subscribed to [/cmd_vel_mux/input/teleop]
average rate: 9.935
    min: 0.101s max: 0.101s std dev: 0.00006s window: 9
average rate: 9.933
    min: 0.100s max: 0.101s std dev: 0.00016s window: 19
average rate: 9.934
    min: 0.100s max: 0.101s std dev: 0.00017s window: 29
average rate: 9.938

In the teleop terminal when I input speed commands from keyboard, I get results, the robot doesn't move but I get velocities.

Control Your Turtlebot!
---------------------------
Moving around:
   u    i    o
   j    k    l
   m    ,    .

q/z : increase/decrease max speeds by 10%
w/x : increase/decrease only linear speed by 10%
e/c : increase/decrease only angular speed by 10%
space key, k : force stop
anything else : stop smoothly

CTRL-C to quit

currently:  speed 0.502833998218    turn 2.85311670611 
currently:  speed 0.55311739804 turn 2.85311670611 
currently:  speed 0.608429137844    turn 2.85311670611 
currently:  speed 0.669272051629    turn 2.85311670611 
currently:  speed 0.736199256791    turn 2.85311670611 
currently:  speed 0.809819182471    turn 2.85311670611 
currently:  speed 0.890801100718    turn 2.85311670611

This is my rqt_graph RQT_graph(http://)

edit flag offensive delete link more

Comments

1

What I can conclude from these images that may be something is wrong with your hardware. This was once happened and it was an issue with the hardware. https://emanual.robotis.com/docs/en/p..., 3.3.1 section , test the turtlebot3 , this is what it looks like in turtlebot3 , not sure about turtlebot2, try testing your hardware. because apparently, it look fine as far as ROS is concerned.

Asad775889 gravatar image Asad775889  ( 2022-04-12 04:11:08 -0600 )edit
0

answered 2022-04-11 03:38:35 -0600

Asad775889 gravatar image

This launch file doesn't work alone. You need to launch other required files as well. such as in turtlebot3 ,you have to run, roslaunch turtlebot3_bringup turtlebot3_robot.launch. if you can further elaborate your workflow then it might be helpful since this snippet alone shows nothing,

edit flag offensive delete link more

Comments

@Asad775889 I already do that, that's not the problem.

distro gravatar image distro  ( 2022-04-11 03:40:58 -0600 )edit

@Asad775889 Not sure what you mean by work flow, as in,what shows up in my terminal when I run files?

distro gravatar image distro  ( 2022-04-11 03:42:03 -0600 )edit

Yes please. and echo topic list, and specially look what cmd_vel topic is publishing.

Asad775889 gravatar image Asad775889  ( 2022-04-11 04:55:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-04-10 15:06:29 -0600

Seen: 247 times

Last updated: Apr 11 '22