Skip to content

Commit

Permalink
Added package dependencies for rosdep (#36)
Browse files Browse the repository at this point in the history
* added package depend

* added gz_sim depend

* updated readme(rosdep)

* added bash commands for percep_ws

* added python path note
  • Loading branch information
NOEMOJI041 authored Sep 29, 2023
1 parent 71eb12b commit 8c9515b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,31 @@ Refer to the official [ROS 2 installation guide](https://docs.ros.org/en/humble/
Now go ahead and clone this repository inside the "src" folder of the workspace you just created.

```bash
cd percep_ws/src
git clone [email protected]:atom-robotics-lab/ros-perception-pipeline.git
cd percep_ws && git clone [email protected]:atom-robotics-lab/ros-perception-pipeline.git src/
```
3. Install dependencies using rosdep

3. Compile the package
Update Your rosdep before installation.

```bash
rosdep update
```

This command installs all the packages that the packages in your catkin workspace depend upon but are missing on your computer.
```bash
rosdep install --from-paths src --ignore-src -r -y
```

4. Compile the package

Follow this execution to compile your ROS 2 package

```bash
colcon build --symlink-install
```

4. Source your workspace
5. Source your workspace

```bash
source install/local_setup.bash
```
Expand Down Expand Up @@ -181,8 +193,25 @@ file according to your present working directory
ros2 run object_detection ObjectDetection --ros-args --params-file src/ros-perception-pipeline/object_detection/config/object_detection.yaml
```
**Note :** If your imports are not working while using a virtual environment, you'll need to manually set your `PYTHONPATH` environment variable.
Follow these steps to do this :

1. Activate your virtual environment

2. Find out the path of your virtual environment's Python installation
```bash
which Python
```
3. Set your `PYTHONPATH`
```bash
export PYTHONPATH = {insert_your_python_path_here}
```
### 3. Changing the Detector
To change the object detector being used, you can change the parameters inside the object_detection.yaml file location inside
the **config** folder.
Expand Down
4 changes: 3 additions & 1 deletion object_detection/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>

<exec_depend>vision_msgs</exec_depend>
<exec_depend>cv_bridge</exec_depend>

<export>
<build_type>ament_python</build_type>
</export>
Expand Down
3 changes: 2 additions & 1 deletion perception_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<exec_depend>ros_gz</exec_depend>
<exec_depend>ros_gz_bridge</exec_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down

0 comments on commit 8c9515b

Please sign in to comment.