# ROS2 Foxy: Package 'joy' not found\`

**URL:** <https://get-help.theconstruct.ai/t/ros2-foxy-package-joy-not-found/14287>\
**Category:** General Support\
**Created:** [December 16, 2021, 3:46pm UTC](https://get-help.theconstruct.ai/t/ros2-foxy-package-joy-not-found/14287 "2021-12-16T15:46:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teknetik](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/t/eb9ed0/32.png) [@Teknetik](https://get-help.theconstruct.ai/u/Teknetik)\
**Post date:** [December 16, 2021, 3:46pm UTC](https://get-help.theconstruct.ai/t/ros2-foxy-package-joy-not-found/14287/1 "2021-12-16T15:46:48Z")

</div>

I am trying to control my home lab robot using a BT Gamepad. I found a library here:

> **[GitHub - Ar-Ray-code/ps\_ros2\_common: Library for ROS2 that guarantees...](https://github.com/Ar-Ray-code/ps_ros2_common)**
>
> Library for ROS2 that guarantees compatibility in variables of PS controllers of each generation. For SONY(R) Dualshock3, Dualshock4, Dualsense(For PS5) - GitHub - Ar-Ray-code/ps\_ros2\_common: Libra...

That supports my PS controller.

The problem is no matter what I try I cannot see to install the “joy” pkg?

```auto
ubuntu@ubuntu:~/ros2_ws$ sudo apt install -y ros-foxy-joy*

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'ros-foxy-joy' for glob 'ros-foxy-joy*'
Note, selecting 'ros-foxy-joy-dbgsym' for glob 'ros-foxy-joy*'
Note, selecting 'ros-foxy-joy-linux-dbgsym' for glob 'ros-foxy-joy*'
Note, selecting 'ros-foxy-joy-teleop' for glob 'ros-foxy-joy*'
Note, selecting 'ros-foxy-joy-linux' for glob 'ros-foxy-joy*'
ros-foxy-joy is already the newest version (3.0.0-2focal.20211112.214147).
ros-foxy-joy-dbgsym is already the newest version (3.0.0-2focal.20211112.214147).
ros-foxy-joy-linux is already the newest version (3.0.0-2focal.20211112.213818).
ros-foxy-joy-linux-dbgsym is already the newest version (3.0.0-2focal.20211112.213818).
ros-foxy-joy-teleop is already the newest version (1.2.1-1focal.20211112.201933).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

rosdep update

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml

Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
Add distro "galactic"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/ubuntu/.ros/rosdep/sources.cache

rosdep install -a
#All required rosdeps installed successfully

source ~/ros2_foxy/ros2-linux/setup.bash

ros2 run joy joy_node
Package 'joy' not found

```

---

<div class="post-metadata">

**Author:** ![Teknetik](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/t/eb9ed0/32.png) [@Teknetik](https://get-help.theconstruct.ai/u/Teknetik)\
**Post date:** [December 16, 2021, 3:58pm UTC](https://get-help.theconstruct.ai/t/ros2-foxy-package-joy-not-found/14287/2 "2021-12-16T15:58:06Z")

</div>

The problem was:

```auto
source /opt/ros/foxy/setup.bash
# I did not source this one

source ~/ros2_foxy/ros2-linux/setup.bash
source ~/ros2_ws/install/setup.bash

```

Guess I am confused which ones need sourcing when and will have to learn more about this!

---

<div class="post-metadata">

**Author:** ![roalgoal](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/roalgoal/32/7280_2.png) [@roalgoal](https://get-help.theconstruct.ai/u/roalgoal)\
**Post date:** [December 20, 2021, 8:43am UTC](https://get-help.theconstruct.ai/t/ros2-foxy-package-joy-not-found/14287/3 "2021-12-20T08:43:28Z")

</div>

Hi @Teknetik , welcome to the community!

I am glad you found the solution to your problem. The reason why you have to source `/opt/ros/foxy/setup.bash` is because that is where the ROS installation is in your system, and the `joy` package was installed as a binary (`sudo apt install -y ros-foxy-joy*`). All packages installed this way end up in that directory.

The other workspaces are created manually, so you would source those when you want to work with packages that you make in them.

---

<div class="post-metadata">

**Author:** ![system](https://get-help.theconstruct.ai/uploads/default/original/2X/9/9d3ce8305cc0d0d9b6e07d15767a6f245c526f1b.jpeg) [@system](https://get-help.theconstruct.ai/u/system)\
**Post date:** [December 30, 2021, 8:44am UTC](https://get-help.theconstruct.ai/t/ros2-foxy-package-joy-not-found/14287/4 "2021-12-30T08:44:03Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
