From e2f874ddb937077a7b92e4f5fe9cde3b64446cc0 Mon Sep 17 00:00:00 2001 From: Patrick Roncagliolo Date: Thu, 14 Feb 2019 17:48:32 +0100 Subject: [PATCH 1/7] Fix compilation on Ubuntu 18.04 w ROS Melodic --- baxter_sim_io/include/baxter_sim_io/qnode.hpp | 7 +++++-- baxter_sim_kinematics/src/arm_kinematics.cpp | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/baxter_sim_io/include/baxter_sim_io/qnode.hpp b/baxter_sim_io/include/baxter_sim_io/qnode.hpp index 24696b6..f67f02a 100644 --- a/baxter_sim_io/include/baxter_sim_io/qnode.hpp +++ b/baxter_sim_io/include/baxter_sim_io/qnode.hpp @@ -34,12 +34,15 @@ #ifndef baxter_sim_io_QNODE_HPP_ #define baxter_sim_io_QNODE_HPP_ +#ifndef Q_MOC_RUN #include +#include +#include +#endif + #include #include #include -#include -#include namespace baxter_sim_io { diff --git a/baxter_sim_kinematics/src/arm_kinematics.cpp b/baxter_sim_kinematics/src/arm_kinematics.cpp index 24d7b0d..9c2f60d 100644 --- a/baxter_sim_kinematics/src/arm_kinematics.cpp +++ b/baxter_sim_kinematics/src/arm_kinematics.cpp @@ -34,6 +34,7 @@ #include #include #include +#include namespace arm_kinematics { @@ -245,8 +246,8 @@ bool Kinematics::loadModel(const std::string xml) { */ bool Kinematics::readJoints(urdf::Model &robot_model) { num_joints = 0; - boost::shared_ptr link = robot_model.getLink(tip_name); - boost::shared_ptr joint; + std::shared_ptr link = robot_model.getLink(tip_name); + std::shared_ptr joint; for (int i = 0; i < chain.getNrOfSegments(); i++) while (link && link->name != root_name) { if (!(link->parent_joint)) { From b390be08e0f6721cbb70d101e1fa9b2d931475e1 Mon Sep 17 00:00:00 2001 From: Patrick Roncagliolo Date: Sun, 10 Mar 2019 19:41:05 +0100 Subject: [PATCH 2/7] Fix xacro warning on melodic --- baxter_gazebo/launch/baxter_world.launch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baxter_gazebo/launch/baxter_world.launch b/baxter_gazebo/launch/baxter_world.launch index ac43ae6..62c45c9 100644 --- a/baxter_gazebo/launch/baxter_world.launch +++ b/baxter_gazebo/launch/baxter_world.launch @@ -19,7 +19,7 @@ to launching baxter_world --> + command="$(find xacro)/xacro $(find baxter_description)/urdf/baxter.urdf.xacro gazebo:=true"/> From 933322704e7d87816212fc6af7c3ef11ee476ca7 Mon Sep 17 00:00:00 2001 From: Patrick Roncagliolo Date: Wed, 22 Apr 2020 12:55:55 +0200 Subject: [PATCH 3/7] Rollback conditional support for Kinetic --- baxter_sim_kinematics/src/arm_kinematics.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/baxter_sim_kinematics/src/arm_kinematics.cpp b/baxter_sim_kinematics/src/arm_kinematics.cpp index 9c2f60d..c401750 100644 --- a/baxter_sim_kinematics/src/arm_kinematics.cpp +++ b/baxter_sim_kinematics/src/arm_kinematics.cpp @@ -34,7 +34,9 @@ #include #include #include +#if ROS_VERSION_MINIMUN(1, 14, 0) //Melodic #include +#endif namespace arm_kinematics { @@ -246,8 +248,13 @@ bool Kinematics::loadModel(const std::string xml) { */ bool Kinematics::readJoints(urdf::Model &robot_model) { num_joints = 0; + #if ROS_VERSION_MINIMUN(1, 14, 0) // Melodic std::shared_ptr link = robot_model.getLink(tip_name); std::shared_ptr joint; + #else + boost::shared_ptr link = robot_model.getLink(tip_name); + boost::shared_ptr joint; + #endif for (int i = 0; i < chain.getNrOfSegments(); i++) while (link && link->name != root_name) { if (!(link->parent_joint)) { From de51c01d051074661b0bb79f722a0a7b80fb29fb Mon Sep 17 00:00:00 2001 From: Patrick Roncagliolo Date: Sat, 25 Apr 2020 19:08:06 +0200 Subject: [PATCH 4/7] Fix typo --- baxter_sim_kinematics/src/arm_kinematics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/baxter_sim_kinematics/src/arm_kinematics.cpp b/baxter_sim_kinematics/src/arm_kinematics.cpp index c401750..92e85c0 100644 --- a/baxter_sim_kinematics/src/arm_kinematics.cpp +++ b/baxter_sim_kinematics/src/arm_kinematics.cpp @@ -34,7 +34,7 @@ #include #include #include -#if ROS_VERSION_MINIMUN(1, 14, 0) //Melodic +#if ROS_VERSION_MINIMUM(1, 14, 0) //Melodic #include #endif @@ -248,7 +248,7 @@ bool Kinematics::loadModel(const std::string xml) { */ bool Kinematics::readJoints(urdf::Model &robot_model) { num_joints = 0; - #if ROS_VERSION_MINIMUN(1, 14, 0) // Melodic + #if ROS_VERSION_MINIMUM(1, 14, 0) // Melodic std::shared_ptr link = robot_model.getLink(tip_name); std::shared_ptr joint; #else From 8804b8db66466b8ff5c43ad0cbdd4176645889c1 Mon Sep 17 00:00:00 2001 From: "Prof. Lee" Date: Wed, 2 Feb 2022 10:32:20 -0500 Subject: [PATCH 5/7] First steps for Noetic/Qt5 compatibility There are a few minor changes of code to get Qt5 to work. The build configuration has also been updated. --- baxter_sim_hardware/src/baxter_emulator.cpp | 2 +- baxter_sim_io/CMakeLists.txt | 15 +++++++++------ baxter_sim_io/include/baxter_sim_io/baxter_io.hpp | 3 ++- baxter_sim_io/package.xml | 9 +++++++-- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/baxter_sim_hardware/src/baxter_emulator.cpp b/baxter_sim_hardware/src/baxter_emulator.cpp index 4b51f47..c402e6b 100644 --- a/baxter_sim_hardware/src/baxter_emulator.cpp +++ b/baxter_sim_hardware/src/baxter_emulator.cpp @@ -318,7 +318,7 @@ void baxter_emulator::publish(const std::string &img_path) { // Read OpenCV Mat image and convert it to ROS message cv_bridge::CvImagePtr cv_ptr(new cv_bridge::CvImage); try { - cv_ptr->image = cv::imread(img_path, CV_LOAD_IMAGE_UNCHANGED); + cv_ptr->image = cv::imread(img_path, cv::IMREAD_UNCHANGED); if (cv_ptr->image.data) { cv_ptr->encoding = sensor_msgs::image_encodings::BGR8; sleep(IMG_LOAD_ON_STARTUP_DELAY); // Wait for the model to load diff --git a/baxter_sim_io/CMakeLists.txt b/baxter_sim_io/CMakeLists.txt index ac596f7..2b79be8 100644 --- a/baxter_sim_io/CMakeLists.txt +++ b/baxter_sim_io/CMakeLists.txt @@ -12,7 +12,9 @@ project(baxter_sim_io) # qt_build provides the qt cmake glue, roscpp the comms for a default talker #find_package(catkin REQUIRED COMPONENTS qt_build roscpp baxter_core_msgs) find_package(catkin REQUIRED COMPONENTS roscpp baxter_core_msgs) -find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui) +# find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui) +find_package(Qt5 REQUIRED COMPONENTS Core Gui UiTools Widgets) +ADD_DEFINITIONS(-DQT_NO_KEYWORDS) include_directories(${catkin_INCLUDE_DIRS}) # Use this to define what the package will export (e.g. libs, headers). # Since the default here is to produce only a binary, we don't worry about @@ -38,16 +40,17 @@ include_directories(include ############################################################################## # Sections ############################################################################## -include(${QT_USE_FILE}) +# MESSAGE(NOTICE ${QT5_USE_FILE}) +# include(${QT_USE_FILE}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui) file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc) file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/baxter_sim_io/*.hpp) -QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES}) -QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS}) -QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC}) +QT5_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES}) +qt5_wrap_ui(QT_FORMS_HPP ${QT_FORMS}) +qt5_wrap_cpp(QT_MOC_HPP ${QT_MOC}) ############################################################################## # Sources @@ -60,7 +63,7 @@ file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINK ############################################################################## add_executable(baxter_sim_io ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP}) -target_link_libraries(baxter_sim_io ${QT_LIBRARIES} ${ROS_LIBRARIES} ${catkin_LIBRARIES}) +target_link_libraries(baxter_sim_io ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5UiTools_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${ROS_LIBRARIES} ${catkin_LIBRARIES}) add_dependencies(baxter_sim_io baxter_core_msgs_gencpp) diff --git a/baxter_sim_io/include/baxter_sim_io/baxter_io.hpp b/baxter_sim_io/include/baxter_sim_io/baxter_io.hpp index 5e72d24..63e1705 100644 --- a/baxter_sim_io/include/baxter_sim_io/baxter_io.hpp +++ b/baxter_sim_io/include/baxter_sim_io/baxter_io.hpp @@ -35,7 +35,8 @@ #ifndef BAXTER_SIM_IO_BAXTER_IO_H #define BAXTER_SIM_IO_BAXTER_IO_H -#include +// #include +#include #include #include #include "ui_baxter_io.h" diff --git a/baxter_sim_io/package.xml b/baxter_sim_io/package.xml index 6937b2c..373a530 100644 --- a/baxter_sim_io/package.xml +++ b/baxter_sim_io/package.xml @@ -13,11 +13,16 @@ catkin roscpp - libqt4-dev + baxter_core_msgs + qt_gui + libqt5-core + libqt5-gui + libqt5-widgets + qt_gui roscpp - libqt4-dev + baxter_core_msgs From 499d4dfaf8c9a79d030d4dde9f882ac2294ff752 Mon Sep 17 00:00:00 2001 From: "Prof. Lee" Date: Thu, 3 Mar 2022 14:29:30 -0500 Subject: [PATCH 6/7] Last few make tools warnings silenced There were a couple warnings during compiling about the build instructions that have been silenced. --- baxter_gazebo/CMakeLists.txt | 2 +- baxter_sim_controllers/CMakeLists.txt | 2 +- baxter_sim_hardware/CMakeLists.txt | 2 +- baxter_sim_kinematics/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/baxter_gazebo/CMakeLists.txt b/baxter_gazebo/CMakeLists.txt index e36bc21..360deaa 100644 --- a/baxter_gazebo/CMakeLists.txt +++ b/baxter_gazebo/CMakeLists.txt @@ -17,11 +17,11 @@ find_package(gazebo REQUIRED) catkin_package( CATKIN_DEPENDS baxter_core_msgs + gazebo_ros gazebo_ros_control roscpp controller_manager_msgs DEPENDS - gazebo ) link_directories( diff --git a/baxter_sim_controllers/CMakeLists.txt b/baxter_sim_controllers/CMakeLists.txt index 5cb65bd..db892b2 100644 --- a/baxter_sim_controllers/CMakeLists.txt +++ b/baxter_sim_controllers/CMakeLists.txt @@ -28,7 +28,7 @@ catkin_package( control_toolbox effort_controllers baxter_core_msgs - DEPENDS yaml-cpp + DEPENDS INCLUDE_DIRS include LIBRARIES ${PROJECT_NAME} ) diff --git a/baxter_sim_hardware/CMakeLists.txt b/baxter_sim_hardware/CMakeLists.txt index 0bb9264..7231f64 100644 --- a/baxter_sim_hardware/CMakeLists.txt +++ b/baxter_sim_hardware/CMakeLists.txt @@ -16,7 +16,7 @@ find_package(Boost REQUIRED COMPONENTS system) find_package(cmake_modules REQUIRED) find_package(OpenCV REQUIRED) -find_package(Eigen REQUIRED) +find_package(Eigen3 REQUIRED) catkin_package( INCLUDE_DIRS include CATKIN_DEPENDS diff --git a/baxter_sim_kinematics/CMakeLists.txt b/baxter_sim_kinematics/CMakeLists.txt index b9b59e9..be733e1 100644 --- a/baxter_sim_kinematics/CMakeLists.txt +++ b/baxter_sim_kinematics/CMakeLists.txt @@ -13,7 +13,7 @@ find_package(catkin ) find_package(cmake_modules REQUIRED) -find_package(Eigen REQUIRED) +find_package(Eigen3 REQUIRED) catkin_package( INCLUDE_DIRS include From 04156a0867b33d9fa9da8bf5b6f79e2e914bde43 Mon Sep 17 00:00:00 2001 From: "Prof. Lee" Date: Wed, 13 Apr 2022 15:42:22 -0400 Subject: [PATCH 7/7] Conflicting build dependency and run dependency in baxter_gazebo Added gazebo_ros as a build_dependency in package.xml. --- baxter_gazebo/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/baxter_gazebo/package.xml b/baxter_gazebo/package.xml index 421dcfe..dff03bf 100644 --- a/baxter_gazebo/package.xml +++ b/baxter_gazebo/package.xml @@ -26,6 +26,7 @@ baxter_core_msgs gazebo_ros_control controller_manager_msgs + gazebo_ros roscpp tf2_ros