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

Turtlebot3 is not operating by keyboard

asked 2022-06-02 10:55:54 -0500

SHIVAM gravatar image

updated 2022-06-07 04:01:13 -0500

Joe28965 gravatar image

Hello everyone,

I am trying run the Turtlrbot3, every command is running and I gave the command roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch. It is also working and while pressing the keys "wadx", it is showing:

Control Your TurtleBot3!
---------------------------
Moving around:
        w
   a    s    d
        x

w/x : increase/decrease linear velocity (Burger : ~ 0.22, Waffle and Waffle Pi : ~ 0.26)
a/d : increase/decrease angular velocity (Burger : ~ 2.84, Waffle and Waffle Pi : ~ 1.82)

space key, s : force stop

CTRL-C to quit

currently:  linear vel -0.08000000000000006  angular vel 0.2999999999999998 
currently:  linear vel -0.09000000000000005  angular vel 0.2999999999999998

But, Turtlebot3 is not moving I checked the rosnode as well:

bajpaism@AEEM-EISASH-2:~$ rosnode list
/rosout
/turtlebot3_core
/turtlebot3_diagnostics
/turtlebot3_lds
/turtlebot3_teleop_keyboard
bajpaism@AEEM-EISASH-2:~$ rosnode info /turtlebot3_lds
--------------------------------------------------------------------------------
Node [/turtlebot3_lds]
Publications: 
 * /rosout [rosgraph_msgs/Log]
 * /rpms [std_msgs/UInt16]
 * /scan [sensor_msgs/LaserScan]

Subscriptions: None

Services: 
 * /turtlebot3_lds/get_loggers
 * /turtlebot3_lds/set_logger_level


contacting node http://192.168.0.161:40985/ ...
Pid: 3302
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound (41417 - 192.168.0.140:52426) [14]
    * transport: TCPROS
 * topic: /scan
    * to: /turtlebot3_diagnostics
    * direction: outbound (41417 - 192.168.0.161:54646) [16]
    * transport: TCPROS

bajpaism@AEEM-EISASH-2:~$ rosnode info /turtlebot3_teleop_keyboard
--------------------------------------------------------------------------------
Node [/turtlebot3_teleop_keyboard]
Publications: 
 * /cmd_vel [geometry_msgs/Twist]
 * /rosout [rosgraph_msgs/Log]

Subscriptions: None

Services: 
 * /turtlebot3_teleop_keyboard/get_loggers
 * /turtlebot3_teleop_keyboard/set_logger_level


contacting node http://AEEM-EISASH-2:36001/ ...
Pid: 59767
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound (35653 - 127.0.0.1:52838) [9]
    * transport: TCPROS

There is no subscriptions for /turtlebot3_lds and /turtlebot3_teleop_keyboard

I am using Ubuntu 20.04 and Noetic ROS. Kindly help me as soon as possible please.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-06-07 04:12:07 -0500

Joe28965 gravatar image

turtlebot3_teleop_keyboard does not have a subscriber, that's true. Its input doesn't come from a topic, but your keyboard. It then publishes that input on a topic. What subscriber would you expect?

Same for turtlebot3_lds. It's the driver for your Laser Distance Sensor (lidar). It gets its data from the physical lidar and publishes it on a topic. Again, what subscriber would you expect?

Couple things you could check.

  1. Do you run the turtlebot bringup command ON the raspberry pi (either via ssh, or startup script, or by having a physical keyboard/monitor connected to the raspberry)? If not, that's your issue. It sends to motor commands via the USB to the OpenCR board. If you run it on your laptop, it can't send the commands via USB to the board, since the board isn't connected to your laptop.

  2. Does it work when you run teleop on the raspberry (via ssh, or by a physical keyboard/monitor connected to the raspberry)? If it does, there's an issue in your ROS connection over multiple computers.

  3. Do the motors move when pressing either of the 2 buttons (SW1 or SW2) on the OpenCR board? If not, then the firmware on your OpenCR board isn't installed properly. Scroll to the top of the link I provided and redo the installation guide.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-06-02 10:55:54 -0500

Seen: 535 times

Last updated: Jun 07 '22