Skip to content

Commit

Permalink
Modified chassis desgin, Updated URDF, all the sensors working, names…
Browse files Browse the repository at this point in the history
…pace done
  • Loading branch information
D-1shu authored and ggupta9777 committed Jun 28, 2023
1 parent 5936a73 commit e70d22e
Show file tree
Hide file tree
Showing 125 changed files with 72,860 additions and 1,381 deletions.
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Python
__pycache__/
*.pyc

# ROS
build/
devel/
logs/
install/
build_isolated/
devel_isolated/
*.bag
CATKIN_IGNORE

# Misc
.vscode/
*.swp
log/
test/

# Unity
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
59 changes: 22 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## About

A 6 wheeled differential drive robot with camera, 2D lidar and conveyor belt. The repository offers files for both simulators [gazebo classic](https://classic.gazebosim.org/) and [gazebo](https://gazebosim.org/home).
Explore our indoor 6-wheeled differential drive robot with a depth camera and 2D lidar. Our repository supports [gazebo classic](https://classic.gazebosim.org/) and [gazebo](https://gazebosim.org/home), facilitating exploration and simulation. Maneuverable in indoor environments, this robot is equipped with a depth camera for precise navigation and object perception. The 2D lidar enhances perception with accurate distance measurements for mapping and obstacle avoidance. Join us on this exciting robotics journey, accessing comprehensive documentation, code samples, and simulation files to harness the full potential of our indoor robot with its advanced depth camera capabilities.

## Dependencies

Expand All @@ -25,23 +25,24 @@ A 6 wheeled differential drive robot with camera, 2D lidar and conveyor belt. Th
Note: If required there is an example `Dockerfile` that shows the installation for Humble-Fortress combination

* Build the package:

colcon build --symlink-install

```bash
colcon build --symlink-install
```
## Run Instructions

* Launch the robot in gazebo:

ros2 launch new_bcr_robot gazebo.launch.py

```bash
ros2 launch new_bcr_robot gazebo.launch.py
```
* Launch the robot in RViz:

ros2 launch new_bcr_robot rviz.launch.py

```bash
ros2 launch new_bcr_robot rviz.launch.py
```
* Launch the robot in Ignition Gazebo Fortress

ros2 launch new_bcr_robot gz.launch.py

```bash
ros2 launch new_bcr_robot gz.launch.py
```

## Configuration

### Xacro Configurations
Expand All @@ -68,36 +69,20 @@ robot_description_content = get_xacro_to_doc(

### World File Configurations

The `worlds` directory has two subdirectories: `gazebo` and `gz`. Both of these host world files for each simulator respectively. Here are the expected outputs from each world configuration:
The `worlds` directory has two subdirectories: `gazebo` and `gz`. Both of these host world file for each simulator respectively. Here are the expected outputs from each world configuration:

1. Gazebo Classic (Empty World):
1. Gazebo Classic (small_warehouse):

Launch file Change in the Launch Description:
```python
DeclareLaunchArgument(
'world', default_value=[FindPackageShare('gazebo_ros'), '/worlds/empty.world'],
'world', default_value=[FindPackageShare('new_bcr_robot'), '/worlds/small_warehouse.world'],
)
```
![](res/empty_gazebo.png)
![](res/gazebo.jpg)

2. Gazebo Classic (Mars):
Launch file Change in the Launch Description:
```python
DeclareLaunchArgument(
'world', default_value=[FindPackageShare('new_bcr_robot'), '/worlds/gazebo/mars.world'],
)
```
![](res/mars_gazebo.png)

3. Gazebo Classic (Corridor):
Launch file Change in the Launch Description:
```python
DeclareLaunchArgument(
'world', default_value=[FindPackageShare('new_bcr_robot'), '/worlds/gazebo/corridor.world'],
)
```
![](res/corridor_gazebo.png)
2. Gz Sim (Ignition Gazebo) (small_warehouse World):
![](res/gz.png)

4. Gz Sim (Ignition Gazebo) (Empty World):\
No Changes to launch file\
![](res/empty_gz.png)
2. Rviz (Depth camera) (small_warehouse World):
![](res/rviz.png)
3 changes: 2 additions & 1 deletion hooks/new_bcr_robot.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ if test -f "$FILE"; then
fi

# Adding our models to the GAZEBO_MODEL_PATH
ament_prepend_unique_value GAZEBO_MODEL_PATH "$COLCON_CURRENT_PREFIX/share/@PROJECT_NAME@/models"
ament_prepend_unique_value GAZEBO_MODEL_PATH "$COLCON_CURRENT_PREFIX/share/@PROJECT_NAME@/models"

7 changes: 4 additions & 3 deletions launch/gazebo.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ def generate_launch_description():

# Path to the Xacro file
xacro_path = join(get_package_share_directory('new_bcr_robot'), 'urdf', 'new_bcr_robot.xacro')
doc = get_xacro_to_doc(xacro_path, {"wheel_odom_topic": "odom", "sim_gazebo": "true"})
doc = get_xacro_to_doc(xacro_path, {"wheel_odom_topic": "odom", "sim_gazebo": "true", "two_d_lidar_enabled": "true", "camera_enabled": "true"})

# Launch the robot_state_publisher node
robot_state_publisher = Node(
package='robot_state_publisher',
executable='robot_state_publisher',
name='robot_state_publisher',
output='screen',
parameters=[{'use_sim_time': use_sim_time}, {'robot_description': doc.toxml()}]
parameters=[{'use_sim_time': use_sim_time}, {'robot_description': doc.toxml()}],
remappings=[('joint_states', '/new_bcr_robot/joint_states')]
)

# Launch the spawn_entity node to spawn the robot in Gazebo
Expand All @@ -50,7 +51,7 @@ def generate_launch_description():

return LaunchDescription([
# Declare launch arguments
DeclareLaunchArgument('world', default_value=[FindPackageShare('new_bcr_robot'), '/worlds/gazebo/mars.world']),
DeclareLaunchArgument('world', default_value=[FindPackageShare('new_bcr_robot'), '/worlds/gazebo/small_warehouse.world']),
DeclareLaunchArgument('gui', default_value='true'),
DeclareLaunchArgument('verbose', default_value='false'),
DeclareLaunchArgument('use_sim_time', default_value='true'),
Expand Down
4 changes: 2 additions & 2 deletions launch/gz.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate_launch_description():
use_sim_time = LaunchConfiguration("use_sim_time", default=True)

new_bcr_robot_path = get_package_share_directory("new_bcr_robot")
world_file = LaunchConfiguration("world_file", default = "-r " + join(new_bcr_robot_path, "worlds", "gz", "empty.sdf"))
world_file = LaunchConfiguration("world_file", default = "-r " + join(new_bcr_robot_path, "worlds", "gz", "small_warehouse.sdf"))

position_x = LaunchConfiguration("x")
position_y = LaunchConfiguration("y")
Expand All @@ -32,7 +32,7 @@ def generate_launch_description():
{"wheel_odom_topic": "odom",
"sim_gz": "true",
"two_d_lidar_enabled": "true",
"conveyor_enabled": "true",
"conveyor_enabled": "false",
"camera_enabled": "true"
}
).toxml()
Expand Down
Loading

0 comments on commit e70d22e

Please sign in to comment.