Robotics StackExchange | Archived questions

Turtlebot2 keyboard_teleop.launch doesnt work

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

Asked by distro on 2022-04-10 15:06:29 UTC

Comments

Answers

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,

Asked by Asad775889 on 2022-04-11 03:38:35 UTC

Comments

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

Asked by distro on 2022-04-11 03:40:58 UTC

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

Asked by distro on 2022-04-11 03:42:03 UTC

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

Asked by Asad775889 on 2022-04-11 04:55:16 UTC

@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://)

Asked by distro on 2022-04-11 21:40:24 UTC

Comments

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/platform/turtlebot3/opencr_setup/#opencr-setup, 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.

Asked by Asad775889 on 2022-04-12 04:11:08 UTC