# Getting error in c++ basics for ros

**URL:** <https://get-help.theconstruct.ai/t/getting-error-in-c-basics-for-ros/16509>\
**Category:** General Support\
**Tags:** error\
**Created:** [April 2, 2022, 10:30am UTC](https://get-help.theconstruct.ai/t/getting-error-in-c-basics-for-ros/16509 "2022-04-02T10:30:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartoszekmmmm](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/b/8491ac/32.png) [@bartoszekmmmm](https://get-help.theconstruct.ai/u/bartoszekmmmm)\
**Post date:** [April 2, 2022, 10:30am UTC](https://get-help.theconstruct.ai/t/getting-error-in-c-basics-for-ros/16509/1 "2022-04-02T10:30:25Z")

</div>

topic 4 has me create a package, that fine and diddy but every time I try to launch pkg with launch file I get this error:

Package ‘topic\_publisher\_pkg’ not found: “package ‘topic\_publisher\_pkg’ not found, searching: [’/opt/ros/foxy’]”

This is weird because I sourced the source ~/catkin\_ws/devel/setup.bash and everything, yet still it doesn’t see the package.

Does anyone know how to deal with this sort of problem?

---

<div class="post-metadata">

**Author:** ![Joseph1001](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/joseph1001/32/7077_2.png) [@Joseph1001](https://get-help.theconstruct.ai/u/Joseph1001)\
**Post date:** [April 11, 2022, 7:37am UTC](https://get-help.theconstruct.ai/t/getting-error-in-c-basics-for-ros/16509/2 "2022-04-11T07:37:07Z")

</div>

Hi @bartoszekmmmm  
1.Did you compile using `catkin_make` while being in the catkin\_ws directory and later source it?  
2. If you have done the above, run `rospack profile` to update the list of packages

Let me knowif this changes anything

---

<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:** [April 21, 2022, 7:37am UTC](https://get-help.theconstruct.ai/t/getting-error-in-c-basics-for-ros/16509/3 "2022-04-21T07:37:40Z")

</div>

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