Junhyeok Lee

Applies to v0.1.0.

Network · ROS 1

The same rosbridge route as ROS 2 on port 9090. Native Noetic on Ubuntu 20.04, Docker on macOS.

Noetic reached end of life in May 2025. Prefer ROS 2 unless you specifically need a Noetic stack. And remember Unity is a rosbridge client. Start the server first.

Linux: native

sudo apt install ros-noetic-rosbridge-suite

source /opt/ros/noetic/setup.bash
roslaunch rosbridge_server rosbridge_websocket.launch   # roscore + rosbridge

macOS: Docker

git clone https://github.com/Hyeokk/Nano-sim.git && cd Nano-sim

docker run --rm -it --name nanosim-ros -p 9090:9090 \
    -v "$PWD/examples:/ws/examples" hyeokk64/nanosim-ros:noetic

To build it yourself, or to use the compose profile, run compose from docker/:

docker build -f docker/Dockerfile.ros1-noetic -t nanosim-ros:noetic .
cd docker && docker compose --profile noetic up --build

Connect Unity

  • Transport Type = ROS1, host 127.0.0.1, port 9090.
  • Enable /cmd_vel in the topic config, then press Connect.

Topics

The graph is identical to ROS 2. {device}is the sensor's name from the Sensor Setup panel, so which sensor topics appear depends on what you have added. Run rostopic list to see yours.

TopicTypeDirNotes
/cmd_velgeometry_msgs/TwistinDrive commands. Publish above 2 Hz or the watchdog stops the car.
/camera/{device}/compressedsensor_msgs/CompressedImageoutJPEG frames — raw Image is never published (bandwidth).
/camera/{device}/camera_infosensor_msgs/CameraInfooutIntrinsics — feeds depth → point-cloud and rectification pipelines.
/lidar/{device}/scansensor_msgs/LaserScanout2D LiDAR.
/lidar/{device}/pointssensor_msgs/PointCloud2out3D LiDAR — and the 2D scan as a cloud of its hits.
/imu/{device}/datasensor_msgs/ImuoutOrientation, angular velocity, specific force.
/gnss/{device}/fixsensor_msgs/NavSatFixoutPosition fix.
/ego/odomnav_msgs/OdometryoutEgo pose and twist in the odom frame.
/ego/cmd_appliedgeometry_msgs/TwistoutWhat the car actually obeyed.
/ego/vehicle_infostd_msgs/Stringout1 Hz — the vehicle limits as JSON.
/tftf2_msgs/TFMessageout30 Hz — the full frame tree (see Frames & time).
/clockrosgraph_msgs/ClockoutShips disabled — enable it only when time_scale ≠ 1.

/ego/vehicle_info is a String rather than a custom type on purpose: rosbridge drops an advertise for a message type it has no definition for.

Example

source /opt/ros/noetic/setup.bash
python3 examples/ros1/nanosim_teleop_ros1.py

On macOS it needs a second terminal, since the container's stdin already belongs to rosbridge:

docker exec -it nanosim-ros bash -lc \
    "source /opt/ros/noetic/setup.bash && python3 /ws/examples/ros1/nanosim_teleop_ros1.py"

It reads the car's limits before starting and reports the source in brackets: /ego/vehicle_info, then describe, then a built-in default. See Vehicle control for what the values mean.

Troubleshooting

  • rostopic list is empty — Unity is not connected; check transport, host, port, and the rosbridge log.
  • Connected but the car won't move/cmd_vel is disabled in the topic config.
  • Car stutters and stops — publish rate fell under 2 Hz and the watchdog fired.
  • Teleop exits immediately in Docker — no TTY; use docker exec -it, not up.