Skip to content

Used with Care-O-bot 4 for simulation and hardware tests

Notifications You must be signed in to change notification settings

ipa-ych/YCH_ros2_ws

Repository files navigation

YCH_ros2_ws

demo simulation with cob4 model
This package contains subsystems and components for simulation utilizing Care-O-bot 4 (mobile robot combining navigation, detection and decision making with Behavior Tree) in Gazebo 11, implemented with ROS2 Humble

Prerequisite

  1. ROS2 (Tested on Humble)
  2. Gazebo (Tested on Gazebo 11.10.2)
  3. RViz2
  4. ros1_bridge (for tests with physical robot)
  5. PS4 joystick (for remote control)
  6. Behavior Tree (to use behavior tree) https://www.behaviortree.dev/

Content

  1. cob_common
    This package contains communication interfaces (actions, msgs, srvs) and robot description of Care-O-bot 4
    Origin: https://github.com/4am-robotics/cob_common
  2. ros2_laser_scan_merger
    Merge 2/3/more laserscanner signals
    Origin: https://github.com/mich1342/ros2_laser_scan_merger
  3. pointcloud_to_laserscan
    Convert pointcloud to laserscan signal
    Origin: https://github.com/ros-perception/pointcloud_to_laserscan/tree/humble
  4. yolobot_recognition
    Perform object detection utilizing RGB camera with Yolov8
  5. yolov8_msgs
    This package contains Msgs for Yolov8
    Origin: https://drive.google.com/drive/folders/1SyyDtQC7LpSIld-jmtkI1qXXDnLNDg6w
  6. ros2_behavior_tree_example
    Customize behavior tree and BT action for user story here
    Origin: https://github.com/polymathrobotics/ros2_behavior_tree_example
  7. cob_sim_trad
    This package contains customized robot description files (origin from cob_common), parameter configuration and launch files for each user story in simulation (teleop, slam, navigation, combi_sim)
  8. cob_hardware_config
    This package contains URDF and configuration for Care-O-bot model
    Origin: https://github.com/ipa320/cob_robots/tree/humble_dev
  9. cob_calibration_data
    This package contains calibration data for Care-O-bot serie
    Origin: https://github.com/ipa-nhg/cob_calibration_data/tree/humble_dev
  10. cob_robot_trad
    This package contains parameter configuration and launch files for each user story with physical Care-O-bot 4 (teleop, slam, navigation, combi_sim)
  11. aws_robomaker_hospital_world
    This package contains the world for a hospital scene in Gazebo. Visit the AWS RoboMaker website to learn more about building intelligent robotic applications with Amazon Web Services. In /launch folder, there are customized launch files to start the simulation in hospital world with the Care-O-bot.

How to use - Simulation

  1. Colon the repo to workspace_name/src, build and source with
colcon build && source install/setup.bash
  1. Launch the demo
  • To launch teleop_demo
ros2 launch cob_sim_trad cob_teleop_sim.launch.py world:='path_to_world_file'

For teleopration (with standard PS4 Joystick), hold trangle to enable base_driver, left joystick to control the base movement (forward/ backward and spin); hold L1 to enable torso, right joystick to control the spin of torso joint
Remote Controll

  • To launch SLAM_demo
ros2 launch cob_sim_trad cob_slam_sim.launch.py world:='path_to_world_file'
  • To launch navigation_demo
ros2 launch cob_sim_trad cob_navi_sim.launch.py world:='path_to_world_file'
  • To launch combi_demo (with object detection and BT)
ros2 launch cob_sim_trad cob_combi_sim.launch.py world:='path_to_world_file'

In another Terminal, configurate and activate the behaviortree_lifecycle_node with

ros2 lifecycle set /bt_lifecycle_node configure
ros2 lifecycle set /bt_lifecycle_node activate
  • To launch simulation in aws_hospital scene, under path /aws_robomaker_hospital_world, do
chmod +x setup.sh
./setup.sh
export GAZEBO_MODEL_PATH=`pwd`/models:`pwd`/fuel_models

...then launch the demo using launch files in /launch folder with

ros2 launch aws_robomaker_hospital_world view_hospital_with_robot.launch.py

How to use - Test with physical Care-O-bot 4

  1. Colon the repo to workspace_name/src, build and source with
colcon build && source install/setup.bash

make sure the dependencies are installed: cob_calibration_data , cob_hardware_config...

  1. Robot bringup
  • Open new termial, configure ROS_MASTER_URI with
export ROS_MASTER_URI=<robot_address>
  • Bringup physical robot with
roslaunch cob_bringup robot.launch  #robot bringup with base, torso and head

or with

roslaunch cob_bringup base_solo.launch  #only the base
  1. Launch ros1_bridge
  • install ros1_bridge and configure environment following ros1_bridge
  • configure the bridge settings within file /cob_robot_trad/config/bridge1_params.yaml; multiple bridges could be launched simultaneously
  • open new termial, configure ROS_MASTER_URI with
export ROS_MASTER_URI=<robot_address>
  • in the same terminal, launch bridge with
ros2 launch cob_robot_trad ros1_bridges.launch.py
  1. Launch the demo
  • open new terminal, launch demo with
ros2 launch cob_robot_trad cob_combi_robot.launch.py