Skip to content

Commit

Permalink
Merge pull request #53 from ETHZ-RobotX/feature/update-docs
Browse files Browse the repository at this point in the history
add doc fixes
  • Loading branch information
Huoleit authored Jun 29, 2024
2 parents e527f96 + ae92d04 commit aa22502
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
9 changes: 9 additions & 0 deletions docs/installation/local-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,15 @@ alias connect-smb="export ROS_MASTER_URI=http://\$(ip route show default | grep
Then (for any newly openend terminal), you can execute `connect-smb` to set the correct environment variables for your robot.
The `connect-smb` command doesn't work on Docker running on Mac and Windows, there you can set an allias for exporting the `ROS_MASTER_URI` and manually find the `ROS_IP` of the host using `ifconfig` (e.g: 10.0.X.Y)
{: .warning}
```bash
# For mac/windows docker environment
alias connect-smb261="export ROS_MASTER_URI=http://10.0.1.5:11311 ; export ROS_IP=10.0.1.Y" # replace the Y with the ip of the host computer (outside docker)
# You can define similar commands for other robots
```
## 🔂 Updating the SMB Core Software
Expand Down
12 changes: 11 additions & 1 deletion docs/physical-robot/setting-up/robot-workspace-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,14 @@ A convinient way to set the variables is to **adjust the following code to match
alias connect-smb="export ROS_MASTER_URI=http://\$(ip route show default | grep -oP 'via \K\d+\.\d+\.\d+').5:11311 ; export ROS_IP=\$(ip route get 8.8.8.8 | grep -oP '(?<=src )\S+') ; echo 'ROS_MASTER_URI and ROS_IP set to ' ; printenv ROS_MASTER_URI ; printenv ROS_IP"
```

Then (for any newly openend terminal), you can execute `connect-smb` to set the correct environment variables for your robot.
Then (for any newly openend terminal), you can execute `connect-smb` to set the correct environment variables for your robot.

The `connect-smb` command doesn't work on Docker running on Mac and Windows, there you can set an allias for exporting the `ROS_MASTER_URI` and manually find the `ROS_IP` of the host using `ifconfig` (e.g: 10.0.X.Y)
{: .warning}

```bash
# For mac/windows docker environment
alias connect-smb261="export ROS_MASTER_URI=http://10.0.1.5:11311 ; export ROS_IP=10.0.1.Y" # replace the Y with the ip of the host computer (outside docker)

# You can define similar commands for other robots
```
16 changes: 14 additions & 2 deletions docs/physical-robot/tasks/object-detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,20 @@ has_toc: false
Once the planner is set up and the real SMB is running, you can begin experimenting with object detection. Ensure that the `object_detection` package is built. If it isn't, use the following command:

```bash
# On the host PC
# On the SMB
catkin build object_detection
```

Source the workspace again and launch the SMB launch file.

```bash
# On the SMB
roslaunch smb smb.launch

# If you see the message "First IMU Received",
# everything started without any problem
```

Next, launch the object detection locally with these parameters for the real robot:

- `model_path=""`: Don't set this parameter if you want to use the pre-installed model. If you have a downloaded model, specify its path.
Expand All @@ -25,13 +35,14 @@ Next, launch the object detection locally with these parameters for the real rob
To launch the detection pipeline locally, run:

```bash
# In the host PC
# On the SMB
roslaunch object_detection object_detection.launch object_detection_classes:="[0,1,2,10]"
```

To view the bounding boxes and get more information about the detections use the following two commands:

```bash
# On the host
rosrun rqt_image_view rqt_image_view
```

Expand All @@ -44,6 +55,7 @@ Then select the following topic to see the bounding boxes in the image:
To get more information like position, classification, etc. subscribe to or echo the following topic:

```bash
# On the host
rostopic echo /object_detector/detection_info
```

Expand Down
14 changes: 13 additions & 1 deletion docs/simulation/tasks/object-detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ Once the planner is set up and the SMB simulation is running, you can begin expe
catkin build object_detection
```

Source the workspace again and launch the SMB launch file.

```bash
# On the host PC
roslaunch smb smb.launch

# If you see the message "First IMU Received",
# everything started without any problem
```

Next, launch the object detection locally with these parameters for simulation:

- `gpu="off"`: Runs detection on the CPU.
Expand All @@ -29,12 +39,13 @@ Note: The `object_detection_classes` parameter is only effective on the real rob
To launch the detection pipeline locally, run:

```bash
# In the host PC
# On the host PC
roslaunch object_detection object_detection.launch gpu:=off model:=yolov5l6
```
To view the bounding boxes and get more information about the detections use the following two commands:

```bash
# On the host PC
rosrun rqt_image_view rqt_image_view
```

Expand All @@ -47,6 +58,7 @@ Then select the following topic to see the bounding boxes in the image:
To get more information like position, classification, etc. subscribe to or echo the following topic:

```bash
# On the host PC
rostopic echo /object_detector/detection_info
```

Expand Down

0 comments on commit aa22502

Please sign in to comment.