ROS Noetic robot package and autonomy stack for the Deep Robotics Jueying X30: the motion host's UDP protocol as a driver, Deep Robotics' own URDF as xacro, and the X30 stack, the ROS Noetic port of Dharma: a control mux with a protective field, LiDAR sector scans, FAST-LIO odometry, localization on site maps, route and goal navigation, health, thermal and partial discharge inspection at the stop points, a simulated X30 for the whole stack, and the building blocks every node shares.
Packages · Stack · Network · Quick start · Dependencies · Interface · Deep Robotics' own software · Verify on the real robot · Safety · Develop · Documentation
The X30's motion host takes commands and reports its state over UDP, and its perception host
runs the elevation map and the autonomous charging behind two more UDP ports (Deep Robotics
Jueying X30 API Documentation V1.0.5-0, 2025-08-21, chapter 1). This repository turns all of
it into ROS Noetic topics and std_srvs/Trigger services, on a computer on the robot's network
or on the robot's own computers.
Docs: x30_driver · x30_description · x30_bringup · x30_utils · x30_msgs · x30_control · x30_perception · x30_odometry · x30_localization · x30_navigation · x30_health · x30_inspection · x30_recorder · x30_bridge · x30_fleet · x30_sim · tools · CHANGELOG
| Package | |
|---|---|
x30_driver |
the UDP driver: cmd_vel → axis commands scaled by the current gait; reports → odom, imu, joint_states, battery, state, diagnostics; every robot command, elevation map mode and charging command as a Trigger service; a simulated robot for tests and trials |
x30_description |
URDF: Deep Robotics' X30 model with its meshes (legs, four LiDAR frames), base_link, imu_link; description.launch, display.launch |
x30_bringup |
one launch for the driver, the URDF and the stack; the X30's robot profile |
x30_utils |
the stack's toolbox: math, typed configuration, the robot profile, the braking model, logging, X30Node (rospy: validated parameters, callbacks one at a time, steady timers, TF, clean shutdown) |
x30_msgs |
the stack's messages and services: status of every subsystem, sector scans, paths, sites |
x30_control |
the control mux: the only publisher of /x30/cmd_vel; AUTO or REMOTE, speed envelope, protective field on the 360° safety scan, latched e-stop with re-arm |
x30_perception |
LiDAR sector scans from the X30's /livox/lidar (raw bytes, no Livox package needed) or any PointCloud2: front for avoidance, 360° fail-safe for the protective field; optional depth camera; ArUco fiducials |
x30_odometry |
FAST-LIO2 on the merged /livox/lidar and the body IMU behind a start gate that waits for a still and level IMU; the odometry monitor (stale, jumps, restarts, z drift, tilt, a speed mismatch with the leg odometry) and the trip |
x30_localization |
map → odom from an EKF with the odometry's start as the origin (no map), corrected by fiducials and pose estimates through a chi-square gate; the gravity-aligned bridge of FAST-LIO into odom → base_link |
x30_navigation |
the sites (fiducials, routes, no map) and route teaching with stop points, routes from the active site, a path follower with pluggable controllers, path shifting and stop point inspections, reactive avoidance and tag docking; every command to the control mux |
x30_health |
one health signal: sensor rates and header ages (raw, any type), the expected nodes, the stack's states, the safety scan, TF, the clock and the computer; health/status with a speed scale for the mux, and diagnostics |
x30_inspection |
substation inspection at the stop points (the follower's hook): the HIKMICRO PTZ camera pointed at each target taught there, overheating judged by absolute, ambient and similar criteria (NETA MTS); partial discharge from the Hertzino HZ-FA-371; a report with the thermal, visible, sound map and PRPD images on the robot and on inspection/report |
x30_recorder |
the inspection cameras recorded on the perception host while a route runs or on request: every raw thermal frame (.npz, degC per pixel, with the robot's pose and the camera's pan, tilt and zoom), the visible and thermal video (RTSP copied into MP4 segments), the acoustic camera's data; disk limits and retention |
x30_bridge |
the handheld's UDP gateway (teleop protocol v1 of Pashupati with the X30's commands): the X30Controller app on a Skydroid H12 or any Android drives through the control mux, teaches and runs routes, starts the recorder and an inspection, and sees the state, the inspection camera and the cloud; no ROS on the handheld |
x30_fleet |
the X30 in the NETRA command center (robot API v1 of Pashupati, NETRA's substation module): telemetry, patrol and stop events and alerts over one WebSocket; NETRA's patrols on the robot's routes with their inspection plan; x30_inspection's reports and the taught routes uploaded through a spool on disk; NETRA's commands, the recorder's among them |
x30_sim |
the X30 in software (bringup.launch sim:=true): a kinematic body behind the driver's topics and services, the four Mid-360 ray-cast into /livox/lidar, the body IMU, a drifting FAST-LIO stand-in and leg odometry, a tag camera, seeded scenarios, worlds and sites; no Gazebo, no GPU |
The X30 stack is Dharma, the robot-agnostic
autonomy stack of the other robots, ported to ROS Noetic in this one repository (the X30 is the
only robot on Noetic). The algorithms are Dharma's, unchanged and tested without ROS; the ROS
layer is rospy (X30Node), the launch files XML, the messages x30_msgs. It does not need the
robot's own perception and navigation software: the stack drives the robot through x30_driver
and reads the X30's sensor topics.
fleet the NETRA command center's uplink ◄ x30_fleet
handheld UDP gateway of the X30Controller app ◄ x30_bridge
inspection thermal and partial discharge at the stop points ◄ x30_inspection
the cameras recorded on the perception host ◄ x30_recorder
(hikmicro_driver, hertzino_driver of x30.repos)
watching health/status, diagnostics, speed scale ◄ x30_health
navigation sites (fiducials, routes; no map) · route teaching · route loader
path follower (NeuPAN optional) · avoidance · docking ◄ x30_navigation
estimation localization (EKF) · FAST-LIO odometry · sector scans
◄ x30_localization · x30_odometry · x30_perception
control control mux: the only /x30/cmd_vel, e-stop, protective field ◄ x30_control
robot x30_driver (UDP) · x30_description (URDF) · or x30_sim (sim:=true)
base x30_utils (robot profile, config, math, X30Node) · x30_msgs
Navigation never publishes the robot's cmd_vel: it publishes control/nav_cmd_vel, and the
control mux arbitrates it against the operator sources, applies the protective field on the 360°
safety scan and is the only publisher of /x30/cmd_vel. Every node reads the same robot profile
(/robot, x30_bringup/config/robot.yaml).
From the API documentation (sections 1.2 to 1.5):
| motion host | 192.168.1.103, commands to UDP 43893 |
| reports | 200 Hz state, IMU and joints, 1 Hz temperatures, 0.5 Hz battery: sent to every address in the motion host's network.toml (X30 Application Manual 4.3.2); the driver listens on 43897 |
| perception host | 192.168.1.105: elevation map on UDP 43899 (10 Hz feedback once it got any message), autonomous charging on UDP 3333 (request / response) |
| heartbeat | 0x31040001 at 5 Hz (at least 2 Hz), and 0x31020001 once to confirm the connection |
| command source | the first byte of every code: 0x31 an autonomous module (default, command_prefix), 0x21 a remote control terminal (the handheld) |
| velocity | axis commands 0x31010130 (+ forward), 0x31010131 (+ right), 0x31010135 (+ turn right) at 50 Hz, obeyed in the stepping state and non-manual mode (0x21 codes: manual mode) |
Two hosts. On the robot the stack runs on the navigation host (192.168.1.106: the driver,
control, the LiDAR scans, odometry, localization, the site and its routes without a map,
navigation, health, inspection, the handheld's gateway; the LiDAR and IMU from Deep Robotics'
own drivers), and
the inspection cameras and their recorder on the perception host (192.168.1.105), both on the
navigation host's ROS master: navigation_host.launch and perception_host.launch, by hand or
as services under a watchdog with tools/x30_host.sh
(x30_bringup).
This computer must be in the motion host's network.toml (its IP and port 43897, as the
Application Manual 4.3.2 describes; restart the motion program afterwards). Otherwise the robot
takes commands but sends no reports, and state says no reports from 192.168.1.103 yet (network.toml on the motion host?).
Ubuntu 20.04, ROS Noetic. Connect the computer to the robot's network and add it to
network.toml first (see Network).
# 1. Sources, dependencies, build
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/DarmawanRobotics/x30_ros.git
cd ~/catkin_ws
vcs import --recursive src < src/x30_ros/x30.repos # FAST-LIO, Livox msgs, the cameras
rosdep install --from-paths src --ignore-src -y
catkin_make && source devel/setup.bash
# 2. Launch: driver + URDF in the namespace x30
roslaunch x30_bringup bringup.launch
# 3. In a second terminal
rostopic echo -n 1 /x30/state
rosservice call /x30/stand_upWithout a robot, the driver against the simulated motion and perception hosts on this computer:
rosrun x30_driver fake_robot.py # terminal 1: the simulated robot
roslaunch x30_bringup bringup.launch rviz:=true \
overrides_file:=$(rospack find x30_driver)/config/fake_robot.yaml # terminal 2Or the whole stack on the simulated X30 (x30_sim): its LiDARs, IMU and FAST-LIO in a mall world, the site drawn from it (its tags and patrol loop), the loop walked:
roslaunch x30_bringup bringup.launch sim:=true site:=mall control:=true perception:=true \
odometry:=true localization:=true navigation:=true health:=true rviz:=true
rosservice call /navigation/load_path "{path: mall/routes/mall_loop.csv}"
rosservice call /navigation/startThen work through Verify on the real robot, including the cmd_vel
signs (step 6), before any autonomy drives the robot.
With the stack's control mux and sector scans (the mux is then the only publisher of
/x30/cmd_vel; check the robot profile and the LiDAR mount first, see
x30_bringup):
roslaunch x30_bringup bringup.launch control:=true perception:=true leg_odom_tf:=true
rostopic echo -n 1 /control/status # armed, field CLEAR
rostopic pub -r 20 /control/nav_cmd_vel geometry_msgs/Twist '{linear: {x: 0.2}}'
rosservice call /control/estop/engage # stops at once, until releasedWith FAST-LIO (built from source, see x30_odometry), the localization, the sites and the navigation, without a map, like HotDog and Pashupati: the odometry start (the dock) is the map origin, routes are taught and repeated in that frame, tags only correct the drift (No map); check the LiDAR frame and the IMU mount first (x30_odometry):
roslaunch x30_bringup bringup.launch control:=true perception:=true odometry:=true \
localization:=true navigation:=true site:=gardu-a
rostopic echo -n 1 /odometry/status # OK once FAST-LIO runs
rosservice call /route/start # walk the route, then
rosservice call /route/stop
rosservice call /localization/record_tags # a tag in view: it corrects the drift later
rosservice call /navigation/load_path "{path: gardu-a/routes/<date>_<time>.csv}"
rosservice call /navigation/startUnder the namespace (/x30/ by default). Details in x30_driver.
| Name | Type | ||
|---|---|---|---|
| sub | cmd_vel |
geometry_msgs/Twist |
base_link, REP-103 (x forward, y left, z counter-clockwise); zeros after cmd_timeout_sec, then silence |
| pub | odom |
nav_msgs/Odometry |
leg odometry, odom → base_link; no TF unless publish_tf: true |
| pub | imu |
sensor_msgs/Imu |
attitude (reported in degrees), rates, acceleration; frame imu_link |
| pub | joint_states |
sensor_msgs/JointState |
FL_HipX_joint ... HR_Knee_joint: position, velocity, effort (torque) |
| pub | battery |
sensor_msgs/BatteryState |
percentage 0–1, voltage, current, capacity |
| pub | state |
diagnostic_msgs/DiagnosticStatus |
connected, basic state, gait, control mode, velocity (the gate), takeover, cmd_vel_ignored, errors, body height, temperatures, elevation map and charging state, ... as key / values |
| pub | diagnostics |
diagnostic_msgs/DiagnosticArray |
the same, plus link counters |
Services (std_srvs/Trigger; each checks the robot's state first and succeeds only when the
robot reports the change):
| posture (one at a time) | stand_up (then torque control), sit_down (leaves stepping first), torque_control, start_stepping, stop_stepping |
| modes, height | non_manual_mode, manual_mode, height_normal, height_crawl |
| gaits (stepping state) | gait_walk, gait_slope, gait_off_road, gait_stair, gait_stair_multi_frame, gait_stair_45, gait_l_walk, gait_mountain, gait_silent |
| elevation map | elevation_solid_ground, elevation_grid_ground, elevation_stairs_no_risers (from multi-frame mode: then the LiDAR-inertial odometry off, 1.5.2.5), obstacle_decelerate, obstacle_detour, velocity_source_joystick, velocity_source_navigation (non-manual mode first, 1.5.1.1), obstacle_height_8cm, obstacle_height_28cm |
| charging | charge_start, charge_stop, charge_clear |
| other | emergency_stop (soft emergency stop, sent 3 times, confirmed by the state), save_data (sitting or after an emergency stop only) |
Velocity. cmd_vel goes out as axis values v / vmax × 32767, where vmax is the current
gait's maximum speed from Appendix B (forward, backward, lateral, yaw; half the forward speed for
walk and slope at crawl height). Run and Silent are not in the table: in them the driver sends
zeros unless gait_limits gives their speeds. Below 0.001 m/s (rad/s) a velocity is zero; a
larger one that falls inside the dead zone (655) goes out as 656. Lateral and yaw are negated
(the robot: + right, + turn right). Axis commands go out only in the stepping state and while the
motion state report is fresh (zeros also while it is stale): in torque-controlled standing they
would change the body's pose.
The robot obeys the driver's source in one control mode: 0x31 (default) in non-manual mode,
0x21 (the driver acting as the handheld) in manual mode. An episode starts with the first
motion command after cmd_vel was quiet for cmd_timeout_sec + stop_burst_sec, and only quiet
ends it. If the gate is open at that moment, the driver switches to that mode
(auto_control_mode, on a fresh report, 3 tries within 2 s) and starts stepping from
torque-controlled standing (auto_stepping, 3 tries within 4 × transition_timeout_sec), never
again in that episode: not after a hold, a takeover or a fall either.
The gate (velocity in state) stops all motion:
takeover (manual mode): the robot left that mode after it was seen in it (the handheld, ormanual_mode), moving or not. It ends only when the robot reports that mode again (handed back on the handheld, ornon_manual_mode); nothing switches it back by itself.hold:sit_down,hold:emergency_stop,hold:stop_stepping: untilstand_uporstart_stepping(a hold that comes in while they run stays).disarmed:emergency stop or fall: while the robot reports it.- then
waiting for zero or quiet cmd_vel: motion goes out again only oncecmd_velhas been zero (one message) or quiet (cmd_timeout_sec); a stream that kept running never drives off.
After motion, zeros go out from the first period without it, for stop_burst_sec and at least
once however late that period runs; the gate closing sends them too. Then nothing, even while
zero Twists keep arriving; a cmd_vel with NaN or inf in any field is a stop.
velocity_mode: topic republishes cmd_vel to /cmd_vel_corrected instead, for a driver on the
X30's own ROS master (2.3).
The navigation host (192.168.1.106) also runs Deep Robotics' localization, navigation and
mapping, its URDF publisher and its bridge to the robot; with x30_ros they only take CPU and
clash with it (/initialpose, /map, TF, /cmd_vel, the UDP port of the motion host's
reports). Turn them off there, now and at boot, before running the stack:
bash tools/dr_services.sh off # status: what runs; on: back as it wasThe sensor drivers, the ROS master, the motion host and the perception host (elevation map, charging) stay as they are. What it does and what to check afterwards, the IMU of the navigation host included: tools/README.md.
On a new robot, in an open area, with someone at the handheld:
- Reports:
rostopic hz /x30/odomshows ~50 Hz and/x30/statesaysconnected: Truewith the real basic state. If not:network.toml(above), then restart. - Struct layouts:
rcs_layoutandmotion_layoutinstatereadnatural. A log linereport 0x... of N bytes: unknown layoutmeans the motion program packs a struct differently: report it with N. - Command source: with
command_prefix: 0x31the robot obeys the services below anderrorsstays withoutheartbeat_timeout. If it ignores them, try0x21(as the handheld: the robot then obeys in manual mode, and the driver switches to manual instead). - Stand and step:
rosservice call /x30/stand_upends intorque_standing,/x30/start_steppinginstepping;sit_downbrings it back down. - Forward:
rostopic pub -r 20 /x30/cmd_vel geometry_msgs/Twist '{linear: {x: 0.2}}'walks forward,control_modeturnsnon_manual,odomtwist reads ~0.2. Stop the publisher: the robot stops within ~0.5 s. - Turn and strafe (REP-103):
{angular: {z: 0.3}}must turn the robot left (counter-clockwise from above), else setinvert_wz: true;{linear: {y: 0.1}}must move it left, elseinvert_vy: true(in your copy of driver_params.yaml,params_file:=). - Speed scale: in each gait you use, compare the
odomtwist with the command (Appendix B maximums). Run and silent are not in the table: measure their maximum speeds and give them ingait_limits, or the driver does not move the robot in them. - Takeover: while
cmd_veldrives the robot, and again while it is zero, switch to manual on the handheld: the robot follows the handheld andvelocityreadstakeover (manual mode), also after the autonomy pauses. Switch back to non-manual on the handheld (or callnon_manual_mode): the driver drives again after a zero or quietcmd_vel. - Battery:
batteryvoltage and current against the handheld app. The current is in 10 mA from Deeprcs 1.10.19 (battery_current_scale: 0.01), in A before (1.0);battery_voltage_scaleif the voltage is off. - Joints and frames:
roslaunch x30_bringup bringup.launch rviz:=true: the legs in RViz follow the real ones.imu_linksits atbase_link(the document gives no IMU position); compare the LiDAR frames with the perception host's point cloud frames. - Perception host:
elevation_grid_groundand back toelevation_solid_groundanswer with the new mode; charging only with a dock in front of the robot. Afterobstacle_height_28cm,/step_z_max_stateon the perception host must change; if not, setobstacle_height_code: 0x3101EE04(the document prints0x3100EE04, a feedback-like code). Multi-frame mode is entered by hand (1.5.2.4: robot still,0xBAA0001value 1 to port 60000, then mode 20); the elevation services leave it as 1.5.2.5 says. - save_data: sitting or after an emergency stop only;
0x31010C01(prefix +0x010C01), orsave_data_code: 18for jy_exe older than v2.2.45. It exits the motion program: last.
- The driver stops on its own: no
cmd_velfor 0.5 s gives zeros for 0.5 s, then nothing; the robot drops an axis command after 1 s. Only one node should publish/x30/cmd_vel. On shutdown the stream stops and zero axes go out three times. emergency_stopis the soft emergency stop, sent three times; it answers once the robot reports emergency stop or fall. The handheld and the robot's own stop button always work too.- The driver switches the mode and starts stepping only at the start of an episode, with the
gate open; only a quiet
cmd_velends an episode, so a stream that runs on through a hold, a takeover or a fall never brings the switches back. After the operator left the mode that obeys it (manual on the handheld, ormanual_mode), it never switches back: the takeover ends only when the robot reports that mode again.stop_stepping,sit_down(also when already sitting) andemergency_stophold untilstand_uporstart_stepping; a hold that comes in while those run stays. After either, acmd_velstream that kept running has to be zero or quiet once before the robot moves. No timer re-arms anything. - After motion, zeros go out for
stop_burst_secand at least once, even from a late period or with a stale motion state report, then nothing (zero Twists are not repeated: with0x21they would fight a real handheld); NaN or inf in acmd_velfield is a stop. - Non-zero axis commands only go out in the stepping state, with a fresh motion state report, in
a gait with known speeds;
sit_downrefuses while the robot walks. Stand/sit and stepping are toggles: a second one is refused until the state shows the first. - Crawl height allows walk and slope only (and needs a fresh motion state report); L-Walk, Mountain and Silent allow no height change; the stair gaits need the matching elevation map mode. The services refuse otherwise.
save_datamakes the robot save its last 5 minutes of data and exit its motion program: only while sitting or after an emergency stop.command_prefixother than0x21/0x31stops the node at start;heartbeat_hzbelow 2 Hz is raised to 2 Hz.
x30.repos brings the stack's source dependencies next to x30_ros
(vcs import --recursive, python3-vcstool):
FAST_LIO (hku-mars, ROS 1) |
the LiDAR-inertial odometry of x30_odometry; --recursive for its ikd-Tree |
livox_ros_driver |
the Livox CustomMsg FAST-LIO is built with (the same md5 as the X30's livox_ros_driver2); it needs the Livox SDK installed first: git clone https://github.com/Livox-SDK/Livox-SDK.git && cd Livox-SDK/build && cmake .. && make && sudo make install |
hikmicro_driver |
the HIKMICRO thermal + visible PTZ camera (hikmicro:=true); its hikmicro_msgs for x30_inspection and x30_recorder |
hertzino_driver |
the Hertzino acoustic camera (hertzino:=true); its hertzino_msgs for x30_inspection and x30_recorder |
NeuPAN, for the path follower's neupan controller (an MPC that walks around the safety
scan's points, heading included; x30_navigation), is
installed apart, in a venv beside ROS: bash tools/install_neupan.sh on the navigation host
(PyTorch for the CPU, cvxpy, NeuPAN with the X30's patches; internet, or wheels fetched with
--download elsewhere), then export X30_PYTHON=~/x30_ws/neupan/bin/python. NeuPAN is GPL-3.0
and stays out of this repository: the controller imports it at run time.
Everything else comes from rosdep. Without them the stack still builds and runs: odometry with
odometry_method:=external, the cameras, the inspection and the recorder off (x30_inspection
and x30_recorder need the two message packages; CI builds them alone). The camera passwords come from HIKMICRO_PASSWORD
and HERTZINO_PASSWORD in the environment, never from a launch argument.
Robot without internet (tools/README.md): tools/pack_sources.sh packs
x30_ros, x30.repos and the Livox SDK on a computer with internet (about 5 MB);
tools/check_deps.sh on the robot lists, offline, every apt package, source package and the
SDK still missing; the laptop's internet through ssh -R brings in the packages;
tools/x30_host.sh build builds each host's part, the host told by its address.
Five documents, as PDFs in docs/pdf and as a website,
https://darmawanrobotics.github.io/x30_ros/ (docs/ has the sources):
| Installation Guide | from nothing to the first patrol, on a robot without internet |
| User Manual | for the operators: the H12, routes, patrols, inspection, NETRA (A5) |
| Tuning Guide | the models behind every setting and the complete parameter reference |
| Architecture | hosts, packages, data flow, safety chain, protocols, tests |
| Site Acceptance Test | the tests and sign-off of a handover |
Every Python package of the stack is linted and formatted with ruff (ruff.toml,
Python 3.8 target), and its test_style.py checks the conventions: modules under 300 lines,
ROS-free core/, one-line docstrings, nothing Python 3.8 cannot run. Their tests run with pytest
under catkin_make run_tests (x30_add_pytests), the ROS ones against a private rosmaster.
catkin_make run_tests && catkin_test_results build/test_results --verbose
python3 -m pytest x30_driver/test x30_description/test # the ROS-free tests, without ROSThe codec is tested against the document: its worked example (Appendix A), every command code it
prints, the struct sizes and field offsets of every layout, the gait speeds of Appendix B and the
velocity formulas of 1.2.3.2. The velocity stream runs in a closed loop with the simulated robot
in simulated time (takeover latch while driving and while idle, episode switches, holds, zero
burst, toggles, unknown gaits, control mode per prefix); the node runs against the simulated
robot over UDP with stand-ins for rospy (every service, NaN, zero Twists), and a rostest runs it
through its real ROS interface (reports, posture, cmd_vel signs, the takeover latch and its
hand-back, the stop_stepping hold, gaits, height, elevation map with the multi-frame exit,
charging, emergency stop). The URDF test checks the official model's numbers and that the joints are the driver's.
CI runs all of it in a ros:noetic-ros-base container, plus check_urdf.
The URDF and its meshes are Deep Robotics' model (DeepRoboticsLab/deep_robotics_model, BSD-3-Clause, license). x30_ros is released under the Apache License 2.0.