Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into develop #598

Merged
merged 42 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
643145d
Sync submodule (#498)
github-actions[bot] Oct 28, 2022
0b595e4
Update link to wiki page in README.md (#499)
stefaniapedrazzi Oct 28, 2022
351a0e9
Keep webots and libController to R2022b rev1
ygoumaz Oct 31, 2022
6e7b5bd
Merge branch 'master' into synchronization-merge-develop-in-master
ygoumaz Oct 31, 2022
6ebfccd
Merge pull request #500 from cyberbotics/synchronization-merge-develo…
ygoumaz Oct 31, 2022
c0040a9
Update robot launch files (#502)
ygoumaz Nov 1, 2022
3ffa1de
update changelog and packages.xml (#506)
ygoumaz Nov 3, 2022
75118d7
Fix camera focal length (#510)
lukicdarkoo Nov 9, 2022
6a7b300
Sync submodule (#518)
github-actions[bot] Nov 15, 2022
cf1677b
Sync submodule (#521)
github-actions[bot] Nov 16, 2022
0b62dc3
Upgrade urdf2webots to 2.0.3 (#516)
ad-daniel Nov 17, 2022
3f04ae2
Update calculation of `CameraRecognitionObject` (#523)
AKreutz Nov 18, 2022
1cc1c68
update changelog and packages.xml (#526)
ygoumaz Nov 18, 2022
aba315b
Update ci_before_init_embed.bash (#536)
ygoumaz Nov 29, 2022
0d44327
Merge develop into master for 2023 version (#540)
ygoumaz Nov 29, 2022
8558baa
Sync submodule (#543)
github-actions[bot] Nov 30, 2022
c02db7e
Allow custom motor-encoder pair (#527)
lukicdarkoo Nov 30, 2022
564ba94
Prepare for version 2023.0.0 (#545)
ygoumaz Nov 30, 2022
324046f
Sync submodule (#546)
github-actions[bot] Dec 1, 2022
1d65ba6
Sync submodule (#549)
github-actions[bot] Dec 5, 2022
577173b
Sync submodule (#551)
github-actions[bot] Dec 8, 2022
2e377c3
Sync submodule (#557)
github-actions[bot] Dec 13, 2022
10cdda4
Sync submodule (#564)
github-actions[bot] Dec 14, 2022
4b8a81e
Sync submodule (#565)
github-actions[bot] Dec 15, 2022
639e10b
Sync submodule (#568)
github-actions[bot] Dec 22, 2022
2216e3f
cmake symlinks (#569)
ygoumaz Dec 22, 2022
6a94cc8
Resolving Deprecation Warning with Header File Replacement (#570)
ygoumaz Dec 22, 2022
241be2f
Remove symlinks and add shared libs to rpath (#572)
ygoumaz Dec 23, 2022
d384fe0
WSL error: local PROTOs cannot be loaded (#573)
ygoumaz Dec 23, 2022
929eac8
Create .gitignore (#575)
ygoumaz Dec 26, 2022
49a2206
Fix rats life example launcher (#574)
ygoumaz Dec 26, 2022
e1ad582
Copy gitignore from webots repo (#577)
ygoumaz Jan 4, 2023
1cb5513
Sync submodule (#588)
github-actions[bot] Jan 5, 2023
e85b00d
Fix naming of ros2_control hardware type (#584)
ad-daniel Jan 5, 2023
db38ed5
Improve comparison (#590)
ad-daniel Jan 5, 2023
a5f21ca
Revert E-puck name to `e-puck` (#587)
ygoumaz Jan 5, 2023
4a4a56b
Prepare 2023.0.1 (#591)
ad-daniel Jan 6, 2023
7b6bdc0
Replace macOS Docker installation by UTM Virtual Machine (#578)
ygoumaz Jan 6, 2023
7c978b8
Added ability to import objects with webots wbt type. Refactored the …
TBreeze98 Jan 10, 2023
0bbc8ac
Remove documentation workflow (#596)
ad-daniel Jan 11, 2023
8787e22
Drop support for galactic (#594)
ad-daniel Jan 11, 2023
1817825
Merge branch 'master' into merge-master-into-develop
ad-daniel Jan 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions .github/workflows/documentation.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
ROS_REPO: [main, testing]
ROS_DISTRO: [foxy, galactic, humble, rolling]
ROS_DISTRO: [foxy, humble, rolling]
runs-on: ubuntu-latest
env:
AFTER_INIT: ./scripts/ci_after_init.bash ${ROS_DISTRO} ${ROS_REPO}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
ROS_REPO: [main, testing]
ROS_DISTRO: [foxy, galactic, humble, rolling]
ROS_DISTRO: [foxy, humble, rolling]
runs-on: ubuntu-latest
env:
AFTER_INIT: ./scripts/ci_after_init.bash ${ROS_DISTRO} ${ROS_REPO}
Expand Down
5 changes: 2 additions & 3 deletions scripts/ci_after_init.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ if [[ $(lsb_release -rs) == "22.04" && ${WEBOTS_RELEASE_VERSION} == "2022a" ]];
mv /tmp/openssl-1.1/* /usr/local/webots/lib/webots/
fi

# The following packages are only available in the ROS 2 Foxy/Galactic distributions. Therefore, we cannot include them in the package.xml, but we have to install them manually here.

if [[ "${ROS_DISTRO}" == "foxy" || "${ROS_DISTRO}" == "galactic" ]]; then
# The following packages are only available in the ROS 2 Foxy distribution. Therefore, we cannot include them in the package.xml, but we have to install them manually here.
if [[ "${ROS_DISTRO}" == "foxy" ]]; then
apt install -y ros-${ROS_DISTRO}-turtlebot3-cartographer ros-${ROS_DISTRO}-turtlebot3-navigation2
fi

Expand Down
1 change: 1 addition & 0 deletions scripts/sync_controller_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ mkdir -p projects/default/libraries/vehicle/java
cp -r ${WEBOTS_HOME}/projects/default/libraries/vehicle/c/* projects/default/libraries/vehicle/c
cp -r ${WEBOTS_HOME}/projects/default/libraries/vehicle/cpp/* projects/default/libraries/vehicle/cpp
cp -r ${WEBOTS_HOME}/projects/default/libraries/vehicle/java/* projects/default/libraries/vehicle/java
cp ${WEBOTS_HOME}/projects/default/libraries/vehicle/java/.gitignore projects/default/libraries/vehicle/java
cp ${WEBOTS_HOME}/projects/default/libraries/vehicle/Makefile projects/default/libraries/vehicle

rm -rf resources
Expand Down
16 changes: 13 additions & 3 deletions webots_ros2/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@
Changelog for package webots_ros2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2023.0.0 (2022-11-29)
2023.0.2 (2023-XX-XX)
------------------
* Add support for the new Python API of Webots R2023a
* Drop support for Galactic.

2023.0.1 (2023-01-05)
------------------
* Fixed relative assets in WSL.
* Fixed broken controller connection in Rats life example.

2023.0.0 (2022-11-30)
------------------
* Added support for the new Python API of Webots R2023a
* Convert C++ controller API functions to C
* Replace libController submodule by commited source files
* Removed 'webots_ros2_core' package (deprecated).
* Allow custom motor-encoder pair.

2022.1.4 (2022-11-18)
------------------
* Fix the camera focal length in the CameraInfo topic.
* Fixed the camera focal length in the CameraInfo topic.
* Upgraded to urdf2webots 2.0.3
* Update the calculation of CameraRecognitionObject messages to the RDF convention of R2022b.

Expand Down
2 changes: 1 addition & 1 deletion webots_ros2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>webots_ros2</name>
<version>2022.1.4</version>
<version>2023.0.1</version>
<description>Interface between Webots and ROS2</description>

<maintainer email="[email protected]">Cyberbotics</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name=package_name,
version='2022.1.4',
version='2023.0.1',
packages=[package_name],
data_files=[
('share/' + package_name, ['package.xml']),
Expand Down
3 changes: 2 additions & 1 deletion webots_ros2_control/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
Changelog for package webots_ros2_control
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2023.0.0 (2022-XX-XX)
2023.0.0 (2022-11-30)
------------------
* Convert C++ controller API functions to C
* Allow custom motor-encoder pair.

1.2.3 (2022-05-30)
------------------
Expand Down
5 changes: 3 additions & 2 deletions webots_ros2_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ project(webots_ros2_control)
# Check which ROS distribution is used, ros2control depends of that
if($ENV{ROS_DISTRO} MATCHES "foxy")
add_compile_definitions(FOXY)
elseif($ENV{ROS_DISTRO} MATCHES "galactic")
add_compile_definitions(GALACTIC)
elseif($ENV{ROS_DISTRO} MATCHES "humble")
add_compile_definitions(HUMBLE)
elseif($ENV{ROS_DISTRO} MATCHES "rolling")
Expand Down Expand Up @@ -35,6 +33,9 @@ find_package(rclcpp REQUIRED)
find_package(rclcpp_lifecycle REQUIRED)
find_package(webots_ros2_driver REQUIRED)

add_compile_definitions(HARDWARE_INTERFACE_VERSION_MAJOR=${hardware_interface_VERSION_MAJOR})
add_compile_definitions(HARDWARE_INTERFACE_VERSION_MINOR=${hardware_interface_VERSION_MINOR})

if (MSVC OR MSYS OR MINGW OR WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace webots_ros2_control

std::vector<hardware_interface::StateInterface> export_state_interfaces() override;
std::vector<hardware_interface::CommandInterface> export_command_interfaces() override;
#if FOXY || GALACTIC
#if FOXY
hardware_interface::return_type read() override;
hardware_interface::return_type write() override;
#else // HUMBLE, ROLLING
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>webots_ros2_control</name>
<version>2022.1.4</version>
<version>2023.0.1</version>
<description>ros2_control plugin for Webots</description>
<maintainer email="[email protected]">Cyberbotics</maintainer>
<url type="website">http://wiki.ros.org/webots_ros2</url>
Expand Down
12 changes: 10 additions & 2 deletions webots_ros2_control/src/Ros2Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace webots_ros2_control
const rclcpp::Duration dt = rclcpp::Duration::from_seconds(mControlPeriodMs / 1000.0);
if (periodMs >= mControlPeriodMs)
{
#if FOXY || GALACTIC
#if FOXY
mControllerManager->read();
#else
mControllerManager->read(mNode->get_clock()->now(), dt);
Expand All @@ -55,7 +55,7 @@ namespace webots_ros2_control
mLastControlUpdateMs = nowMs;
#endif

#if FOXY || GALACTIC
#if FOXY
mControllerManager->write();
#else // HUMBLE, ROLLING
mControllerManager->write(mNode->get_clock()->now(), dt);
Expand Down Expand Up @@ -95,9 +95,17 @@ namespace webots_ros2_control
}
for (unsigned int i = 0; i < controlHardware.size(); i++)
{

// Necessary hotfix for renamed variables present in "hardware_interface" package for versions above 3.5 (#590)
#if HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 5
const std::string pluginName = controlHardware[i].hardware_plugin_name;
auto webotsSystem = std::unique_ptr<webots_ros2_control::Ros2ControlSystemInterface>(
mHardwareLoader->createUnmanagedInstance(pluginName));
#else
const std::string hardwareType = controlHardware[i].hardware_class_type;
auto webotsSystem = std::unique_ptr<webots_ros2_control::Ros2ControlSystemInterface>(
mHardwareLoader->createUnmanagedInstance(hardwareType));
#endif
webotsSystem->init(mNode, controlHardware[i]);
#if FOXY
resourceManager->import_component(std::move(webotsSystem));
Expand Down
9 changes: 7 additions & 2 deletions webots_ros2_control/src/Ros2ControlSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ namespace webots_ros2_control
WbDeviceTag device = wb_robot_get_device(joint.name.c_str());
WbNodeType type = wb_device_get_node_type(device);
joint.motor = (type == WB_NODE_LINEAR_MOTOR || type == WB_NODE_ROTATIONAL_MOTOR) ? device : wb_position_sensor_get_motor(device);
device = (component.parameters.count("sensor") == 0) ?
wb_robot_get_device(joint.name.c_str()) :
wb_robot_get_device(component.parameters.at("sensor").c_str());
type = wb_device_get_node_type(device);
joint.sensor = (type == WB_NODE_POSITION_SENSOR) ? device : wb_motor_get_position_sensor(device);

if (joint.sensor)
wb_position_sensor_enable(joint.sensor, wb_robot_get_basic_time_step());
if (!joint.sensor && !joint.motor)
Expand Down Expand Up @@ -153,7 +158,7 @@ namespace webots_ros2_control
}
#endif

#if FOXY || GALACTIC
#if FOXY
hardware_interface::return_type Ros2ControlSystem::read()
#else // HUMBLE, ROLLING
hardware_interface::return_type Ros2ControlSystem::read(const rclcpp::Time &/*time*/, const rclcpp::Duration &/*period*/)
Expand All @@ -180,7 +185,7 @@ namespace webots_ros2_control
return hardware_interface::return_type::OK;
}

#if FOXY || GALACTIC
#if FOXY
hardware_interface::return_type Ros2ControlSystem::write()
#else // HUMBLE, ROLLING
hardware_interface::return_type Ros2ControlSystem::write(const rclcpp::Time &/*time*/, const rclcpp::Duration &/*period*/)
Expand Down
6 changes: 5 additions & 1 deletion webots_ros2_driver/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
Changelog for package webots_ros2_driver
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2023.0.0 (2022-11-29)
2023.0.1 (2023-01-05)
------------------
* Fix relative assets in WSL.

2023.0.0 (2022-11-30)
------------------
* Add support for the new Python API of Webots R2023a
* Convert C++ controller API functions to C
Expand Down
37 changes: 15 additions & 22 deletions webots_ros2_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@ if($ENV{ROS_DISTRO} MATCHES "foxy")
add_compile_definitions(FOXY)
endif()

if($ENV{ROS_DISTRO} MATCHES "galactic")
add_compile_definitions(GALACTIC)
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)

# Check which ROS distribution is used, vision_msgs depends of that
if($ENV{ROS_DISTRO} MATCHES "foxy")
add_compile_definitions(FOXY)
elseif($ENV{ROS_DISTRO} MATCHES "galactic")
add_compile_definitions(GALACTIC)
elseif($ENV{ROS_DISTRO} MATCHES "humble")
add_compile_definitions(HUMBLE)
elseif($ENV{ROS_DISTRO} MATCHES "rolling")
Expand All @@ -39,7 +34,7 @@ find_package(webots_ros2_msgs REQUIRED)
find_package(tinyxml2_vendor REQUIRED)
find_package(TinyXML2 REQUIRED)

if($ENV{ROS_DISTRO} MATCHES "foxy" OR $ENV{ROS_DISTRO} MATCHES "galactic")
if($ENV{ROS_DISTRO} MATCHES "foxy")
find_package(PythonLibs 3.8 EXACT REQUIRED)
else()
find_package(PythonLibs 3.10 EXACT REQUIRED)
Expand Down Expand Up @@ -85,6 +80,8 @@ ament_python_install_package(vehicle
ament_python_install_package(${PROJECT_NAME}
PACKAGE_DIR ${PROJECT_NAME})

# Driver
set(CMAKE_INSTALL_RPATH "$ORIGIN/../controller")
add_executable(driver
src/Driver.cpp
src/WebotsNode.cpp
Expand All @@ -100,8 +97,6 @@ add_executable(driver
src/utils/Math.cpp
src/utils/Utils.cpp
)

# Driver
ament_target_dependencies(driver
rosgraph_msgs
rclcpp
Expand Down Expand Up @@ -131,6 +126,7 @@ install(TARGETS driver
)

# Dynamic IMU
set(CMAKE_INSTALL_RPATH "$ORIGIN/controller")
add_library(
${PROJECT_NAME}_imu
SHARED
Expand Down Expand Up @@ -179,18 +175,6 @@ install(
PATTERN "*CppDriver*"
)

# Create symlinks of libController
macro(lib_symlink filename)
install(CODE "execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/lib/controller/${filename} ${CMAKE_INSTALL_PREFIX}/lib/${filename})")
endmacro(lib_symlink)

lib_symlink(libController.so)
lib_symlink(libcar.so)
lib_symlink(libCppCar.so)
lib_symlink(libCppController.so)
lib_symlink(libCppDriver.so)
lib_symlink(libdriver.so)

# Prevent pluginlib from using boost
target_compile_definitions(driver PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
target_compile_definitions(${PROJECT_NAME}_imu PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
Expand All @@ -208,6 +192,15 @@ install(
)

# Ament export
set(WEBOTS_LIB_PATH
controller/${CMAKE_SHARED_LIBRARY_PREFIX}Controller${CMAKE_SHARED_LIBRARY_SUFFIX}
controller/${CMAKE_SHARED_LIBRARY_PREFIX}CppController${CMAKE_SHARED_LIBRARY_SUFFIX}
controller/${CMAKE_SHARED_LIBRARY_PREFIX}driver${CMAKE_SHARED_LIBRARY_SUFFIX}
controller/${CMAKE_SHARED_LIBRARY_PREFIX}CppDriver${CMAKE_SHARED_LIBRARY_SUFFIX}
controller/${CMAKE_SHARED_LIBRARY_PREFIX}car${CMAKE_SHARED_LIBRARY_SUFFIX}
controller/${CMAKE_SHARED_LIBRARY_PREFIX}CppCar${CMAKE_SHARED_LIBRARY_SUFFIX}
)

ament_export_include_directories(
include
include/webots/c
Expand All @@ -227,6 +220,6 @@ ament_export_dependencies(
)
ament_export_libraries(
${PROJECT_NAME}_imu
${WEBOTS_LIB}
${WEBOTS_LIB_PATH}
)
ament_package()
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
#include <geometry_msgs/msg/quaternion.hpp>
#include <geometry_msgs/msg/point.hpp>
#include <geometry_msgs/msg/transform_stamped.hpp>
#if defined (HUMBLE) || defined (ROLLING)
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#else
// Deprecated in Humble and Rolling
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#endif
#include <sensor_msgs/image_encodings.hpp>
#include <sensor_msgs/msg/camera_info.hpp>
#include <sensor_msgs/msg/image.hpp>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_driver/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>webots_ros2_driver</name>
<version>2022.1.4</version>
<version>2023.0.1</version>
<description>Implementation of the Webots - ROS 2 interface</description>
<maintainer email="[email protected]">Cyberbotics</maintainer>
<license>Apache License 2.0</license>
Expand Down
Loading