Closed Thieso closed 4 months ago
I have the same issue. #342 did not fix this issue for me. I am using this flake.nix
:
{
inputs = {
nix-ros-overlay.url = "github:lopsided98/nix-ros-overlay";
nixpkgs.follows = "nix-ros-overlay/nixpkgs";
};
outputs = { self, nix-ros-overlay, nixpkgs }:
nix-ros-overlay.inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ nix-ros-overlay.overlays.default ];
};
in {
devShells.default = pkgs.mkShell {
name = "Example project";
packages = with pkgs.rosPackages.humble; [
pkgs.colcon
ros-core
joint-state-publisher
robot-state-publisher
];
};
});
nixConfig = {
extra-substituters = [ "https://ros.cachix.org" ];
extra-trusted-public-keys = [ "ros.cachix.org-1:dSyZxI8geDCJrwgvCOHDoAfOm5sV1wCPjBkKL+38Rvo=" ];
};
}
I am running:
$ ros2 run joint_state_publisher joint_state_publisher
Package 'joint_state_publisher' not found
$ echo $AMENT_PREFIX_PATH | grep --color joint_state_publisher
(nothing)
It appears this happens because the hooks to setup AMENT_PREFIX_PATH
are installed by colcon for ament_python
packages. For ament_cmake
packages, they are installed through CMake even if you don't use colcon. This is another reason I should probably try to use colcon to build everything.
For now though, it should work if you use buildEnv
.
Hello, I am trying to install the
joint-state-publisher
package for ros2 humble but when I runros2 run joint_state_publisher joint_state_publisher
there is no package found.The
flake.nix
I am using is: