Skip to content

Commit

Permalink
Update build instructions (#57)
Browse files Browse the repository at this point in the history
* export env var in readme

* update docs as well

* added to dockerfile

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* using .bash and corrected order

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* updated docs

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

---------

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
  • Loading branch information
quarkytale authored Jun 27, 2023
1 parent 4ee7b21 commit f424881
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 9 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,13 @@ This sources the compiled workspace and launches the simulation:
1. In a new terminal (whether on host machine or in Docker container), source the workspace
```
. ~/mbari_wec_ws/install/setup.sh
. ~/mbari_wec_ws/install/setup.bash
```
1. Set `SDF_PATH` to allow `robot_state_publisher` to parse the robot description from the sdformat model:
```
export SDF_PATH=$GZ_SIM_RESOURCE_PATH
```
1. Launch the simulation
Expand Down
7 changes: 4 additions & 3 deletions docker/mbari_wec/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ RUN /bin/bash -c 'source /opt/ros/humble/setup.bash \
ENV SETUP_SH /home/$USERNAME/setup.bash
RUN touch ${SETUP_SH} \
&& chmod 755 ${SETUP_SH} \
&& echo ". ${MBARI_WEC_WS}/install/setup.bash" >> ${SETUP_SH}
&& echo ". ${MBARI_WEC_WS}/install/setup.bash" >> ${SETUP_SH} \
&& echo "export SDF_PATH=\$GZ_SIM_RESOURCE_PATH" >> ${SETUP_SH}
ENV RUN_SH /home/$USERNAME/run_simulation.bash
RUN touch ${RUN_SH} \
&& chmod 755 ${RUN_SH} \
&& echo ". ${MBARI_WEC_WS}/install/setup.bash" >> ${RUN_SH} \
&& echo ". ${SETUP_SH}" >> ${RUN_SH} \
&& echo "ros2 launch buoy_gazebo mbari_wec.launch.py" >> ${RUN_SH}

# Start the container at a bash prompt
ENTRYPOINT ["/bin/bash" , "-c" , "source ${MBARI_WEC_WS}/install/setup.bash && /bin/bash"]
ENTRYPOINT ["/bin/bash" , "-c", "source ${SETUP_SH} && /bin/bash"]
2 changes: 1 addition & 1 deletion docs/docs/Tutorials/Install/Install_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This sources the compiled workspace and launches the simulation:

1. In a new terminal (whether on host machine or in Docker container), source the workspace
```
. ~/mbari_wec_ws/install/setup.sh
. ~/mbari_wec_ws/install/setup.bash
```

1. Launch the simulation
Expand Down
8 changes: 7 additions & 1 deletion docs/docs/Tutorials/Install/Install_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,15 @@ Use Ubuntu 22.04.

1. In a new terminal, source the workspace
```
. ~/mbari_wec_ws/install/setup.sh
. ~/mbari_wec_ws/install/setup.bash
```

1. Set `SDF_PATH` to allow `robot_state_publisher` parse the robot description
from the sdformat model (place this in ~/.bashrc for convenience if rebuilding often):
```
export SDF_PATH=$GZ_SIM_RESOURCE_PATH
```

1. Launch the simulation
```
ros2 launch buoy_gazebo mbari_wec.launch.py
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Tutorials/Simulation/RunSimulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To run the simulator, it is necessary to source the workspace in a separate term

1. Source the workspace
```
$ . ~/mbari_wec_ws/install/setup.sh
$ . ~/mbari_wec_ws/install/setup.bash
```
2. Launch the simulation
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Installation and Running
- To install, see instructions [here](https://index.ros.org/p/plotjuggler/). If using the supplied docker images, this step is not necessary as the software is already installed.

- To start, issue the following command in a window where the environment has already been sourced using ```$ . ~/mbari_wec_ws/install/setup.sh```:
- To start, issue the following command in a window where the environment has already been sourced using ```$ . ~/mbari_wec_ws/install/setup.bash```:

```
$ ros2 run plotjuggler plotjuggler
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Tutorials/Simulation/SimulatorOutputROS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# View ROS 2 Messages

While running, the simulator generates exactly the same ROS 2 messages that the buoy hardware does during operation. These are grouped into ROS 2 topics that corresponds to data being produced by each micro-controller or instrument on the buoy. To see all ROS 2 topics being published to on the system, issue the following command (after sourcing the workspace if needed in a new terminal ``` $ . ~/mbari_wec_ws/install/setup.sh```
While running, the simulator generates exactly the same ROS 2 messages that the buoy hardware does during operation. These are grouped into ROS 2 topics that corresponds to data being produced by each micro-controller or instrument on the buoy. To see all ROS 2 topics being published to on the system, issue the following command (after sourcing the workspace if needed in a new terminal ``` $ . ~/mbari_wec_ws/install/setup.bash```

```
$ ros2 topic list
Expand Down

0 comments on commit f424881

Please sign in to comment.