Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/ros-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
fail-fast: false
matrix:
ros_distribution:
- humble
# - humble
- jazzy
- rolling
include:
# ROS 2 Humble Hawksbill
- docker_image: ubuntu:jammy
ros_distribution: humble
ros_version: 2
# - docker_image: ubuntu:jammy
# ros_distribution: humble
# ros_version: 2
# ROS 2 Jazzy Jalisco
- docker_image: ubuntu:noble
ros_distribution: jazzy
Expand Down
4 changes: 4 additions & 0 deletions turtlebot3_fake_node/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package turtlebot3_fake
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.3.5 (2025-06-04)
------------------
* None

2.3.3 (2025-05-29)
------------------
* Deprecate ament_include_dependency usage in CMakeLists.txt, related PR(https://github.com/ROBOTIS-GIT/turtlebot3_simulations/pull/234)
Expand Down
2 changes: 1 addition & 1 deletion turtlebot3_fake_node/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>turtlebot3_fake_node</name>
<version>2.3.3</version>
<version>2.3.5</version>
<description>
Package for TurtleBot3 fake node. With this package, simple tests can be done without a robot.
You can do simple tests using this package on rviz without real robots.
Expand Down
5 changes: 5 additions & 0 deletions turtlebot3_gazebo/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package turtlebot3_gazebo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.3.5 (2025-06-04)
------------------
* Added turtlebot3_machine_learning world and plugin
* Contributors: ChanHyeong Lee

2.3.3 (2025-05-29)
------------------
* Deprecate ament_include_dependency usage in CMakeLists.txt, related PR(https://github.com/ROBOTIS-GIT/turtlebot3_simulations/pull/234)
Expand Down
43 changes: 28 additions & 15 deletions turtlebot3_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
# Set minimum required version of cmake, project name and compile options
################################################################################
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.8)
project(turtlebot3_gazebo)

if(NOT CMAKE_CXX_STANDARD)
Expand All @@ -26,17 +26,26 @@ find_package(nav_msgs REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(tf2 REQUIRED)
find_package(gz_math_vendor REQUIRED)
find_package(gz-math REQUIRED)
find_package(gz_sim_vendor REQUIRED)
find_package(gz-sim REQUIRED)
find_package(gz_plugin_vendor REQUIRED)
find_package(gz-plugin REQUIRED)

################################################################################
# Build
################################################################################
link_directories(
${GAZEBO_LIBRARY_DIRS}
${GZ_SIM_LIBRARY_DIRS}
)

include_directories(
include
${GAZEBO_INCLUDE_DIRS}
${gz_sim_vendor_INCLUDE_DIRS}
${GZ_SIM_INCLUDE_DIRS}
)

set(EXEC_NAME "turtlebot3_drive")
Expand All @@ -50,25 +59,29 @@ target_link_libraries(${EXEC_NAME}
tf2::tf2
)

# add_library(traffic_light_plugin SHARED src/traffic_light_plugin.cpp)
# target_link_libraries(traffic_light_plugin ${GAZEBO_LIBRARIES})

# add_library(traffic_bar_plugin SHARED src/traffic_bar_plugin.cpp)
# target_link_libraries(traffic_bar_plugin ${GAZEBO_LIBRARIES})

# add_library(obstacle1 SHARED src/obstacle1.cpp)
# target_link_libraries(obstacle1 ${GAZEBO_LIBRARIES})

# add_library(obstacle2 SHARED src/obstacle2.cpp)
# target_link_libraries(obstacle2 ${GAZEBO_LIBRARIES})
set(OBSTACLE_LIBS
obstacles
obstacle1
obstacle2
)

# add_library(obstacles SHARED src/obstacles.cpp)
# target_link_libraries(obstacles ${GAZEBO_LIBRARIES})
foreach(lib ${OBSTACLE_LIBS})
add_library(${lib} SHARED src/${lib}.cpp)
target_link_libraries(${lib}
PUBLIC
gz-sim::gz-sim
gz-math::gz-math
)
endforeach()

################################################################################
# Install
################################################################################
install(TARGETS ${EXEC_NAME}
install(TARGETS
${EXEC_NAME}
obstacles
obstacle1
obstacle2
DESTINATION lib/${PROJECT_NAME}
)

Expand Down
48 changes: 36 additions & 12 deletions turtlebot3_gazebo/include/turtlebot3_gazebo/obstacle1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,51 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Ryan Shim
// Author: Ryan Shim, ChanHyeong Lee

#ifndef TURTLEBOT3_GAZEBO__OBSTACLE1_HPP_
#define TURTLEBOT3_GAZEBO__OBSTACLE1_HPP_

#include <ignition/math.hh>
#include <gazebo/common/common.hh>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <chrono>
#include <memory>
#include <vector>

namespace gazebo
#include <gz/sim/System.hh>
#include <gz/sim/Model.hh>
#include <gz/math/Vector3.hh>

namespace turtlebot3_gazebo
{
class Obstacle1 : public ModelPlugin

class Obstacle1Plugin
: public gz::sim::System,
public gz::sim::ISystemConfigure,
public gz::sim::ISystemPreUpdate
{
public:
void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/) override;
Obstacle1Plugin() = default;
~Obstacle1Plugin() override = default;

void Configure(
const gz::sim::Entity & entity,
const std::shared_ptr<const sdf::Element> & sdf,
gz::sim::EntityComponentManager & ecm,
gz::sim::EventManager & eventMgr) override;

void PreUpdate(
const gz::sim::UpdateInfo & info,
gz::sim::EntityComponentManager & ecm) override;

private:
physics::ModelPtr model;
event::ConnectionPtr updateConnection;
gz::sim::Model model;
std::chrono::steady_clock::time_point startTime;

std::vector<gz::math::Vector3d> waypoints;
std::vector<double> segmentDistances;
double totalDistance = 0.0;
double speed = 0.1; // meters per second
};
GZ_REGISTER_MODEL_PLUGIN(Obstacle1);
} // namespace gazebo

} // namespace turtlebot3_gazebo

#endif // TURTLEBOT3_GAZEBO__OBSTACLE1_HPP_
49 changes: 36 additions & 13 deletions turtlebot3_gazebo/include/turtlebot3_gazebo/obstacle2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,51 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Ryan Shim
// Author: Ryan Shim, ChanHyeong Lee

#ifndef TURTLEBOT3_GAZEBO__OBSTACLE2_HPP_
#define TURTLEBOT3_GAZEBO__OBSTACLE2_HPP_

#include <ignition/math.hh>
#include <gazebo/common/common.hh>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <chrono>
#include <memory>
#include <vector>

namespace gazebo
#include <gz/sim/System.hh>
#include <gz/sim/Model.hh>
#include <gz/math/Vector3.hh>

namespace turtlebot3_gazebo
{
class Obstacle2 : public ModelPlugin

class Obstacle2Plugin
: public gz::sim::System,
public gz::sim::ISystemConfigure,
public gz::sim::ISystemPreUpdate
{
public:
Obstacle2() = default;
void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/) override;
Obstacle2Plugin() = default;
~Obstacle2Plugin() override = default;

void Configure(
const gz::sim::Entity & entity,
const std::shared_ptr<const sdf::Element> & sdf,
gz::sim::EntityComponentManager & ecm,
gz::sim::EventManager & eventMgr) override;

void PreUpdate(
const gz::sim::UpdateInfo & info,
gz::sim::EntityComponentManager & ecm) override;

private:
physics::ModelPtr model;
event::ConnectionPtr updateConnection;
gz::sim::Model model;
std::chrono::steady_clock::time_point startTime;

std::vector<gz::math::Vector3d> waypoints;
std::vector<double> segmentDistances;
double totalDistance = 0.0;
double speed = 0.1; // meters per second
};
GZ_REGISTER_MODEL_PLUGIN(Obstacle2);
} // namespace gazebo

} // namespace turtlebot3_gazebo

