[Unitree GO2] SLAM(Creating Map) not working

unitree@go2-unit-41097:/opt/mybotshop/src/mybotshop/go2_navigation/param$ ROS_DOMAIN_ID=10 ros2 run tf2_tools view_frames.py --force-discover --ros-args --remap tf:=/$GO2_NS/tf --ros-args --remap tf_static:=/$GO2_NS/tf_static
[INFO] [0000015788.629641856] [view_frames]: Listening to tf data during 5 seconds…
[INFO] [0000015793.634290848] [view_frames]: Generating graph in frames.pdf file…
[INFO] [0000015793.659543936] [view_frames]: Result:tf2_msgs.srv.FrameGraph_Response(frame_yaml=“base_link: \n parent: ‘odom’\n broadcaster: ‘default_authority’\n rate: 99.905\n most_recent_transform: 15793.631282\n oldest_transform: 15788.556453\n buffer_length: 5.075\nodom: \n parent: ‘map’\n broadcaster: ‘default_authority’\n rate: 62.714\n most_recent_transform: 15794.625143\n oldest_transform: 15789.522634\n buffer_length: 5.103\nFL_foot: \n parent: ‘FL_calf’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nFL_calf: \n parent: ‘FL_thigh’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nFR_foot: \n parent: ‘FR_calf’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nFR_calf: \n parent: ‘FR_thigh’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nRL_foot: \n parent: ‘RL_calf’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nRL_calf: \n parent: ‘RL_thigh’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nRR_foot: \n parent: ‘RR_calf’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nRR_calf: \n parent: ‘RR_thigh’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\ncamera_link: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\ncomputer_dock_link: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nend_effector_link: \n parent: ‘link5’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nlink5: \n parent: ‘link4’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\ntrunk: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nfront_top_mount: \n parent: ‘utlidar_lidar’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nutlidar_lidar: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nimu_link: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nlidar_link: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nopen_manipulator_base_bracket: \n parent: ‘front_top_mount’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nopen_manipulator_bracket: \n parent: ‘front_top_mount’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nlink1: \n parent: ‘front_top_mount’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nsteamdeck_bracket_link: \n parent: ‘computer_dock_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nFL_thigh: \n parent: ‘FL_hip’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nFL_hip: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nFR_thigh: \n parent: ‘FR_hip’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nFR_hip: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nRL_thigh: \n parent: ‘RL_hip’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nRL_hip: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nRR_thigh: \n parent: ‘RR_hip’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nRR_hip: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\ngripper_link: \n parent: ‘link5’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\ngripper_link_sub: \n parent: ‘link5’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nlink2: \n parent: ‘link1’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nlink3: \n parent: ‘link2’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\nlink4: \n parent: ‘link3’\n broadcaster: ‘default_authority’\n rate: 25.197\n most_recent_transform: 15793.594306\n oldest_transform: 15788.553933\n buffer_length: 5.040\n”)

After a restart is /tf no more there, but the situation with map is same here. You may check the following

unitree@go2-unit-41097:/opt/mybotshop/src/mybotshop/go2_navigation/param$ ros2 topic info /map -v
Type: nav_msgs/msg/OccupancyGrid

Publisher count: 1

Node name: map_server
Node namespace: /
Topic type: nav_msgs/msg/OccupancyGrid
Endpoint type: PUBLISHER
GID: 01.10.a2.19.3c.b9.2b.bb.54.cf.ae.48.00.00.22.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Subscription count: 2

Node name: global_costmap
Node namespace: /global_costmap
Topic type: nav_msgs/msg/OccupancyGrid
Endpoint type: SUBSCRIPTION
GID: 01.10.5e.d3.a0.7b.bd.66.58.da.0f.09.00.00.6b.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: amcl
Node namespace: /
Topic type: nav_msgs/msg/OccupancyGrid
Endpoint type: SUBSCRIPTION
GID: 01.10.c8.54.39.e1.4c.32.23.88.77.bd.00.00.39.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

unitree@go2-unit-41097:/opt/mybotshop/src/mybotshop/go2_navigation/param$ ros2 topic info /go2_unit_41097/map -v
Type: nav_msgs/msg/OccupancyGrid

Publisher count: 0

Subscription count: 1

