Dear All,
I am very new in this world.
As my first learning; I am trying to train a turtlebot3 in a maze. I am getting the error like:
[ERROR] [1650345832.962232, 0.000000]: Current /scan not ready yet, retrying for getting laser_scan
[ERROR] [1650345833.967828, 0.000000]: Current /scan not ready yet, retrying for getting laser_scan
[ERROR] [1650345834.979281, 0.000000]: Current /scan not ready yet, retrying for getting laser_scan
I am using Neotic environment. and followed the tutorial: [ROS Projects] - Use OpenAI_ROS with Turtlebot2 Step by Step - Part 1 - YouTube
I took the following codes:
start_training.launch
my_turtlebot3_openai_qlearn_params.yaml
qlearn.py
start_qlearning.py
Also, I am running the gazebo simulation with options:
Can anyone please help me?
Hi @BlueCap ,
Could you check in the training configuration which scan topic it is expeccting to have?
I’d ask you to share the list of topics you have available in the environment as well
Regards
Dear @marco.nc.arruda ,
As you suggested I was debugging in that line and found following issue, do you know how to resolve that? I did source/setup.bash but that is not working:
user:~/catkin_ws$ rosmsg show sensor_msgs/LeaserScan
Unable to load msg [sensor_msgs/LeaserScan]: Cannot locate message [LeaserScan] in package [sensor_msgs] with paths [[’/opt/ros/noetic/share/sensor_msgs/msg’]]
Hi @BlueCap ,
It seems to be a typo (replace LeaserScan
by LaserScan
), try the command below:
rosmsg show sensor_msgs/LaserScan
@marco.nc.arruda you were correct, that was typo… I am having the thing…
But, eventually that is bad news as again I got clueless about the error.
So as you asked I gave you the rostopic… do you need anything else for further analysis?
Thanks a ton in advance for helping
Few more thing you might need to know:
user:~$ rostopic list
/clock
/cmd_vel
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/imu
/joint_states
/odom
/rosout
/rosout_agg
/scan
/tf
/tf_static
user:~$ rostopic echo /scan
WARNING: no messages received and simulated time is active.
Is /clock being published?
user:~$ rosparam set use_sim_time false
user:~$ rostopic echo /scan ==> It is not showing any data
user:~$ rostopic info /scan
Type: sensor_msgs/LaserScan
Publishers:
- /gazebo (http://3_simulation:42921/)
Subscribers: None
I was also checking turtlebot3_env.py
from sensor_msgs.msg import LaserScan
rospy.Subscriber("/scan", LaserScan, self._laser_scan_callback)
def _check_all_sensors_ready(self):
rospy.logdebug("START ALL SENSORS READY")
self._check_odom_ready()
self._check_imu_ready()
self._check_laser_scan_ready()
rospy.logdebug("ALL SENSORS READY")
def _check_laser_scan_ready(self):
self.laser_scan = None
rospy.logdebug("Waiting for /scan to be READY...")
while self.laser_scan is None and not rospy.is_shutdown():
try:
self.laser_scan = rospy.wait_for_message("/scan", LaserScan, timeout=1.0)
rospy.logdebug("Current /scan READY=>")
except:
rospy.logerr("Current /scan not ready yet, retrying for getting laser_scan")
return self.laser_scan
def _laser_scan_callback(self, data):
self.laser_scan = data
def get_laser_scan(self):
return self.laser_scan
I think my main issue is:
user:~$ rostopic echo /scan ==> It is not showing any data
Hi @BlueCap ,
I’m not sure how you are running the AI scripts, I’m checking if there are more parameters to be
configured.
But for debugging the simulation itself, it is important to notice it starts paused (check video below). Is that the case or you have the error when trying to run the learning algorithms?
@marco.nc.arruda that’s exactly corect; now after running this I am not getting any further issue realted to Laser (but getting other issues, I will be opening different thread for that). So, we can treat this as closed.
THANK YOU
1 Like