ETHZ-RobotX / SuperMegaBot

Main repository of the SuperMegaBot
20 stars 20 forks source link

Issue with keyboard teleoperation #48

Closed elisaaferraraa closed 4 months ago

elisaaferraraa commented 5 months ago

Goodmorning, While proceeding with the setup for the Summer School, I got stacked with the following problem. I chose the RSS Workspace on a dev container in VS code as option for the software installation. I also installed the VNC as Visualizing GUI. However, when launching the visualisation or the option with the keyboard to teleoperate the robot, both Gazebo and Rviz correctly open and I can visualize the robot in its environment. However, I encounter in both cases the same errors and keyboard teleoperation does not work:

[ERROR] [1719224785.531966521]: PluginlibFactory: The plugin for class 'rviz/GoalPointTool' failed to load.  Error: According to the loaded plugin descriptions the class rviz/GoalPointTool with base class type rviz::Tool does not exist. Declared types are  jsk_rviz_plugin/CloseAll jsk_rviz_plugin/OpenAll jsk_rviz_plugin/OverlayPicker jsk_rviz_plugin/ScreenshotListener rviz/FocusCamera rviz/Interact rviz/Measure rviz/MoveCamera rviz/PublishPoint rviz/Select rviz/SetGoal rviz/SetInitialPose rviz/WaypointTool rviz_plugin_tutorials/PlantFlag

[rospack] Error: no package given
[librospack]: error while executing command
[rospack] Error: no package given
[librospack]: error while executing command

[ERROR] [1719224785.546719469]: PluginlibFactory: The plugin for class 'rviz/ControlPanel' failed to load.  Error: According to the loaded plugin descriptions the class rviz/ControlPanel with base class type rviz::Panel does not exist. Declared types are  jsk_rviz_plugin/CancelAction jsk_rviz_plugin/EmptyServiceCallInterfaceAction jsk_rviz_plugin/ObjectFitOperatorAction jsk_rviz_plugin/PublishTopic jsk_rviz_plugin/RecordAction jsk_rviz_plugin/RobotCommandInterfaceAction jsk_rviz_plugin/SelectPointCloudPublishAction jsk_rviz_plugin/TabletControllerPanel jsk_rviz_plugin/YesNoButton rviz_plugin_tutorials/Teleop smb_navigation_rviz/PlanningPanel

On one side I could not solve this error and on the other one, I cannot find any other problems (subscribers/publishers and overall connections seem to work). I attach also the rqt_graph I obtained when I launched the keyboard teleoperation (_roslaunch smb_gazebo sim.launch launch_gazebo_gui:=true keyboardteleop:=true). Do you have any suggestions on how to solve this problem and make the teleoperation work?

Thank you very much, Elisa

rqt_graph__Teleop

Here is what is outputted on the terminal exactly, in case it could be useful to understand the problem:

robotx ➜ /workspaces/rss_workspace/devel (main) $ roslaunch smb_gazebo sim.launch launch_gazebo_gui:=true keyboard_teleop:=true
... logging to /home/robotx/.ros/log/34a91986-3214-11ef-a2b3-ae0642e8c761/roslaunch-docker-desktop-32179.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://docker-desktop:40979/

SUMMARY
========