Node name: go2_webserver
Node namespace: /go2_unit_41097
Topic type: nav_msgs/msg/OccupancyGrid
Endpoint type: SUBSCRIPTION
GID: 01.10.8a.d3.47.d1.8e.d3.21.c3.e1.55.00.00.16.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

I post what I can see here

unitree@go2-unit-41097:/opt/mybotshop/src/mybotshop/go2_navigation/param$ ros2 topic info /go2_unit_41097/tf_static -v
Type: tf2_msgs/msg/TFMessage

Publisher count: 1

Node name: robot_state_publisher
Node namespace: /go2_unit_41097
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: PUBLISHER
GID: 01.10.f3.a8.0b.dd.e1.0f.1d.04.78.16.00.00.16.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Subscription count: 7

Node name: transform_listener_impl_ffff8c01d5b0
Node namespace: /
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: SUBSCRIPTION
GID: 01.10.05.3d.41.1e.63.1e.d1.08.a6.80.00.00.32.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: transform_listener_impl_aaaaf8ba0778
Node namespace: /go2_unit_41097
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: SUBSCRIPTION
GID: 01.10.29.13.9d.b9.e1.37.0f.f4.bf.f5.00.00.18.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: transform_listener_impl_aaab10f89140
Node namespace: /
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: SUBSCRIPTION
GID: 01.10.5e.d3.a0.7b.bd.66.58.da.0f.09.00.00.6a.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: bt_navigator
Node namespace: /
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: SUBSCRIPTION
GID: 01.10.6c.3f.71.f4.c5.07.46.e0.6d.a6.00.00.38.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: go2_webserver
Node namespace: /go2_unit_41097
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: SUBSCRIPTION
GID: 01.10.8a.d3.47.d1.8e.d3.21.c3.e1.55.00.00.1b.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: transform_listener_impl_aaaae9dc0950
Node namespace: /
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: SUBSCRIPTION
GID: 01.10.8d.34.ef.da.f9.2c.b6.70.9a.f3.00.00.6a.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: transform_listener_impl_ffff9802af70
Node namespace: /
Topic type: tf2_msgs/msg/TFMessage
Endpoint type: SUBSCRIPTION
GID: 01.10.c8.54.39.e1.4c.32.23.88.77.bd.00.00.32.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

And an example part of echo from the topic:

- header:
    stamp:
      sec: 16341
      nanosec: 404077792
    frame_id: base_link
  child_frame_id: camera_link
  transform:
    translation:
      x: 0.29
      y: 0.0
      z: -0.08
    rotation:
      x: 0.0
      y: 0.706825181105366
      z: 0.0
      w: 0.7073882691671998
- header:
    stamp:
      sec: 16341
      nanosec: 404080096
    frame_id: base_link
  child_frame_id: computer_dock_link
  transform:
    translation:
      x: 0.0
      y: 0.0
      z: -0.057
    rotation:
      x: 0.0
      y: 0.0
      z: 0.706825181105366
      w: 0.7073882691671998
- header:
    stamp:
      sec: 16341
      nanosec: 404083328
    frame_id: link5
  child_frame_id: end_effector_link
  transform:
    translation:
      x: 0.126
      y: 0.0
      z: 0.0
    rotation:
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
- header:
    stamp:
      sec: 16341
      nanosec: 404084736
    frame_id: base_link
  child_frame_id: trunk
  transform:
    translation:
      x: 0.0
      y: 0.0
      z: 0.0
    rotation:
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
- header:
    stamp:
      sec: 16341
      nanosec: 404086176
    frame_id: utlidar_lidar
  child_frame_id: front_top_mount
  transform:
    translation:
      x: 0.15
      y: 0.0
      z: -0.15
    rotation:
      x: 0.0007963264582434141
      y: 0.9999993658637698
      z: 0.0007963264582434141
      w: 6.341362302272584e-07
