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

openai_ros + noetic + turtlebot2 :: start_training.launch gives "No suscribers to cmd_vel_pub" error

asked 2022-07-12 16:09:03 -0500

fandrade gravatar image

updated 2022-07-13 18:00:47 -0500

EDITED

I followed the tutorial "OpenAI_ROS with Turtlebot2 Step by Step #Part 1" from The Construct, but in my local pc. I have everything running but start_training.launch is giving an error

No suscribers to cmd_vel_pub yet so we wait and try again

I`m not realizing what is missing. More detail bellow,

First I ran

roslaunch gym_construct main.launch gui:=true

which looks good, Gazebo maze environment was started, with output:

roslaunch gym_construct main.launch gui:=true
... logging to /home/fede/.ros/log/f5a5f724-020c-11ed-a6dc-4396d1fd14f6/roslaunch-slam-80673.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://slam:33643/

SUMMARY
========

PARAMETERS
 * /bumper2pointcloud/pointcloud_radius: 0.24
 * /cmd_vel_mux/yaml_cfg_file: /home/fede/aslam_...
 * /gazebo/enable_ros_network: True
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 30.0
 * /rosdistro: noetic
 * /rosversion: 1.15.14
 * /use_sim_time: True

NODES
  /
    bumper2pointcloud (nodelet/nodelet)
    cmd_vel_mux (nodelet/nodelet)
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    mobile_base_nodelet_manager (nodelet/nodelet)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_turtlebot_model (gazebo_ros/spawn_model)

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

setting /run_id to f5a5f724-020c-11ed-a6dc-4396d1fd14f6
process[rosout-1]: started with pid [80750]
started core service [/rosout]
process[gazebo-2]: started with pid [80757]
process[gazebo_gui-3]: started with pid [80762]
process[spawn_turtlebot_model-4]: started with pid [80767]
process[mobile_base_nodelet_manager-5]: started with pid [80768]
process[cmd_vel_mux-6]: started with pid [80769]
process[bumper2pointcloud-7]: started with pid [80770]
process[robot_state_publisher-8]: started with pid [80771]
[ INFO] [1657649021.496438617]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1657649021.497066737]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1657649021.576661728]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1657649021.577317914]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1657649022.289070697]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1657649022.301902848, 0.013000000]: Physics dynamic reconfigure ready.
[ INFO] [1657649023.247775734, 0.374000000]: Camera Plugin: Using the 'robotNamespace' param: '/'
[ INFO] [1657649023.249326603, 0.374000000]: Camera Plugin (ns = /)  <tf_prefix_>, set to ""
[ INFO] [1657649023.401860442, 0.374000000]: Starting plugin Kobuki(ns = //)
[ WARN] [1657649023.401895021, 0.374000000]: Kobuki(ns = //): missing <rosDebugLevel> default is na
[ INFO] [1657649023.402490716, 0.374000000]: Kobuki(ns = //): <tf_prefix> = 
[ WARN] [1657649023.402784182, 0.374000000]: Kobuki(ns = //): missing <update_rate> default is 0
[ INFO] [1657649023.402896134, 0.374000000]: Will publish tf. [mobile_base]
[ INFO] [1657649023.404077961, 0.374000000]: Kobuki(ns = //): Advertise joint_states[joint_states]!
[ INFO] [1657649023.404425272, 0.374000000]: Kobuki(ns = //): Advertise Odometry[odom]!
[ INFO] [1657649023.405927719, 0.374000000]: Kobuki(ns = //): Try to subscribe to mobile_base/commands/motor_power!
[ INFO] [1657649023.407269293, 0.374000000]: Kobuki(ns = //): Try to subscribe to mobile_base/commands/reset_odometry!
[ INFO] [1657649023.408995416, 0.374000000]: Kobuki(ns = //): Try to subscribe to mobile_base/commands/velocity!
[ INFO] [1657649023.409464566, 0.374000000]: Kobuki(ns = //): Advertise Cliff[mobile_base/events/cliff]!
[ INFO] [1657649023.409769126, 0.374000000]: Kobuki(ns = //): Advertise Bumper[mobile_base/events/bumper]!
[ INFO] [1657649023.410057637, 0.374000000]: Kobuki(ns = //): Advertise IMU[mobile_base/sensors/imu_data]!
[ INFO] [1657649023.410357902, 0.374000000]: Kobuki(ns = //): Advertise Core[mobile_base/sensors/core]!
[ INFO] [1657649023.410372466, 0.374000000]: GazeboRosKobuki plugin ready to go! [mobile_base]
[spawn_turtlebot_model-4] process has finished cleanly
log file ...
(more)
edit retag flag offensive close merge delete

Comments

(Self-reflection). I presume that example_turtlebot2_maze_qlearn node is waiting for Turtlebot to be suscribed to cmd_vel topic. But it is not. However, if I launch roslaunch turtlebot_teleop keyboard_teleop.launch I am able to control Turtlebot in Gazebo. Then, I think Turtlebot is suscribed to one of the cmd_vel_mux members, but no to the specific cmd_vel topic the problematic node is waiting to. I can not figure out how to solve the puzzle.

fandrade gravatar image fandrade  ( 2022-07-14 09:06:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-07-14 09:56:54 -0500

fandrade gravatar image

SOLVED!

Finally I found in line 77 of turtlebot2_env.py file a publisher initialization @ topic /cmd_vel (which is has not suscriptors). So I changed for /cmd_vel_mux/iniput/teleop and seems to be working.

edit flag offensive delete link more

Comments

can you please help me to install openai in ros noetic i have a lot of problems

jandisoon gravatar image jandisoon  ( 2022-11-09 04:53:25 -0500 )edit

Hi jandisoon. I dont know if this the right place, maybe start a new question, and I will help you to do it. Let me know which part of the process I giving problems to you. I have installed openai from The Construct, and It was not so easy. But I think If you install from Stable Baseline 3, I would be easier.

fandrade gravatar image fandrade  ( 2022-11-09 15:28:17 -0500 )edit

i trying to find some solution the the problems but now i get this problem [ERROR] [1668082595.325205]: Current /scan not ready yet, retrying for getting laser_scan when i run this launch file roslaunch my_turtlebot3_openai_example start_training.launch

jandisoon gravatar image jandisoon  ( 2022-11-10 06:18:10 -0500 )edit

this is my question here link text

jandisoon gravatar image jandisoon  ( 2022-11-10 06:45:29 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-07-12 16:09:03 -0500

Seen: 169 times

Last updated: Jul 14 '22