PARAMETERS
 * /control/gazebo_ros_control/angular/z/has_acceleration_limits: True
 * /control/gazebo_ros_control/angular/z/has_velocity_limits: True
 * /control/gazebo_ros_control/angular/z/max_acceleration: 0.2
 * /control/gazebo_ros_control/angular/z/max_velocity: 1.0
 * /control/gazebo_ros_control/base_frame_id: base_link
 * /control/gazebo_ros_control/enable_odom_tf: False
 * /control/gazebo_ros_control/estimate_velocity_from_position: False
 * /control/gazebo_ros_control/linear/x/has_acceleration_limits: True
 * /control/gazebo_ros_control/linear/x/has_velocity_limits: True
 * /control/gazebo_ros_control/linear/x/max_acceleration: 0.2
 * /control/gazebo_ros_control/linear/x/max_velocity: 1.0
 * /control/gazebo_ros_control/pid_gains/LF_WHEEL_JOINT/p: 100.0
 * /control/gazebo_ros_control/pid_gains/LH_WHEEL_JOINT/p: 100.0
 * /control/gazebo_ros_control/pid_gains/RF_WHEEL_JOINT/p: 100.0
 * /control/gazebo_ros_control/pid_gains/RH_WHEEL_JOINT/p: 100.0
 * /control/gazebo_ros_control/wheel_radius_multiplier: 1.0
 * /control/gazebo_ros_control/wheel_separation_multiplier: 1.0
 * /control/joint_state_controller/publish_rate: 50
 * /control/joint_state_controller/type: joint_state_contr...
 * /control/joy_teleop/joy_node/autorepeat_rate: 20
 * /control/joy_teleop/joy_node/deadzone: 0.1
 * /control/joy_teleop/joy_node/dev: /dev/input/js0
 * /control/joy_teleop/teleop_twist_joy/axis_angular: 0
 * /control/joy_teleop/teleop_twist_joy/axis_linear: 1
 * /control/joy_teleop/teleop_twist_joy/enable_button: 4
 * /control/joy_teleop/teleop_twist_joy/enable_turbo_button: 5
 * /control/joy_teleop/teleop_twist_joy/scale_angular: 1.2
 * /control/joy_teleop/teleop_twist_joy/scale_angular_turbo: 1.2
 * /control/joy_teleop/teleop_twist_joy/scale_linear: 1.6
 * /control/joy_teleop/teleop_twist_joy/scale_linear_turbo: 1.0
 * /control/smb_diff_drive/angular/z/has_acceleration_limits: True
 * /control/smb_diff_drive/angular/z/has_velocity_limits: True
 * /control/smb_diff_drive/angular/z/max_acceleration: 5.0
 * /control/smb_diff_drive/angular/z/max_velocity: 2.0
 * /control/smb_diff_drive/base_frame_id: base_link
 * /control/smb_diff_drive/cmd_vel_timeout: 0.25
 * /control/smb_diff_drive/enable_odom_tf: False
 * /control/smb_diff_drive/estimate_velocity_from_position: False
 * /control/smb_diff_drive/left_wheel: ['LF_WHEEL_JOINT'...
 * /control/smb_diff_drive/linear/x/has_acceleration_limits: True
 * /control/smb_diff_drive/linear/x/has_velocity_limits: True
 * /control/smb_diff_drive/linear/x/max_acceleration: 5.0
 * /control/smb_diff_drive/linear/x/max_velocity: 2.0
 * /control/smb_diff_drive/pose_covariance_diagonal: [0.001, 0.001, 0....
 * /control/smb_diff_drive/publish_rate: 50
 * /control/smb_diff_drive/right_wheel: ['RF_WHEEL_JOINT'...
 * /control/smb_diff_drive/twist_covariance_diagonal: [0.001, 0.001, 0....
 * /control/smb_diff_drive/type: diff_drive_contro...
 * /control/smb_diff_drive/velocity_rolling_window_size: 2
 * /control/smb_diff_drive/wheel_radius_multiplier: 1.0
 * /control/smb_diff_drive/wheel_separation_multiplier: 1.0
 * /control/smb_robot_state_publisher/publish_frequency: 50
 * /control/smb_robot_state_publisher/use_tf_static: True
 * /control/twist_mux/locks: [{'name': 'e_stop...
 * /control/twist_mux/topics: [{'name': 'RC', '...
 * /gazebo/enable_ros_network: True
 * /gazebo/publishing_time_step: 0.025
 * /rosdistro: noetic
 * /rosversion: 1.16.0
 * /smb_description: <?xml version="1....
 * /use_sim_time: True

NODES
  /
    ekf_restarter (smb_control/ekf_restarter.py)
    ekf_se (robot_localization/ekf_localization_node)
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    pid_controller_node (smb_control/pid_controller_node)
    rviz (rviz/rviz)
    spawn_urdf (gazebo_ros/spawn_model)
  /control/
    controller_spawner (controller_manager/spawner)
    smb_robot_state_publisher (robot_state_publisher/robot_state_publisher)
    twist_mux (twist_mux/twist_mux)
  /control/joy_teleop/
    joy_e_stop_node (smb_control/joy_e_stop_node.py)
    joy_node (joy/joy_node)
    teleop_twist_joy (teleop_twist_joy/teleop_node)
  /control/keyboard_teleop/
    keyboard_teleop (teleop_twist_keyboard/teleop_twist_keyboard.py)

auto-starting new master
process[master]: started with pid [32212]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 34a91986-3214-11ef-a2b3-ae0642e8c761
process[rosout-1]: started with pid [32234]
started core service [/rosout]
process[control/controller_spawner-2]: started with pid [32241]
process[control/smb_robot_state_publisher-3]: started with pid [32246]
process[control/twist_mux-4]: started with pid [32252]
process[pid_controller_node-5]: started with pid [32254]
process[ekf_se-6]: started with pid [32259]
process[control/joy_teleop/joy_node-7]: started with pid [32268]
process[control/joy_teleop/teleop_twist_joy-8]: started with pid [32271]
process[control/joy_teleop/joy_e_stop_node-9]: started with pid [32277]
process[control/keyboard_teleop/keyboard_teleop-10]: started with pid [32283]
process[ekf_restarter-11]: started with pid [32287]
process[gazebo-12]: started with pid [32289]
process[gazebo_gui-13]: started with pid [32294]
process[spawn_urdf-14]: started with pid [32301]
process[rviz-15]: started with pid [32302]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-robotx'
[ INFO] [1719224784.555940749]: rviz version 1.14.25
[ INFO] [1719224784.556007080]: compiled against Qt version 5.12.8
[ INFO] [1719224784.556018653]: compiled against OGRE version 1.9.0 (Ghadamon)
[ERROR] [1719224784.588737494]: Couldn't open joystick /dev/input/js0. Will retry every second.
[ INFO] [1719224784.633523376]: Forcing OpenGl version 0.
[ INFO] [1719224784.644776940]: Odometry data regained, switching to PID control.
[ INFO] [1719224784.832467774]: Stereo is NOT SUPPORTED
[ INFO] [1719224784.832594266]: OpenGL device: llvmpipe (LLVM 12.0.0, 256 bits)
[ INFO] [1719224784.832667829]: OpenGl version: 3.1 (GLSL 1.4).
the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'
[INFO] [1719224784.913210, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1719224785.106819, 0.000000]: Loading model XML from ros parameter smb_description
[INFO] [1719224785.114221, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Wrn] [GuiIface.cc:200] g/gui-plugin is really loading a SystemPlugin. To load a GUI plugin please use --gui-client-plugin 
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[ INFO] [1719224785.257628132]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1719224785.260278994]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.65.6
[ INFO] [1719224785.329719138]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1719224785.332984968]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.65.6
[Msg] Loading world file [/workspaces/rss_workspace/src/core/smb_gazebo/worlds/WaA.world]
[Wrn] [GuiIface.cc:120] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-robotx'
[ERROR] [1719224785.531966521]: PluginlibFactory: The plugin for class 'rviz/GoalPointTool' failed to load.  Error: According to the loaded plugin descriptions the class rviz/GoalPointTool with base class type rviz::Tool does not exist. Declared types are  jsk_rviz_plugin/CloseAll jsk_rviz_plugin/OpenAll jsk_rviz_plugin/OverlayPicker jsk_rviz_plugin/ScreenshotListener rviz/FocusCamera rviz/Interact rviz/Measure rviz/MoveCamera rviz/PublishPoint rviz/Select rviz/SetGoal rviz/SetInitialPose rviz/WaypointTool rviz_plugin_tutorials/PlantFlag
[rospack] Error: no package given
[librospack]: error while executing command
[rospack] Error: no package given
[librospack]: error while executing command
[ERROR] [1719224785.546719469]: PluginlibFactory: The plugin for class 'rviz/ControlPanel' failed to load.  Error: According to the loaded plugin descriptions the class rviz/ControlPanel with base class type rviz::Panel does not exist. Declared types are  jsk_rviz_plugin/CancelAction jsk_rviz_plugin/EmptyServiceCallInterfaceAction jsk_rviz_plugin/ObjectFitOperatorAction jsk_rviz_plugin/PublishTopic jsk_rviz_plugin/RecordAction jsk_rviz_plugin/RobotCommandInterfaceAction jsk_rviz_plugin/SelectPointCloudPublishAction jsk_rviz_plugin/TabletControllerPanel jsk_rviz_plugin/YesNoButton rviz_plugin_tutorials/Teleop smb_navigation_rviz/PlanningPanel
[rospack] Error: no package given
[librospack]: error while executing command
[rospack] Error: no package given
[librospack]: error while executing command
[ INFO] [1719224785.553806158]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1719224785.632200837, 806.610000000]: Physics dynamic reconfigure ready.
[INFO] [1719224785.723050, 0.000000]: Calling service /gazebo/spawn_urdf_model
[ WARN] [1719224785.880851762, 806.853000000]: Failed to meet update rate! Took 806.8529999999999518
[ WARN] [1719224785.882391547, 806.855000000]: Failed to meet update rate! Took 806.82166666700004498
[ WARN] [1719224785.891759139, 806.864000000]: Odometry data timeout, switching to feedforward control.
[ INFO] [1719224786.479398647, 806.879000000]: World frame updated to: base_link
[Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
[ INFO] [1719224787.576655129, 806.879000000]: Robosense laser plugin missing <min_intensity>, defaults to no clipping
[ INFO] [1719224787.578830955, 806.879000000]: Robosense laser plugin ready, 16 lasers
[INFO] [1719224787.586252, 0.000000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1719224788.187813484, 806.879000000]: Camera Plugin: Using the 'robotNamespace' param: '/'
[ INFO] [1719224788.192411674, 806.879000000]: Camera Plugin (ns = /)  <tf_prefix_>, set to ""
[ INFO] [1719224788.214244515, 806.879000000]: Loading gazebo_ros_control plugin
[ INFO] [1719224788.214451802, 806.879000000]: Starting gazebo_ros_control plugin in namespace: /control
[ INFO] [1719224788.215634623, 806.879000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [/smb_description] on the ROS param server.
[spawn_urdf-14] process has finished cleanly
log file: /home/robotx/.ros/log/34a91986-3214-11ef-a2b3-ae0642e8c761/spawn_urdf-14*.log
[ WARN] [1719224788.326951955, 806.879000000]: Joint LF_WHEEL_JOINT of transmission LF_WHEEL_TRANS specifies multiple hardware interfaces. Currently the default robot hardware simulation interface only supports one. Using the first entry
[ WARN] [1719224788.355370454, 806.879000000]: Joint RF_WHEEL_JOINT of transmission RF_WHEEL_TRANS specifies multiple hardware interfaces. Currently the default robot hardware simulation interface only supports one. Using the first entry
[Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
[ WARN] [1719224788.387503775, 806.879000000]: Joint LH_WHEEL_JOINT of transmission LH_WHEEL_TRANS specifies multiple hardware interfaces. Currently the default robot hardware simulation interface only supports one. Using the first entry
[ WARN] [1719224788.417794374, 806.879000000]: Joint RH_WHEEL_JOINT of transmission RH_WHEEL_TRANS specifies multiple hardware interfaces. Currently the default robot hardware simulation interface only supports one. Using the first entry
[ INFO] [1719224788.462604640, 806.879000000]: Loaded gazebo_ros_control.
[ INFO] [1719224788.474949628, 806.879000000]: imu plugin missing <xyzOffset>, defaults to 0s
[ INFO] [1719224788.475261014, 806.879000000]: imu plugin missing <rpyOffset>, defaults to 0s
[INFO] [1719224788.540903, 806.895000]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1719224788.550345, 806.902000]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1719224788.557073, 806.910000]: Loading controller: smb_diff_drive
[ INFO] [1719224788.583816304, 806.935000000]: Controller state will be published at 50Hz.
[ INFO] [1719224788.587109381, 806.938000000]: Wheel separation will be multiplied by 1.
[ INFO] [1719224788.588710205, 806.940000000]: Left wheel radius will be multiplied by 1.
[ INFO] [1719224788.588837685, 806.940000000]: Right wheel radius will be multiplied by 1.
[ INFO] [1719224788.590361344, 806.942000000]: Velocity rolling window size of 2.
[ INFO] [1719224788.594147172, 806.945000000]: Velocity commands will be considered old if they are older than 0.25s.
[ INFO] [1719224788.595945994, 806.947000000]: Allow mutiple cmd_vel publishers is enabled
[ INFO] [1719224788.598131339, 806.949000000]: Base frame_id set to base_link
[ INFO] [1719224788.598993850, 806.950000000]: Odometry frame_id set to odom
[ INFO] [1719224788.600313507, 806.951000000]: Publishing to tf is disabled
[ INFO] [1719224788.622424482, 806.959000000]: left wheel to origin: 0.2159,0.285, -0.0185
[ INFO] [1719224788.622610556, 806.959000000]: right wheel to origin: 0.2159,-0.285, -0.0185
[ INFO] [1719224788.622834913, 806.959000000]: Odometry params : wheel separation 0.57, left wheel radius 0.19, right wheel radius 0.19
[ INFO] [1719224788.631091539, 806.959000000]: Adding left wheel with joint name: LF_WHEEL_JOINT and right wheel with joint name: RF_WHEEL_JOINT
[ INFO] [1719224788.631256272, 806.959000000]: Adding left wheel with joint name: LH_WHEEL_JOINT and right wheel with joint name: RH_WHEEL_JOINT
[ INFO] [1719224788.670738661, 806.983000000]: Dynamic Reconfigure:
DynamicParams:
        Odometry parameters:
                left wheel radius multiplier: 1
                right wheel radius multiplier: 1
                wheel separation multiplier: 1
        Publication parameters:
                Publish executed velocity command: disabled
                Publication rate: 50
                Publish frame odom on tf: disabled
[INFO] [1719224788.726999, 806.985000]: Loading controller: joint_state_controller
[INFO] [1719224788.755584, 807.012000]: Controller Spawner: Loaded controllers: smb_diff_drive, joint_state_controller
[ INFO] [1719224788.766608534, 807.024000000]: Odometry data regained, switching to PID control.
[INFO] [1719224788.769815, 807.025000]: Started controllers: smb_diff_drive, joint_state_controller
[Wrn] [Publisher.cc:135] Queue limit reached for topic /gazebo/default/pose/local/info, deleting message. This warning is printed only once.
PerFrivik commented 5 months ago

Hey quick question, when launching the sim, with the teleop, is the window active where you launched the teleop from? Can you click on the terminal where you launched the sim from and try again?

The error you are seeing should be unrelated to the teleop issue that you are having and appears because the smb_navigation package has not been built yet.