- header:
    stamp:
      sec: 16341
      nanosec: 404095712
    frame_id: trunk
  child_frame_id: imu_link
  transform:
    translation:
      x: 0.0
      y: 0.0
      z: 0.0
    rotation:
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
- header:
    stamp:
      sec: 16341
      nanosec: 404096864
    frame_id: base_link
  child_frame_id: lidar_link
  transform:
    translation:
      x: 0.29
      y: 0.0
      z: -0.08
    rotation:
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
- header:
    stamp:
      sec: 16341
      nanosec: 404097696
    frame_id: front_top_mount
  child_frame_id: open_manipulator_base_bracket
  transform:
    translation:
      x: 0.032
      y: 0.0
      z: 0.007
    rotation:
      x: 0.0
      y: 0.0
      z: 0.7071080798594737
      w: 0.7071054825112364
- header:
    stamp:
      sec: 16341
      nanosec: 404099360
    frame_id: front_top_mount
  child_frame_id: open_manipulator_bracket
  transform:
    translation:
      x: 0.042
      y: 0.0
      z: 0.021
    rotation:
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
- header:
    stamp:
      sec: 16341
      nanosec: 404100736
    frame_id: front_top_mount
  child_frame_id: link1
  transform:
    translation:
      x: 0.0025
      y: 0.0
      z: 0.01
    rotation:
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
- header:
    stamp:
      sec: 16341
      nanosec: 404101568
    frame_id: computer_dock_link

After scanning the map, saving to the map directory and colcon build again. I started the navigation here ROS_DOMAIN_ID=10 GO2_NS=go2_unit_41097 ros2 launch go2_navigation map_navi.launch.py map:=/opt/mybotshop/src/mybotshop/go2_navigation/maps/ais_test.yaml with this specified map name. and now I can see in rviz the scanned map with rviz2 --ros-args -r /tf:=/go2_unit_41097/tf -r /tf_static:=/go2_unit_41097/tf_static and set the durability policy in map as “transient local”. However the robot model is not available and navigation(using 2D Pose Estimate to localize and 2D Goal Pose to set goal) is also not working there(The description Topic is set to /go2_unit_41097/robot_description)

Please post the image of the rqt graph it should be some sort of tree, the commands for it are written in the repository.

@Sohail Do you have instructions for this in combination with the Livox Mid360?

You simply need to pass the livox/pointcloud into the topic of pcd_to_laserscan. Just ensure that the Livox settings are set to 0 for publishing in ros2 point cloud convention.

What do I need to set for taget_frame, or how can I get rviz to display the data?

With the default value (cloud), I get the following when I start the application:
pointcloud to laserscan: Message Filter dropping message: frame
‘mid360_link’ at time 1768917343.362 for reason ‘Unknown’

With the value base_link, no data is still received via echo /scanner/scan.

With the value mid360_frame, numbers are received via echo /scanner/scan, but these cannot be displayed in rviz either, and the following message appears when starting rviz:
Invalid frame ID “mid360_link” passed to canTransform argument
target_frame - frame does not exist
[rviz2-1] at line 133 in
/tmp/binarydeb/ros-foxy-tf2-0.13.14/src/buffer_core.cpp

  • Ensure the link is enabled in the urdf mid360_link
  • tf and tf_static is being republished
  • output data type is 0
  • data src is 0
  • Livov mid360 is set to send data to 192.168.123.18 and its ip is 192.168.123.120
  • In drive json the ip is set to 192.168.123.120

It should work if all of these are set correctly.

Unfortunately, I don’t know what ‘ensure the link is enabled in the urdf mid360_link’ means, but perhaps the following will help you assess the situation:

ROS_DOMAIN_ID=10 ros2 run tf2_tools view_frames.py --force-discover --ros-args --remap tf:=/go2_unit_14082/tf --ros-args --remap tf_static:=/go2_unit_14082/tf_static
[INFO] [1769005141.006461120] [view_frames]: Listening to tf data during 5 seconds…
[INFO] [1769005146.013591424] [view_frames]: Generating graph in frames.pdf file…
[INFO] [1769005146.020560640] [view_frames]: Result:tf2_msgs.srv.FrameGraph_Response(frame_yaml=“base_link: \n parent: ‘odom’\n broadcaster: ‘default_authority’\n rate: 96.694\n most_recent_transform: 1769005146.011762\n oldest_transform: 1769005140.985613\n buffer_length: 5.026\nFL_foot: \n parent: ‘FL_calf’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nFL_calf: \n parent: ‘FL_thigh’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nFR_foot: \n parent: ‘FR_calf’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nFR_calf: \n parent: ‘FR_thigh’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nRL_foot: \n parent: ‘RL_calf’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nRL_calf: \n parent: ‘RL_thigh’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nRR_foot: \n parent: ‘RR_calf’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nRR_calf: \n parent: ‘RR_thigh’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\ncamera_link: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\ncomputer_dock_link: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nend_effector_link: \n parent: ‘link5’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nlink5: \n parent: ‘link4’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\ntrunk: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nfront_top_mount: \n parent: ‘utlidar_lidar’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nutlidar_lidar: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nimu_link: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nlidar_link: \n parent: ‘base_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nopen_manipulator_base_bracket: \n parent: ‘front_top_mount’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nopen_manipulator_bracket: \n parent: ‘front_top_mount’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nlink1: \n parent: ‘front_top_mount’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nsteamdeck_bracket_link: \n parent: ‘computer_dock_link’\n broadcaster: ‘default_authority’\n rate: 10000.000\n most_recent_transform: 0.000000\n oldest_transform: 0.000000\n buffer_length: 0.000\nFL_thigh: \n parent: ‘FL_hip’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nFL_hip: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nFR_thigh: \n parent: ‘FR_hip’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nFR_hip: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nRL_thigh: \n parent: ‘RL_hip’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nRL_hip: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nRR_thigh: \n parent: ‘RR_hip’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nRR_hip: \n parent: ‘trunk’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\ngripper_link: \n parent: ‘link5’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\ngripper_link_sub: \n parent: ‘link5’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nlink2: \n parent: ‘link1’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nlink3: \n parent: ‘link2’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\nlink4: \n parent: ‘link3’\n broadcaster: ‘default_authority’\n rate: 25.101\n most_recent_transform: 1769005145.971347\n oldest_transform: 1769005140.991438\n buffer_length: 4.980\n”)

What are the names of the topics that tf and tf_static republish?

In the Livox Launcher, the output data type is 0 and the data src is 0, and I also receive the data continuously via echo /livox/lidar.

The IP of the Livox mid360 is set to 192.168.123.20 by default in the config file. Do I need to change this?

In the urdf there should be a link called mid360_link and it should be active and visible in the tf_tree. If its not there then you have to add it.

Can you give me the code to set up the link?

You can view online tutorial on how to add links and joints to the urdf, for now i will give an example:

 <!-- Mid-360 LiDAR Link -->
    <link name="mid360_link">
      <visual>
        <geometry>
          <cylinder radius="0.05" length="0.06"/>
        </geometry>
        <material name="dark_gray">
          <color rgba="0.2 0.2 0.2 1.0"/>
        </material>
      </visual>
      <collision>
        <geometry>
          <cylinder radius="0.05" length="0.06"/>
        </geometry>
      </collision>
      <inertial>
        <mass value="0.265"/>
        <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/>
      </inertial>
    </link>

    <!-- Joint connecting to parent (e.g., base_link) -->
    <joint name="mid360_joint" type="fixed">
      <parent link="base_link"/>
      <child link="mid360_link"/>
      <origin xyz="0.0 0.0 0.15" rpy="0 0 0"/>
    </joint>

The mid360_link is not listed in the go2_description.urdf file. However, it is integrated into the TF tree with robot.xacro when go2_description is executed via the command ros2 launch go2_description go2_description.launch. This is not the case when go2_description is started via the web server.

Even if mid360_link is integrated into the TF tree via robot.xacro, pointcloud_to_laserscan does not work with the target_frame base_link. However, starting with robot.xacro and then building go2_description does not change the urdf file. This means that mid360_link is still not in the urdf file.

Is it relevant whether mid360_link is in the TF tree or in the urdf file? And if it has to be in the urdf file, do I copy the code from the last answer or does it have to be generated via the xacro file?

In addition, there are these warnings:

