Gazebo | Ignition | Community
Ask Your Question
0

Starting gazebo headless over ssh

asked 2018-12-07 07:44:37 -0600

Baumboon gravatar image

Hello guys,

i have some problems when i try to start gazebo with roslaunch on a pc where i have ssh access.

Its ubuntu 16.04 with ros kinetic.

Here is my launch file:

<launch>
  <arg name="world_file"  default="$(env TURTLEBOT_GAZEBO_WORLD_FILE)"/>

  <arg name="base"      value="$(optenv TURTLEBOT_BASE kobuki)"/> <!-- create, roomba -->
  <arg name="battery"   value="$(optenv TURTLEBOT_BATTERY /proc/acpi/battery/BAT0)"/>  <!-- /proc/acpi/battery/BAT0 --> 
  <arg name="gui" default="false"/>
  <arg name="stacks"    value="$(optenv TURTLEBOT_STACKS hexagons)"/>  <!-- circles, hexagons --> 
  <arg name="3d_sensor" value="$(optenv TURTLEBOT_3D_SENSOR kinect)"/>  <!-- kinect, asus_xtion_pro --> 

  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="use_sim_time" value="true"/>
    <arg name="debug" value="false"/>
    <arg name="gui" value="$(arg gui)" />
    <arg name="world_name" value="worlds/Tworld1.world"/>
  </include>

  <include file="$(find turtlebot_gazebo)/launch/includes/$(arg base).launch.xml">
    <arg name="base" value="$(arg base)"/>
    <arg name="stacks" value="$(arg stacks)"/>
    <arg name="3d_sensor" value="$(arg 3d_sensor)"/>
  </include>

  <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
    <param name="publish_frequency" type="double" value="30.0" />
  </node>

  <!-- Fake laser -->
<node pkg="nodelet" type="nodelet" name="laserscan_nodelet_manager" args="manager"/>
<node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
    <param name="scan_height" value="10"/>
    <param name="output_frame_id" value="/camera_depth_frame"/>
    <param name="range_min" value="0.45"/>
    <remap from="image" to="/camera/depth/image_raw"/>
    <remap from="scan" to="/scan"/>
  </node>
</launch>

When i start over ssh it only gets to :

Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
started roslaunch server http://robolab8:44789/

SUMMARY
========

PARAMETERS
 * /bumper2pointcloud/pointcloud_radius: 0.24
 * /cmd_vel_mux/yaml_cfg_file: /opt/ros/kinetic/...
 * /depthimage_to_laserscan/output_frame_id: /camera_depth_frame
 * /depthimage_to_laserscan/range_min: 0.45
 * /depthimage_to_laserscan/scan_height: 10
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 30.0
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_sim_time: True

NODES
  /
    bumper2pointcloud (nodelet/nodelet)
    cmd_vel_mux (nodelet/nodelet)
    depthimage_to_laserscan (depthimage_to_laserscan/depthimage_to_laserscan)
    gazebo (gazebo_ros/gzserver)
    laserscan_nodelet_manager (nodelet/nodelet)
    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 [17081]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 925dced2-fa25-11e8-bbc5-d8cb8a119b1a
process[rosout-1]: started with pid [17094]
started core service [/rosout]
process[gazebo-2]: started with pid [17102]
process[spawn_turtlebot_model-3]: started with pid [17114]
process[mobile_base_nodelet_manager-4]: started with pid [17124]
process[cmd_vel_mux-5]: started with pid [17125]
process[bumper2pointcloud-6]: started with pid [17126]
process[robot_state_publisher-7]: started with pid [17127]
process[laserscan_nodelet_manager-8]: started with pid [17134]
process[depthimage_to_laserscan-9]: started with pid [17143]
[ INFO] [1544189992.342004025]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1544189992.342448714]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...

It stops there and nothing further happend. Turtlebot isn't up. Normally it should spawn robot and world should be up. This all works when i start on the same pc. When i am trying to start this from home over ssh it stops where i descriped above. Any tips?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-12-07 09:19:24 -0600

azeey gravatar image

Gazebo needs a display to run. If the remote host has a display server running, you might be able to just set the DISPLAY environment variable before launching. Eg. export DISPLAY=:0. Otherwise, you can look into running it headless with a virtual display (see this answer).

In any case, simply running gazebo --verbose on the remote host should provide some information as to why Gazebo isn't running properly.

edit flag offensive delete link more

Comments

so it is not possible to start it headless without display? Thank u for ur advice !

Baumboon gravatar imageBaumboon ( 2018-12-10 10:56:37 -0600 )edit

I believe it is possible to run the server (`gzserver`) without a display but sensors that need rendering (eg. camera) won't work.

azeey gravatar imageazeey ( 2018-12-10 11:51:37 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-12-07 07:44:37 -0600

Seen: 2,136 times

Last updated: Dec 07 '18