Giter VIP home page Giter VIP logo

ros2lint's Introduction

ros2lint

How to use a light-weight version of ros2, packages are up to rclc and ros2cli_common_extensions when building from source code.

Description

This repository demonstrate how to build a light-weight version of ros2, packages up to rclc and ros2cli_common_extensions. It is intended to be used for linting purposes only.

Install from source code

Prerequisites

reference(humble)

TODO: For specific dependencies, please refer to the Dockerfile.

Build

Instead of building the entire ros2, we only build the packages we need. In this case we build packages up to rclc and ros2cli_common_extensions.

colcon build --packages-up-to rclc --packages-up-to ros2cli_common_extensions

Install

We install the packages to a custom location, in this case install.

Use a soft link to make the packages available to the system.

sudo ln -s /path/to/install /opt/ros/${ROS_DISTRO}

Docker

The Docker Image is available on Docker Hub. It's based on Ubuntu 20.04 and ROS2 Humble.

Docker Hub

docker pull tonghezhang/ros2_x86:humble_lint_0.1

Run

example:

sudo docker run --shm-size=1024m --name ros2_humble_lint --privileged -it -d -p 2337:22 -p 4907:4000 -v /Users/zhangtonghe/share:/share   tonghezhang/ros2_x86:humble_lint   /bin/bash

Limitation

  1. The Docker Image is based on Ubuntu 20.04 and ROS2 Humble. It's not possible to run the image on a host with a different OS or ROS2 version.

  2. Using iceoryx as the RMW implementation is not always supported due to #1776, so we recommand rmw_fastrtps_cpp as the default RMW implementation. But you can find a solution in #1776 to use iceoryx as the RMW implementation.

Docker update record

Update Record

ros2lint's People

Contributors

zard-c avatar

Stargazers

VictorLee avatar  avatar  avatar Tumb1eweed avatar  avatar

Watchers

 avatar

ros2lint's Issues

[feature]: libelf

For unix-like systems, we want to use libelf to get the symbols( especially for function names ) for *.so]

sudo apt install libelf-dev

Docker Image: humble_lint, need to install other dds.

Need to install other dds

Docker Image: humble_lint doesn't have other dds(such as connextdds, cyclonedds iceoryx, etc) installed, which would cause run timer error when set env as other dds, for example:

 export RMW_IMPLEMENTATION=rmw_connextdds

Description:

[ERROR] [1693811491.110734726] [rcl]: Error getting RMW implementation identifier / RMW implementation not installed (expected identifier of 'rmw_connextdds'), with error message 'failed to load shared library 'librmw_connextdds.so' due to dlopen error: librmw_connextdds.so: cannot open shared object file: No such file or directory, at /root/ros2_humble/src/ros2/rcutils/src/shared_library.c:99, at /root/ros2_humble/src/ros2/rmw_implementation/rmw_implementation/src/functions.cpp:65', exiting with 1., at /root/ros2_humble/src/ros2/rcl/rcl/src/rcl/rmw_implementation_identifier_check.c:139
[ERROR] [1693811534.722311830] [rcl]: Error getting RMW implementation identifier / RMW implementation not installed (expected identifier of 'rmw_connextdds'), with error message 'failed to load shared library 'librmw_connextdds.so' due to dlopen error: librmw_connextdds.so: cannot open shared object file: No such file or directory, at /root/ros2_humble/src/ros2/rcutils/src/shared_library.c:99, at /root/ros2_humble/src/ros2/rmw_implementation/rmw_implementation/src/functions.cpp:65', exiting with 1., at /root/ros2_humble/src/ros2/rcl/rcl/src/rcl/rmw_implementation_identifier_check.c:139

[feature]: add debug version

Feature

New docker image

We're considering add a debug(which is also lint) version for ros2:humble

we can use

colcon build --packages-up-to demo_nodes_cpp --ament-cmake-args "-DBUILD_TESTING=OFF" "-DCMAKE_BUILD_TYPE=Debug"

when making docker image

Docker Image

Not a Bug

Description

The docker image : docker pull tonghezhang/ros2_x86:humble_lint doesn't contain ros2/rclc installation.

Solution

add rclc source code and colcon build --packages-up-to rclc, then update the image.

The following repositories might not be in the default ROS 2 distribution: osrf_testing_tools_cpp and test_msgs. In this case install them manually:

 sudo apt-get install ros-$ROS_DISTRO-osrf-testing-tools-cpp
 sudo apt-get install ros-$ROS_DISTRO-test-msgs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.