#endif // TURTLEBOT3_GAZEBO__OBSTACLE2_HPP_
42 changes: 28 additions & 14 deletions turtlebot3_gazebo/include/turtlebot3_gazebo/obstacles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,44 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Ryan Shim
// Author: Ryan Shim, ChanHyeong Lee

#ifndef TURTLEBOT3_GAZEBO__OBSTACLES_HPP_
#define TURTLEBOT3_GAZEBO__OBSTACLES_HPP_

#include <ignition/math.hh>
#include <gazebo/common/common.hh>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <chrono>
#include <memory>

#define PI 3.141592
#include <gz/sim/components/Pose.hh>
#include <gz/sim/EntityComponentManager.hh>
#include <gz/sim/EventManager.hh>
#include <gz/sim/Model.hh>
#include <gz/sim/System.hh>

namespace gazebo
namespace turtlebot3_gazebo
{
class Obstacles : public ModelPlugin

class ObstaclesPlugin
: public gz::sim::System,
public gz::sim::ISystemConfigure,
public gz::sim::ISystemPreUpdate
{
public:
Obstacles() = default;
void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/) override;
void Configure(
const gz::sim::Entity & entity,
const std::shared_ptr<const sdf::Element> & sdf,
gz::sim::EntityComponentManager & ecm,
gz::sim::EventManager & eventMgr) override;

void PreUpdate(
const gz::sim::UpdateInfo & info,
gz::sim::EntityComponentManager & ecm) override;

private:
physics::ModelPtr model;
event::ConnectionPtr updateConnection;
gz::sim::Model model{gz::sim::kNullEntity};
std::chrono::steady_clock::time_point startTime;
};
GZ_REGISTER_MODEL_PLUGIN(Obstacles);
} // namespace gazebo

} // namespace turtlebot3_gazebo

#endif // TURTLEBOT3_GAZEBO__OBSTACLES_HPP_
Loading
Loading