Skip to content

Commit

Permalink
Merge branch 'humble' into jesus/#237_assembly_process
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusSilvaUtrera committed Jul 8, 2024
2 parents 57fc5b8 + 8aa4aaa commit c2c8fe1
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 7 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ Other projects built upon Andino! :rocket:
- :green_circle: [`andino_isaac`](https://github.com/Ekumen-OS/andino_isaac): [Isaac Sim](https://docs.omniverse.nvidia.com/isaacsim/latest/index.html) simulation of the Andino robot.
- :test_tube: [`andino_integration_tests`](https://github.com/Ekumen-OS/andino_integration_tests): Extension to the Andino robot showing how to build integration tests.

## :busts_in_silhouette: Community

[<img src="docs/discord-mark-blue.png" width=30 hspace="20"/>](https://discord.gg/tHhH32CTHu) Join our Discord and contribute to the community!


## :pick: Robot Assembly

Visit [`andino_hardware`](./andino_hardware/) for assembly instructions.
Expand Down
1 change: 1 addition & 0 deletions andino_base/include/andino_base/motor_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#pragma once

#include <array>
#include <cstdint>

#include <libserial/SerialPort.h>

Expand Down
29 changes: 29 additions & 0 deletions andino_bringup/config/raspicam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Calibration tutorial (from Nav2 docs): https://docs.nav2.org/tutorials/docs/camera_calibration.html
# Other info for this Raspberry Pi Camera Module V2 can be found here: https://elinux.org/Rpi_Camera_Module#Technical_Parameters_.28v.2_board.29

image_width: 640
image_height: 480
camera_name: narrow_stereo
camera_matrix:
rows: 3
cols: 3
data: [502.10979, 0. , 315.89371,
0. , 499.35622, 233.15895,
0. , 0. , 1. ]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [0.150091, -0.263342, 0.002136, -0.004508, 0.000000]
rectification_matrix:
rows: 3
cols: 3
data: [1., 0., 0.,
0., 1., 0.,
0., 0., 1.]
projection_matrix:
rows: 3
cols: 4
data: [510.31363, 0. , 312.43595, 0. ,
0. , 510.29425, 233.43648, 0. ,
0. , 0. , 1. , 0. ]
25 changes: 20 additions & 5 deletions andino_bringup/launch/camera.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,32 @@

from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution, TextSubstitution
from ament_index_python.packages import get_package_share_directory
from os.path import join

pkg_andino_bringup = get_package_share_directory('andino_bringup')

def generate_launch_description():
return LaunchDescription([
# Declare launch argument for the path to the camera params YAML file (the 'file://' part is mandatory, you can't skip it)
intrinsic_params_file = DeclareLaunchArgument(
'intrinsic_params_file',
default_value='file://' + join(pkg_andino_bringup, 'config', 'raspicam.yaml'),
description='Path to camera intrinsics YAML file'
)

return LaunchDescription([
intrinsic_params_file,
Node(
package='v4l2_camera',
executable='v4l2_camera_node',
name='v4l2_camera_node',
output='screen',
parameters=[{
'image_size': [640,480],
'camera_frame_id': 'camera_link'
}]
)
'image_size': [640, 480],
'camera_frame_id': 'camera_link',
'camera_info_url': LaunchConfiguration('intrinsic_params_file'),
}],
)
])
2 changes: 1 addition & 1 deletion andino_firmware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Via `serial` connection (57600 baud) it is possible to interact with the microco

- Get encoder values: `'e'`
- Set open-loop speed for the motors[pwm] `'o <left> <right>'`
- Example to move forward full speed: `'o 255 255'`
- Example to move forward full speed: `'o 255 255'`
- Range `[-255 -> 255]`
- Set closed-loop speed for the motors[ticks/sec] `'m <left> <right>'`
- Important!: See the `Test it!` section.
Expand Down
29 changes: 28 additions & 1 deletion andino_hardware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,33 @@ Check camera status:
vcgencmd get_camera
```

If the output of the previous command is `supported=1 detected=1', everything is fine. If not, your camera won't work correctly, you need to perform some configuration first.

Modify the `config.txt` file for the boot:

```sh
sudo nano /boot/firmware/config.txt
```

And add these lines:

```
# Autoload overlays for any recognized cameras or displays that are attached
# to the CSI/DSI ports. Please note this is for libcamera support, *not* for
# the legacy camera stack
start_x=1
gpu_mem=128
```

Save and close the file. Then we need to enable the camera support for the raspberry:

```sh
sudo raspi-config
```

Go to `Interface Options`, select `camera` and enable it.

Finally, you just need to reboot and the camera should be working fine.

#### RPLidar installation

Expand Down Expand Up @@ -344,7 +371,7 @@ Let' source the ROS Humble installation:
```
source /opt/ros/humble/setup.bash
```
Let's build the packages (`andino_gz_classic` and `andino_apps` work only in simulation):
Let's build the packages (`andino_gz_classic` and `andino_apps` relies on simulation so we skip them):
```
colcon build --packages-skip andino_gz_classic andino_apps
```
Expand Down
Binary file added docs/discord-mark-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c2c8fe1

Please sign in to comment.