Hi, thanks for sharing the Noetic branch. I am testing this branch with an anaconda environment.
First, I opened a terminal using non-conda env. Then complie workspace:
$ cd ~/DRL-robot-navigation/catkin_ws
Compile
$ catkin_make_isolated
----------(It succeeds!)
Next, I have created an conda env, activated it, and installed some modules as follows.
conda activate py3.6.9
pip install torch==1.2.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install pyyaml
pip install rospkg
pip install squaternion
pip install attr
pip install attrs
pip install netifaces defusedxml
Finally, I opened a new terminal and set up sources:
---------------------- (This two lines are added to activate conda env and source ROS)
$ conda activate py3.6.9
$ source /opt/ros/noetic/setup.bash
$ export ROS_HOSTNAME=localhost
$ export ROS_MASTER_URI=http://localhost:11311
$ export ROS_PORT_SIM=11311
$ export GAZEBO_RESOURCE_PATH=~/DRL-robot-navigation/catkin_ws/src/multi_robot_scenario/launch
$ ########### source ~/.bashrc (This line is deleted because it exits conda env py3.6.9 and turns to conda env base)
$ cd ~/DRL-robot-navigation/catkin_ws
$ source devel_isolated/setup.bash
$ cd ~/DRL-robot-navigation/TD3
$ python3 velodyne_td3.py
The result is as follows, the following error occurs :
[ INFO] [1638523319.979820797]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1638523319.980631275]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[INFO] [1638523320.065212, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1638523320.070311, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1638523320.797520126]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1638523320.854882519]: Physics dynamic reconfigure ready.
[INFO] [1638523320.976913, 0.000000]: Calling service /gazebo/spawn_urdf_model
[ INFO] [1638523497.485188702, 0.201000000]: Camera Plugin: Using the 'robotNamespace' param: '/'
[ INFO] [1638523497.486945746, 0.201000000]: Camera Plugin (ns = /) <tf_prefix_>, set to ""
[ INFO] [1638523497.497253932, 0.201000000]: Camera Plugin: The 'robotNamespace' param was empty
[ INFO] [1638523497.498658911, 0.201000000]: Camera Plugin (ns = r1) <tf_prefix_>, set to ""
[INFO] [1638523498.697978, 0.201000]: Spawn status: SpawnModel: Successfully spawned entity
[urdf_spawner-2] process has finished cleanly
log file: /home/agent/.ros/log/770251f6-541a-11ec-aeed-e7829104ff20/urdf_spawner-2*.log
[ INFO] [1638523499.690473792, 0.201000000]: Laser Plugin: The 'robotNamespace' param was empty
[ INFO] [1638523499.690532451, 0.201000000]: Starting Laser Plugin (ns = r1)
[ INFO] [1638523499.691076904, 0.201000000]: Laser Plugin (ns = r1) <tf_prefix_>, set to ""
[ INFO] [1638523499.697194393, 0.201000000]: Velodyne laser plugin missing <min_intensity>, defaults to no clipping
[ INFO] [1638523499.698738449, 0.201000000]: Velodyne laser plugin ready, 16 lasers
[ INFO] [1638523499.710498725, 0.201000000]: Starting plugin DiffDrive(ns = r1/)
[ INFO] [1638523499.710623456, 0.201000000]: DiffDrive(ns = r1/): = Debug
[ INFO] [1638523499.711047215, 0.201000000]: DiffDrive(ns = r1/): <tf_prefix> =
[DEBUG] [1638523499.711102141, 0.201000000]: DiffDrive(ns = r1/): = cmd_vel
[DEBUG] [1638523499.711116354, 0.201000000]: DiffDrive(ns = r1/): = odom
[DEBUG] [1638523499.711153205, 0.201000000]: DiffDrive(ns = r1/): = odom
[DEBUG] [1638523499.711164916, 0.201000000]: DiffDrive(ns = r1/): = base_link
[DEBUG] [1638523499.711235821, 0.201000000]: DiffDrive(ns = r1/): = false
[ WARN] [1638523499.711250520, 0.201000000]: DiffDrive(ns = r1/): missing default is true
[DEBUG] [1638523499.711290227, 0.201000000]: DiffDrive(ns = r1/): = true
[DEBUG] [1638523499.711344992, 0.201000000]: DiffDrive(ns = r1/): = 0.29999999999999999
[DEBUG] [1638523499.711362835, 0.201000000]: DiffDrive(ns = r1/): = 0.17999999999999999
[DEBUG] [1638523499.711377474, 0.201000000]: DiffDrive(ns = r1/): = 1.8
[DEBUG] [1638523499.711391185, 0.201000000]: DiffDrive(ns = r1/): = 20
[DEBUG] [1638523499.711405342, 0.201000000]: DiffDrive(ns = r1/): = 50
[DEBUG] [1638523499.711453639, 0.201000000]: DiffDrive(ns = r1/): = world := 1
[DEBUG] [1638523499.711485094, 0.201000000]: DiffDrive(ns = r1/): = left_hub_joint
[DEBUG] [1638523499.711499787, 0.201000000]: DiffDrive(ns = r1/): = right_hub_joint
[ WARN] [1638523499.711518908, 0.201000000]: GazeboRosDiffDrive Plugin (ns = ) missing , defaults to 1
[ INFO] [1638523499.711922234, 0.201000000]: DiffDrive(ns = r1/): Advertise joint_states
[ INFO] [1638523499.712257380, 0.201000000]: DiffDrive(ns = r1/): Try to subscribe to cmd_vel
[ INFO] [1638523499.713753381, 0.201000000]: DiffDrive(ns = r1/): Subscribe to cmd_vel
[ INFO] [1638523499.714150768, 0.201000000]: DiffDrive(ns = r1/): Advertise odom on odom
[ INFO] [1638523499.721365047, 0.201000000]: GazeboRosJointStatePublisher is going to publish joint: chassis_swivel_joint
[ INFO] [1638523499.721390973, 0.201000000]: GazeboRosJointStatePublisher is going to publish joint: swivel_wheel_joint
[ INFO] [1638523499.721424750, 0.201000000]: GazeboRosJointStatePublisher is going to publish joint: left_hub_joint
[ INFO] [1638523499.721433820, 0.201000000]: GazeboRosJointStatePublisher is going to publish joint: right_hub_joint
[ INFO] [1638523499.721446512, 0.201000000]: Starting GazeboRosJointStatePublisher Plugin (ns = r1/)!, parent name: r1
[DEBUG] [1638523499.732124524, 0.211000000]: Trying to publish message of type [sensor_msgs/LaserScan/90c7ef2dc6895d81024acba2ac42f369] on a publisher with type [sensor_msgs/LaserScan/90c7ef2dc6895d81024acba2ac42f369]
[DEBUG] [1638523499.793156774, 0.222000000]: Trying to publish message of type [nav_msgs/Odometry/cd5e73d190d741a2f92e81eda573aca7] on a publisher with type [nav_msgs/Odometry/cd5e73d190d741a2f92e81eda573aca7]
[DEBUG] [1638523499.793237857, 0.222000000]: Trying to publish message of type [sensor_msgs/JointState/3066dcd76a6cfaef579bd0f34173e9fd] on a publisher with type [sensor_msgs/JointState/3066dcd76a6cfaef579bd0f34173e9fd]
[DEBUG] [1638523499.807064731, 0.235000000]: Trying to publish message of type [sensor_msgs/CameraInfo/c9a58c1b0b154e0e6da7578cb991d214] on a publisher with type [sensor_msgs/CameraInfo/c9a58c1b0b154e0e6da7578cb991d214]
Exception in thread /r1/odom:
Traceback (most recent call last):
File "/home/agent/anaconda3/envs/py3.6.9/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/agent/anaconda3/envs/py3.6.9/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_pubsub.py", line 185, in robust_connect_subscriber
conn.receive_loop(receive_cb)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py", line 846, in receive_loop
self.close()
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py", line 858, in close
self.socket.close()
AttributeError: 'NoneType' object has no attribute 'close'
Exception in thread /r1/front_laser/scan:
Traceback (most recent call last):
File "/home/agent/anaconda3/envs/py3.6.9/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/agent/anaconda3/envs/py3.6.9/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_pubsub.py", line 185, in robust_connect_subscriber
conn.receive_loop(receive_cb)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py", line 846, in receive_loop
self.close()
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py", line 858, in close
self.socket.close()
AttributeError: 'NoneType' object has no attribute 'close'