Skip to content

Using namespace in the launch file doesn't work #36

@ShayonMitra

Description

@ShayonMitra

I am trying to extend the environment to multiple agents. In order to do so, I am adding namespaces in the launch file. The spawn process happens normally and is reflected in the terminal. But a black rviz screen shows up and these error messages appear.

Traceback (most recent call last):
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 239, in
exit_code = sm.run()
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 132, in run
model_xml = rospy.get_param(self.args.param)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 467, in get_param
return _param_server[param_name] #MasterProxy does all the magic for us
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/msproxy.py", line 123, in getitem
raise KeyError(key)
KeyError: '/robot_description'
Traceback (most recent call last):
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 239, in
exit_code = sm.run()
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 132, in run
model_xml = rospy.get_param(self.args.param)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 467, in get_param
return _param_server[param_name] #MasterProxy does all the magic for us
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/msproxy.py", line 123, in getitem
raise KeyError(key)
KeyError: '/camera_description'

Initialization complete.

Traceback (most recent call last):
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 239, in
exit_code = sm.run()
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 132, in run
model_xml = rospy.get_param(self.args.param)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 467, in get_param
return _param_server[param_name] #MasterProxy does all the magic for us
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/msproxy.py", line 123, in getitem
raise KeyError(key)
KeyError: '/lidar_description'
Traceback (most recent call last):
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 239, in
exit_code = sm.run()
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 132, in run
model_xml = rospy.get_param(self.args.param)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 467, in get_param
return _param_server[param_name] #MasterProxy does all the magic for us
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/msproxy.py", line 123, in getitem
raise KeyError(key)
KeyError: '/camera_description'
Traceback (most recent call last):
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 239, in
exit_code = sm.run()
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 132, in run
model_xml = rospy.get_param(self.args.param)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 467, in get_param
return _param_server[param_name] #MasterProxy does all the magic for us
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/msproxy.py", line 123, in getitem
raise KeyError(key)
KeyError: '/robot_description'
[ INFO] [1728381882.894049536]: Finished loading Gazebo ROS API Plugin.
Traceback (most recent call last):
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 239, in
exit_code = sm.run()
File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 132, in run
model_xml = rospy.get_param(self.args.param)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 467, in get_param
return _param_server[param_name] #MasterProxy does all the magic for us
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/msproxy.py", line 123, in getitem
raise KeyError(key)
KeyError: '/lidar_description'
[ INFO] [1728381882.915256189]: waitForService: Service [/bot1/gazebo/set_physics_properties] has not been advertised, waiting...
[bot1/spawn_robot-9] process has died [pid 50159, exit code 1, cmd /opt/ros/noetic/lib/gazebo_ros/spawn_model -urdf -param /robot_description -model robot __name:=spawn_robot __log:=/home/shayonmitra/.ros/log/bad5b884-855c-11ef-a344-0ff38bd98261/bot1-spawn_robot-9.log].
log file: /home/shayonmitra/.ros/log/bad5b884-855c-11ef-a344-0ff38bd98261/bot1-spawn_robot-9*.log
[bot1/spawn_camera-7] process has died [pid 50151, exit code 1, cmd /opt/ros/noetic/lib/gazebo_ros/spawn_model -urdf -param /camera_description -model camera __name:=spawn_camera __log:=/home/shayonmitra/.ros/log/bad5b884-855c-11ef-a344-0ff38bd98261/bot1-spawn_camera-7.log].
log file: /home/shayonmitra/.ros/log/bad5b884-855c-11ef-a344-0ff38bd98261/bot1-spawn_camera-7*.log
[bot1/spawn_lidar-8] process has died [pid 50157, exit code 1, cmd /opt/ros/noetic/lib/gazebo_ros/spawn_model -urdf -param /lidar_description -model lidar __name:=spawn_lidar __log:=/home/shayonmitra/.ros/log/bad5b884-855c-11ef-a344-0ff38bd98261/bot1-spawn_lidar-8.log].
log file: /home/shayonmitra/.ros/log/bad5b884-855c-11ef-a344-0ff38bd98261/bot1-spawn_lidar-8*.log

Any fixes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions