Server Launch Options
The ROS 1 server is launched with mujoco_ros/launch/launch_server.launch:
roslaunch mujoco_ros launch_server.launch use_sim_time:=true
Required Argument
use_sim_timeRequired. Sets
/use_sim_time. Usetruefor fully simulated systems. Usefalseonly when another clock source owns ROS time.
Runtime Arguments
nsOptional namespace passed to the server.
unpauseStarts physics immediately when
true. Defaults tofalse.headlessDisables the interactive GUI when
true. Offscreen rendering can still be enabled. Defaults tofalse.render_offscreenAllocates offscreen camera rendering resources when
true. Camera streams are still lazy and render only while subscribed. Defaults totrue.no_renderShorthand for
headless:=trueandrender_offscreen:=false. Use this for compute-only server runs. Defaults tofalse.no_xDeprecated compatibility option. It is treated as a no-render request when set and should be replaced by
no_render.modelfileMuJoCo XML or MJB file to load. Defaults to
$(find mujoco_ros)/assets/pendulum_world.xml.wait_for_xmlWaits for model XML on the parameter server instead of immediately loading a file path. Defaults to
false.realtimeDesired real-time factor. Values in
(0, 1]cap the simulation speed;-1runs as fast as possible. If unset, the model’s MuJoCo realtime value is used.num_sim_stepsAutomatically exits after this many MuJoCo simulation steps.
-1disables the limit.mujoco_threadsDeprecated. Number of MuJoCo worker threads requested by the server. The launch file defaults to
1; the server falls back to its internal default when the parameter is not set. Values greater than1can increase CPU usage because MuJoCo worker threads busy-wait; see google-deepmind/mujoco#2746. MuJoCo upstream is changing the public threading API to internal-only usage, so this behavior will change in the future andmujoco_roswill need its own threading API.mujoco_plugin_configYAML file loaded before the node starts. Use it to define
MujocoPluginsand plugin-specific configuration.initial_joint_statesYAML file loaded into the server namespace. Defaults to
$(find mujoco_ros)/config/initial_joint_states.yaml.
Access Control and Logging
eval_modeEnables evaluation restrictions. Mutating service calls require a matching
admin_hash, and the sensors plugin suppresses ground-truth topics. Defaults tofalse.admin_hashHash required by protected service calls while
eval_modeis enabled.verboseLoads the configured ROS console file and enables more detailed logs. Defaults to
false.console_config_fileROS console configuration used when
verboseis true. Defaults to$(find mujoco_ros)/config/rosconsole.config.
Developer Arguments
debugRuns the server under
gdb --args.debug_serverRuns the server under
gdbserver localhost:1234. This overrides normal debug mode.valgrindRuns the server under
valgrind. Do not combine this withdebug.valgrind_argsExtra arguments passed to valgrind.
profileSets
CPUPROFILE=/tmp/profile.outfor profiler-enabled builds.
ROS 2 Launch Differences
The hybrid-devel branch provides a ROS 2 launch file at mujoco_ros/launch/ros2/launch/launch_server.launch.xml.
It mirrors the ROS 1 arguments but uses ROS 2 launch syntax, $(find-pkg-share ...) paths, exec= instead of type=, ROS 2 log-level arguments, and <param from=...> for YAML loading.
It also adds gdb_term_cmd for opening gdb in a terminal.