Skip to content

Commit

Permalink
Merge pull request #201 from rubennc91/master
Browse files Browse the repository at this point in the history
Added home environment to Gazebo
  • Loading branch information
rubennc91 authored Sep 27, 2023
2 parents ba90096 + ecd7c5a commit b3ad99e
Show file tree
Hide file tree
Showing 619 changed files with 722,303 additions and 28 deletions.
37 changes: 26 additions & 11 deletions sim_fpga/paper-FPGA_Robotics-sim-FPGA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,43 @@
mkdir src
cd src
catkin_create_pkg diffdrive_cam_bot std_msgs rospy roscpp
Copy the sources from paper_ros_ws to my directory source of the package. Include the turtlebot2_urdf_model folder.
cd ..
catkin_make
Copy the sources from JdeRobot repository *~/FPGA-robotics/sim_fpga/paper-FPGA_Robotics-sim-FPGA/paper_ros_ws/* to the directory *src* of the ros package *~/paper_simfpga_ws/src/*. Include the turtlebot2_urdf_model folder.

(opt) cp -r * ~/catkin_ws/src/
cd .. (paper_simfpga_ws)
(New terminal)
git clone https://github.com/JdeRobot/FPGA-robotics.git
cp -r ~/FPGA-robotics/sim_fpga/paper-FPGA_Robotics-sim-FPGA/paper_ros_ws/* paper_simfpga_ws/src/

cd ~/paper_simfpga_ws
catkin_make
roscd diffdrive_cam_turtlebot to check

Add the directories to .bashrc

source /opt/ros/noetic/setup.bash
source ~/paper_simfpga_ws/devel/setup.bash
Restart terminal

Check that all is right

roscd diffdrive_cam_bot
Launch the main of diffdrive_cam_bot

roslaunch diffdrive_cam_bot main.launch

### Prepare Verilator workspace
Copy the workspace from paper_verilator_ws in a place.
Go to Verilator workspace.

cd paper_verilator_ws
cd ~/FPGA-robotics/sim_fpga/paper-FPGA_Robotics-sim-FPGA/paper_verilator_ws
make

##### Check the PoC verilator simFPGA
./obj_dir/Vdesign_top

### Start it up all together:
- Terminal 1: Launch ROS (`roscore`)
- Terminal 2: Launch PoC verilator simFPGA (`./obj_dir/Vdesign_top`)
- Terminal 3: Launch Gazebo environment (`roslaunch diffdrive_cam_bot main.launch`)

### Possible bug fixes
source /opt/ros/noetic/setup.bash
source ~/catkin_ws/devel/setup.bash
roslaunch diffdrive_cam_bot main.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Issue #, if available:*

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 2.8.3)
project(aws_robomaker_small_house_world)

find_package(catkin REQUIRED COMPONENTS
gazebo_ros
)

catkin_package()

install(DIRECTORY launch models worlds maps photos routes
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Contributing Guidelines

Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
documentation, we greatly value feedback and contributions from our community.

Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.


## Reporting Bugs/Feature Requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/aws-robotics/aws-robomaker-small-house-world/issues), or [recently closed](https://github.com/aws-robotics/aws-robomaker-small-house-world/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
* The version of our code being used
* Any modifications you've made relevant to the bug
* Anything unusual about your environment or deployment


## Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *master* branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.

To send us a pull request, please:

1. Fork the repository.
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
3. Ensure local tests pass.
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).


## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws-robotics/aws-robomaker-small-house-world/labels/help%20wanted) issues is a great place to start.


## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.


## Security issue notifications
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.


## Licensing

See the [LICENSE](https://github.com/aws-robotics/aws-robomaker-small-house-world/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# AWS RoboMaker Small House World ROS package

![Gazebo01](docs/images/gazebo_01.png)

## AWS Robomaker Small House World on Gzweb

![Gzweb01](docs/images/gzweb_aws_house.png)## AWS Robomaker Small House World on Gzweb

**Visit the [AWS RoboMaker website](https://aws.amazon.com/robomaker/) to learn more about building intelligent robotic applications with Amazon Web Services.**

# Include the world from another package

* Update .rosinstall to clone this repository and run `rosws update`
```
- git: {local-name: src/aws-robomaker-small-house-world, uri: 'https://github.com/aws-robotics/aws-robomaker-small-house-world.git', version: ros1}
```
* Add the following to your launch file:
```xml
<launch>
<!-- Launch World -->
<include file="$(find aws_robomaker_small_house_world)/launch/small_house.launch"/>
...
</launch>
```

# Load directly into Gazebo (without ROS)
```bash
export GAZEBO_MODEL_PATH=`pwd`/models
gazebo worlds/small_house.world
```

## Example: Running this world on Gazebo headless and running the UI on Gzweb
*Tested in ROS Kinetic/Melodic, Gazebo 7/9 with node version 8.11.3/10.22.1*

To open this world in Gzweb, There are two steps,

1) In a terminal, change to your ROS workspace root folder and run gzserver with the small warehouse world:

```bash
cd aws-robomaker-small-house-world
export GAZEBO_MODEL_PATH=`pwd`/models
gzserver worlds/small_house.world --verbose
```

2) In another terminal, setup and run GzWeb
- Install GzWeb by following the [official documentation](http://gazebosim.org/gzweb#install-collapse-1):

**Important**:
* The recommended NodeJS versions are 4 up to version 8.
* Watch out for [conflicting installations of Node/NodeJS](https://askubuntu.com/questions/695155/node-nodejs-have-different-version)
* See [Troubleshooting section](http://gazebosim.org/gzweb#install-collapse-3) for other issues

- Deploy GzWeb
- export Gazebo model path and run the deploy script with `-m local`

```bash
cd aws-robomaker-small-house-world
export GAZEBO_MODEL_PATH=`pwd`/models
cd ~/gzweb
export GAZEBO_MASTER_URI="http://localhost:11345" # change localhost to IP address of the gzserver machine
npm run deploy --- -m local
npm start
```
*Note: For Portrait Images put the required images mentioned in each visual.DAE file to each materials/textures folder because gzweb could only use the assets mentioned in gzweb/http/client/assets folder for each model.*

# ROS Launch with Gazebo viewer (without a robot)
```bash
# build for ROS
rosdep install --from-paths . --ignore-src -r -y
colcon build
# run in ROS
source install/setup.sh
roslaunch aws_robomaker_small_house_world view_small_house.launch
```

# Building
Include this as a .rosinstall dependency in your SampleApplication simulation workspace. `colcon build` will build this repository.

To build it outside an application, note there is no robot workspace. It is a simulation workspace only.

```bash
$ rosws update
$ rosdep install --from-paths . --ignore-src -r -y
$ colcon build
```

# How to Replace Photos in Picture Frames

Picture frames use two textures for the model:
- `aws_portraitA_01.png` - Frame texture
- `aws_portraitA_02.png` - Picture texture

To change a picture, one has to replace the `aws_portraitA_02.png` file. The new image will look best with same aspect ratio as the replaced image.

Below is a table showing portrait type to picture resolution data and custom images from photos/.

| Portrait Model | Resolution | Photo |
| --- | --- | --- |
| DeskPortraitA_01 | 650x1024 | |
| DeskPortraitA_02 | 650x1024 | doug |
| DeskPortraitB_01 | 650x1024 | |
| DeskPortraitB_02 | 650x1024 | |
| DeskPortraitC_01 | 1024x1024 | |
| DeskPortraitC_02 | 1024x1024 | |
| DeskPortraitD_01 | 1024x1024 | |
| DeskPortraitD_02 | 1024x1024 | |
| DeskPortraitD_03 | 1024x1024 | |
| DeskPortraitD_04 | 1024x1024 | ray |
| PortraitA_01 | 700x1024 | tim |
| PortraitA_02 | 700x1024 | anamika |
| PortraitB_01 | 700x1024 | renato |
| PortraitB_02 | 700x1024 | brandon |
| PortraitB_03 | 700x1024 | miaofei |
| PortraitC_01 | 650x1024 | sean |
| PortraitD_01 | 1024x450 | |
| PortraitD_02 | 1024x450 | |
| PortraitE_01 | 700x1024 | maggie |
| PortraitE_02 | 700x1024 | iftach |

# Disclaimer

All objects in the scene should be static objects as intended for this sample app.
If there is a need for some of objects to be non-static, change their 'static' flag in the world file to 'false',
and make sure they have correct mass and inertia values in their model.sdf
Link: http://gazebosim.org/tutorials?tut=inertia&cat=build_robot

Currently, objects in scene have inconsistent mass and inertia values, they will be fixed in the future change.
Inconsistent mass and inertia should not affect static object simulation.


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<launch>
<!-- Always set GUI to false for AWS RoboMaker Simulation
Use gui:=true on roslaunch command-line to run with a gui.
-->
<arg name="gui" default="false"/>

<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find aws_robomaker_small_house_world)/worlds/small_house.world"/>
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="$(arg gui)"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<arg name="verbose" default="true"/>
</include>
</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<launch>
<!-- Show Gazebo GUI on launch -->
<include file="$(find aws_robomaker_small_house_world)/launch/small_house.launch">
<arg name="gui" value="true"/>
</include>
</launch>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
image: map.pgm
resolution: 0.050000
origin: [-12.500000, -12.500000, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b3ad99e

Please sign in to comment.