[ROSbot 2.0] [dashing] How to get basic teleop working?

As stated in the title, I’m trying to get basic teleop working on the ROSbot 2.0, and nearly all of the tutorials on the site are for ros 1. Is there a prefab package for this somewhere that I haven’t been able to find, or is there something I’m missing, here?

Hello grayfox,

To start using ROS2 on ROSbot, it will be best to install image with ROS2, you can download it here.
The image comes with all required packages to run ROSbot.

Regards,
Łukasz

Yes, thank you. I already flashed the image to the SD card, and got it up and running before making this post. When I try to launch the route_admin_panel panel_rosbot.launch.py, I get this error:

$ ros2 launch route_admin_panel panel_rosbot.launch.py 
[INFO] [launch]: All log files can be found below /home/husarion/.ros/log/2020-08-04-04-54-11-002384-husarion-16824
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [node_server.sh-1]: process started with pid [16836]
[INFO] [map_to_img_node-2]: process started with pid [16837]
[INFO] [rplidar_composition-3]: process started with pid [16840]
[INFO] [static_transform_publisher-4]: process started with pid [16841]
[INFO] [world_model-5]: process started with pid [16842]
[INFO] [dwb_controller-6]: process started with pid [16844]
[INFO] [navfn_planner-7]: process started with pid [16860]
[INFO] [recoveries_node-8]: process started with pid [16861]
[INFO] [bt_navigator-9]: process started with pid [16862]
[INFO] [lifecycle_manager-10]: process started with pid [16863]
[node_server.sh-1] /home/husarion/husarion_ws/src
[rplidar_composition-3] [INFO] [rplidar_composition]: RPLIDAR running on ROS 2 package rplidar_ros. SDK Version: '1.10.0'
[recoveries_node-8] [WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[lifecycle_manager-10] [INFO] [lifecycle_manager_control]: Creating
[recoveries_node-8] [INFO] [recoveries]: Configuring Spin
[dwb_controller-6] [INFO] [dwb_controller]: Creating
[recoveries_node-8] [INFO] [recoveries]: Configuring BackUp
[lifecycle_manager-10] [INFO] [lifecycle_manager_control]: Starting the system bringup...
[lifecycle_manager-10] [INFO] [lifecycle_manager_control]: Creating and initializing lifecycle service clients
[navfn_planner-7] [WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[rplidar_composition-3] [INFO] [rplidar_composition]: RPLIDAR S/N: CABC9A87C5E392D2A5E492F85A69316C
[rplidar_composition-3] [INFO] [rplidar_composition]: Firmware Ver: 1.25
[rplidar_composition-3] [INFO] [rplidar_composition]: Hardware Rev: 5
[rplidar_composition-3] [INFO] [rplidar_composition]: RPLidar health status : '0'
[lifecycle_manager-10] [INFO] [lifecycle_manager_control]: Configuring and activating world_model
[dwb_controller-6] [INFO] [local_costmap.local_costmap]: Creating Costmap
[rplidar_composition-3] [INFO] [rplidar_composition]: current scan mode: Express, max_distance: 12.0 m, Point number: 4.0K , angle_compensate: 1
[map_to_img_node-2] [INFO] [map_to_img_node]: publish_map_metadata declared
[map_to_img_node-2] [INFO] [map_to_img_node]: Will publish metadata
[node_server.sh-1] Map scale: [ 10 ,  250 ]
[node_server.sh-1] Use simulation time: false
[node_server.sh-1] listening on *:8000
[node_server.sh-1] About to exit with code: 1
[node_server.sh-1] internal/modules/cjs/loader.js:638
[node_server.sh-1]     throw err;
[node_server.sh-1]     ^
[node_server.sh-1] 
[node_server.sh-1] Error: Cannot find module './slam_toolbox__srv__SerializePoseGraph_Response.js'
[node_server.sh-1]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
[node_server.sh-1]     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
[node_server.sh-1]     at Module.require (internal/modules/cjs/loader.js:692:17)
[node_server.sh-1]     at require (internal/modules/cjs/helpers.js:25:18)
[node_server.sh-1]     at Function.get Response [as Response] (/home/husarion/rclnodejs/generated/slam_toolbox/slam_toolbox__srvs__SerializePoseGraph.js:11:12)
[node_server.sh-1]     at _clients.forEach (/home/husarion/rclnodejs/lib/node.js:71:39)
[node_server.sh-1]     at Array.forEach (<anonymous>)
[node_server.sh-1]     at ShadowNode.execute (/home/husarion/rclnodejs/lib/node.js:70:19)
[ERROR] [node_server.sh-1]: process has died [pid 16836, exit code 1, cmd '/home/husarion/husarion_ws/install/route_admin_panel/lib/route_admin_panel/node_server.sh -s false --min 10 --max 250'].

I haven’t had much luck with the other packages that came pre-installed, either. Rather than trying to diagnose why they don’t work, I was hoping to get specific help regarding just teleop. Everything I’m seeing so far seems to be automation-focused, which is fine, but at the moment, I’m interested in teleop (specifically, teleop_joy), and I can’t seem to find anything on how to get teleop_joy working on ROS Dashing on the ROSBot 2.0.

Thank you for clarifying what have you done and what do you expect.

Before you start with teleop, please make sure, that after flashing the image, you have also flashed low-level firmware:

/home/husarion/flash_firmware.sh

Install teleop:

sudo apt install ros-dashing-teleop-twist-joy  ros-dashing-joy

Then in separate terminal windows:

sudo MicroXRCEAgent serial --dev /dev/ttyS1 -b 500000
ros2 run dds_bridge dds_bridge
ros2 run joy joy_node
ros2 run teleop_twist_joy teleop_node

Regards,
Łukasz

1 Like

Awesome, thank you! I had already flashed the firmware, but even now, as I go back over the Husarion docs, I can’t find the command you produced:

$ sudo MicroXRCEAgent serial --dev /dev/ttyS1 -b 500000

Can you link where I should’ve found this in the docs?

The command is mentioned on GitHub repositories of rosbot_description and firmware.

Regards,
Łukasz

1 Like