robostack.github.io icon indicating copy to clipboard operation
robostack.github.io copied to clipboard

lcm not available

Open Yixun-Hu opened this issue 3 months ago • 5 comments

I need to get lcm to use unitree_ros_to_real, but I failed to install lcm inside conda ros2 humble:

$ conda install -c conda-forge lcm
Channels
 - conda-forge
 - robostack-humble
Platform: linux-aarch64
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - lcm

Current channels:

  - https://conda.anaconda.org/conda-forge
  - https://conda.anaconda.org/robostack-humble

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

How can I fix this problem?

Yixun-Hu avatar Nov 22 '25 23:11 Yixun-Hu

We'll need to add lcm (https://lcm-proj.github.io/lcm/content/build-instructions.html) to conda-forge, see https://github.com/conda-forge/staged-recipes

Tobias-Fischer avatar Nov 23 '25 00:11 Tobias-Fischer

Can you also explain from where the lcm requirement comes? I checked in https://github.com/unitreerobotics/unitree_ros2 and I could not find anything, how are you installing it in the regular unitree_ros2 install?

traversaro avatar Nov 23 '25 07:11 traversaro

Thank you so much for your help! Sorry for my late reply.

I was trying different way to get zed_ros2_wrapper, unitree_ros_to_real and nav2 ROS2 work on my Jetson Orin NX 16 GB. Sorry for my typo in the last message, it was unitree_ros_to_real, not unitree_ros2. What I exactly follow is this repo. I may encounter the lcm depency error when I try to use colcon to compile the unitree_ros_to_real.

I really thank you for the fast reply and support!

Yixun-Hu avatar Nov 29 '25 16:11 Yixun-Hu

Ok, that is clear! In that case @Tobias-Fischer is the correct one, as lcm is not a ROS package in any way, so to prepare the lcm conda package it is necessary to package lcm in conda-forge. Fortunately lcm is a fairly standard CMake project, so I would expect it to be relatively easy, you can probably also take inspiration from other distros that already package lcm ( https://repology.org/project/lcm/versions ). Also, lcm has bindings for Python, but in your case I guess you are only interested in the C++ part, so probably it is not necessary to package the Python part. For more docs on this, see https://conda-forge.org/docs/maintainer/adding_pkgs/ .

Alternatively, you can also build lcm from source in your colcon environment, the process should be more and less to add the lcm repo at the version you prefer to your colcon workspace.

traversaro avatar Nov 29 '25 17:11 traversaro

Yes I guess may build lcm from source in my colcon environment may sound a good idea!

Yixun-Hu avatar Nov 30 '25 05:11 Yixun-Hu