[INFO] [launch]: Default logging verbosity is set to INFO
/home/unitree/ros2_ws/install/my_livox_launch/share/my_livox_launch/launch/livox_mid360_pointcloud_to_laserscan_launch.py:13: UserWarning: The parameter ‘node_executable’ is deprecated, use ‘executable’
instead
Node(
/home/unitree/ros2_ws/install/my_livox_launch/share/my_livox_launch/launch/livox_mid360_pointcloud_to_laserscan_launch.py:13: UserWarning: The parameter ‘node_name’ is deprecated, use ‘name’
instead
Node(
/home/unitree/ros2_ws/install/my_livox_launch/share/my_livox_launch/launch/livox_mid360_pointcloud_to_laserscan_launch.py:19: UserWarning: The parameter ‘node_executable’ is deprecated, use ‘executable’
instead
Node(
/home/unitree/ros2_ws/install/my_livox_launch/share/my_livox_launch/launch/livox_mid360_pointcloud_to_laserscan_launch.py:19: UserWarning: The parameter ‘node_name’ is deprecated, use ‘name’
instead
Node(
/home/unitree/ros2_ws/install/my_livox_launch/share/my_livox_launch/launch/livox_mid360_pointcloud_to_laserscan_launch.py:25: UserWarning: The parameter ‘node_executable’ is deprecated, use ‘executable’
instead
Node(
/home/unitree/ros2_ws/install/my_livox_launch/share/my_livox_launch/launch/livox_mid360_pointcloud_to_laserscan_launch.py:25: UserWarning: The parameter ‘node_name’ is deprecated, use ‘name’
instead
Node(
[INFO] [dummy_pointcloud_publisher-1]: process started with pid [16745

I just restarted the robot again and now, despite starting with ros2 launch go2_description go2_description.launch, mid360_link is no longer displayed in the TF Tree . Last time, I manually set the values GO2_ACCESSORIES and GO2_MID360 to 1. I removed that at the end of my test and tested again, but it was probably still saved.

If you have changed something on the startup files just rerun the command.

ros2 run go2_bringup startup_installer.py

I didn’t change anything on the startup files, but ran export GO2_MID360=1 via the terminal. Although mid360_link is then displayed in the TF tree, no data is output via the topic /scanner/scan, while /livox/lidar outputs data.

Its because the namespace, domain id, and other settings are incorrect. Adapt this correctly and replace your livox launch file with this

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Software License Agreement (BSD)
#
# @author    Salman Omar Sohail <support@mybotshop.de>
# @copyright (c) 2025, MYBOTSHOP GmbH, Inc., All rights reserved.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

# Redistribution and use in source and binary forms, with or without
# modification, is not permitted without the express permission
# of MYBOTSHOP GmbH.

import os
from launch import LaunchDescription
from launch.actions import SetEnvironmentVariable
from launch_ros.actions import Node
from launch_ros.substitutions import FindPackageShare
from launch.substitutions import PathJoinSubstitution

xfer_format   = 0
multi_topic   = 0
data_src      = 0
publish_freq  = 10.0
output_type   = 0
frame_id      = 'mid360_link'
lvx_file_path = '/home/unitree/livox_test.lvx'
cmdline_bd_code = 'livox0000000001'

# <-- this replaces your hard-coded path
user_config_path = PathJoinSubstitution(
    [FindPackageShare('g1_lidar'), 'config', 'livox_mid360.json'])

livox_ros2_params = [
    {"xfer_format": xfer_format},
    {"multi_topic": multi_topic},
    {"data_src": data_src},
    {"publish_freq": publish_freq},
    {"output_data_type": output_type},
    {"frame_id": frame_id},
    {"lvx_file_path": lvx_file_path},
    {"user_config_path": user_config_path},      # Substitution is OK here
    {"cmdline_input_bd_code": cmdline_bd_code},
]

def generate_launch_description():
    go2_control_domain_id = SetEnvironmentVariable('ROS_DOMAIN_ID', '10')

    nsp = os.environ.get('GO2_NS', 'go2_unit_001')
    rmp = [
        ('/tf', 'tf'),
        ('/tf_static', 'tf_static'),
    ]

    livox_driver = Node(
        namespace=nsp,
        remappings=rmp,
        name='livox_mid360_driver',
        package='livox_ros_driver2',
        executable='livox_ros_driver2_node',
        output='screen',
        parameters=livox_ros2_params,
    )

    ld = LaunchDescription()
    ld.add_action(go2_control_domain_id)
    ld.add_action(livox_driver)
    return ld

That doesn’t work. The config file cannot be found. With the hard-coded path, the Lidar starts again, but the same errors occur with pointcloud_to_laserscan.