# linorobot2
![linorobot2](docs/linorobot2.gif)
linorobot2 is a ROS2 port of the [linorobot](https://github.com/linorobot/linorobot) package. If you're planning to build your own custom ROS2 robot (2WD, 4WD, Mecanum Drive) using accessible parts, then this package is for you. This repository contains launch files to easily integrate your DIY robot with Nav2 and a simulation pipeline to run and verify your experiments on a virtual robot in Gazebo.
Once the robot's URDF has been configured in linorobot2_description package, users can easily switch between booting up the physical robot and spawning the virtual robot in Gazebo.
![linorobot2_architecture](docs/linorobot2_launchfiles.png)
Assuming you're using one of the tested sensors, linorobot2 automatically launches the necessary hardware drivers, with the topics being conveniently matched with the topics available in Gazebo. This allows users to define parameters for high level applications (ie. Nav2 SlamToolbox, AMCL) that are common to both virtual and physical robots.
The image below summarizes the topics available after running **bringup.launch.py**.
![linorobot2_microcontroller](docs/microcontroller_architecture.png)
An in-depth tutorial on how to build the robot is available in [linorobot2_hardware](https://github.com/linorobot/linorobot2_hardware).
## Installation
This package requires ros-foxy or ros-galactic. If you haven't installed ROS2 yet, you can use this [installer](https://github.com/linorobot/ros2me) script that has been tested to work on x86 and ARM based dev boards ie. Raspberry Pi4/Nvidia Jetson Series.
### 1. Robot Computer - linorobot2 Package
The easiest way to install this package on the robot computer is to run the bash script found in this package's root directory. It will install all the dependencies, set the ENV variables for the robot base and sensors, and create a linorobot2_ws (robot_computer_ws) on the robot computer's `$HOME` directory. If you're using a ZED camera with a Jetson Nano, you must create a custom Ubuntu 20.04 image for CUDA and the GPU driver to work. Here's a quick [guide](./ROBOT_INSTALLATION.md#1-creating-jetson-nano-image) on how to create a custom image for Jetson Nano.
source /opt/ros/<ros_distro>/setup.bash
cd /tmp
wget https://raw.githubusercontent.com/linorobot/linorobot2/${ROS_DISTRO}/install_linorobot2.bash
bash install_linorobot2.bash <robot_type> <laser_sensor> <depth_sensor>
source ~/.bashrc
robot_type:
- `2wd` - 2 wheel drive robot.
- `4wd` - 4 wheel drive robot.
- `mecanum` - Mecanum drive robot.
laser_sensor:
- `rplidar` - [RP LIDAR A1](https://www.slamtec.com/en/Lidar/A1)
- `ldlidar` - [LD06 LIDAR](https://www.inno-maker.com/product/lidar-ld06/)
- `ydlidar` - [YDLIDAR](https://www.ydlidar.com/lidars.html)
- `xv11` - [XV11](http://xv11hacking.rohbotics.com/mainSpace/home.html)
- `realsense` - * [Intel RealSense](https://www.intelrealsense.com/stereo-depth/) D435, D435i
- `zed` - * [Zed](https://www.stereolabs.com/zed)
- `zed2` - * [Zed 2](https://www.stereolabs.com/zed-2)
- `zed2i` - * [Zed 2i](https://www.stereolabs.com/zed-2i)
- `zedm` - * [Zed Mini](https://www.stereolabs.com/zed-mini)
- `-` - If the robot's sensor is not listed above.
Sensors marked with an asterisk are depth sensors. If a depth sensor is used as a laser sensor, the launch files will run [depthimage_to_laserscan](https://github.com/ros-perception/depthimage_to_laserscan) to convert the depth sensor's depth image to laser scans.
depth_sensor:
- `realsense` - [Intel RealSense](https://www.intelrealsense.com/stereo-depth/) D435, D435i
- `zed` - [Zed](https://www.stereolabs.com/zed)
- `zed2` - [Zed 2](https://www.stereolabs.com/zed-2)
- `zed2i` - [Zed 2i](https://www.stereolabs.com/zed-2i)
- `zedm` - [Zed Mini](https://www.stereolabs.com/zed-mini)
Alternatively, follow this [guide](./ROBOT_INSTALLATION.md) to do the installation manually.
### 2. Host Machine / Development Computer - Gazebo Simulation (Optional)
This step is only required if you plan to use Gazebo later. This comes in handy if you want to fine-tune parameters (ie. SLAM Toolbox, AMCL, Nav2) or test your applications on a virtual robot.
#### 2.1 Install linorobot2 Package
Install linorobot2 package on the host machine:
cd <host_machine_ws>
git clone -b $ROS_DISTRO https://github.com/linorobot/linorobot2 src/linorobot2
rosdep update && rosdep install --from-path src --ignore-src -y --skip-keys microxrcedds_agent --skip-keys micro_ros_agent
colcon build
source install/setup.bash
* microxrcedds_agent and micro_ros_agent dependency checks are skipped to prevent this [issue](https://github.com/micro-ROS/micro_ros_setup/issues/138) of finding its keys. This means that you have to always add `--skip-keys microxrcedds_agent --skip-keys micro_ros_agent` whenever you have to run `rosdep install` on the ROS2 workspace where you installed linorobot2.
#### 2.2 Define Robot Type
Set LINOROBOT2_BASE env variable to the type of robot base used. Available env variables are *2wd*, *4wd*, and *mecanum*. For example:
echo "export LINOROBOT2_BASE=2wd" >> ~/.bashrc
source ~/.bashrc
You can skip the next step (Host Machine - RVIZ Configurations) since this package already contains the same RVIZ configurations to visualize the robot.
### 3. Host Machine - RVIZ Configurations
Install [linorobot2_viz](https://github.com/linorobot/linorobot2_viz) package to visualize the robot remotely specifically when creating a map or initializing/sending goal poses to the robot. The package has been separated to minimize the installation required if you're not using the simulation tools on the host machine.
cd <host_machine_ws>
git clone https://github.com/linorobot/linorobot2_viz src/linorobot2_viz
rosdep update && rosdep install --from-path src --ignore-src -y
colcon build
source install/setup.bash
## Hardware and Robot Firmware
All the hardware documentation and robot microcontroller's firmware can be found [here](https://github.com/linorobot/linorobot2_hardware).
## URDF
### 1. Define robot properties
[linorobot2_description](./linorobot2_description) package has parameterized xacro files that can help you kickstart writing the robot's URDF. Open <robot_type>.properties.urdf.xacro in [linorobot2_description/urdf](./linorobot2_description/urdf) directory and change the values according to the robot's specification/dimensions. All pose definitions must be measured from the `base_link` (center of base) and wheel positions (ie `wheel_pos_x`) are referring to wheel 1.
For custom URDFs, you can change the `urdf_path` in [description.launch.py](./linorobot2_description/launch/description.launch.py) found in linorobot2_description/launch directory.
Robot Orientation:
--------------FRONT--------------
WHEEL1 WHEEL2 (2WD/4WD)
WHEEL3 WHEEL4 (4WD)
--------------BACK--------------
Build the robot computer's workspace to load the new URDF:
cd <robot_computer_ws>
colcon build
The same changes must be made on the host machine's <robot_type>.properties.urdf.xacro if you're simulating the robot in Gazebo. Remember to also build the host machine's workspace after editing the xacro file.
cd <host_machine_ws>
colcon build
### 2. Visualize the newly created URDF
#### 2.1 Publish the URDF from the robot computer:
ros2 launch linorobot2_description description.launch.py
Optional parameters for simulation on host machine:
- **rviz** - Set to true to visualize the robot in rviz2 and only if you're configuring the URDF from the host machine. For example:
ros2 launch linorobot2_description description.launch.py rviz:=true
#### 2.2 Visualize the robot from the host machine:
The `rviz` argument on description.launch.py won't work on headless setup but you can visualize the robot remotely from the host machine:
ros2 launch linorobot2_viz robot_model.launch.py
## Quickstart
All commands below are to be run on the robot
没有合适的资源?快使用搜索试试~ 我知道了~
自主移动机器人(2WD、4WD、MecanumDrive)_Python_Shell_下载.zip
共68个文件
xacro:18个
py:13个
yaml:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 108 浏览量
2023-04-25
11:54:34
上传
评论
收藏 16MB ZIP 举报
温馨提示
自主移动机器人(2WD、4WD、MecanumDrive)_Python_Shell_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
自主移动机器人(2WD、4WD、MecanumDrive)_Python_Shell_下载.zip (68个子文件)
linorobot2-galactic
linorobot2_gazebo
CMakeLists.txt 386B
worlds
playground.world 44KB
gas_station.world 5KB
package.xml 916B
launch
gazebo.launch.py 3KB
rviz
view_urdf.rviz 4KB
scripts
__init__.py 0B
command_timeout.py 2KB
update_microros.bash 207B
linorobot2_description
CMakeLists.txt 226B
urdf
robots
mecanum.urdf.xacro 2KB
2wd.urdf.xacro 2KB
4wd.urdf.xacro 2KB
square.urdf.xacro 3KB
mecanum_properties.urdf.xacro 884B
controllers
skid_steer.urdf.xacro 1KB
omni_drive.urdf.xacro 643B
diff_drive.urdf.xacro 960B
sensors
laser.urdf.xacro 3KB
imu.urdf.xacro 1KB
generic_laser.urdf.xacro 876B
depth_sensor.urdf.xacro 3KB
mech
wheel.urdf.xacro 2KB
mecanum_wheel.urdf.xacro 2KB
caster_wheel.urdf.xacro 2KB
base.urdf.xacro 2KB
2wd_properties.urdf.xacro 989B
4wd_properties.urdf.xacro 885B
package.xml 917B
launch
description.launch.py 3KB
rviz
description.rviz 5KB
LICENSE 11KB
docs
linorobot2_launchfiles.png 55KB
microcontroller_architecture.png 65KB
linorobot2.gif 15.87MB
linorobot2
CMakeLists.txt 106B
package.xml 690B
install_linorobot2.bash 10KB
.gitignore 17B
linorobot2_navigation
CMakeLists.txt 204B
package.xml 841B
launch
slam.launch.py 3KB
navigation.launch.py 3KB
rviz
linorobot2_navigation.rviz 20KB
linorobot2_navigation_minimal.rviz 8KB
linorobot2_slam.rviz 9KB
maps
playground.yaml 129B
playground.pgm 275KB
config
slam.yaml 2KB
navigation.yaml 10KB
ROBOT_INSTALLATION.md 9KB
README.md 14KB
linorobot2_base
CMakeLists.txt 181B
package.xml 697B
config
ekf.yaml 888B
linorobot2_bringup
CMakeLists.txt 191B
package.xml 983B
launch
default_robot.launch.py 2KB
joy_teleop.launch.py 1KB
depth.launch.py 3KB
lasers.launch.py 4KB
bringup.launch.py 3KB
sensors.launch.py 4KB
custom_robot.launch.py 2KB
config
zed_common.yaml 8KB
fake_laser.yaml 153B
joy.yaml 193B
ydlidar.yaml 515B
共 68 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9153
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功