Skip to content

JoshWorld/gcamp_ros2_basic

Repository files navigation

gcamp_ros2_basic

Create Package

.gazebo + .xacro => .urdf

rosdep install -i --from-path src --rosdistro foxy -y

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/skidbot

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/diffbot


ros2 bag record -a -o skidbot_record 
ros2 bag play skidbot_record

ros2 launch gcamp_gazebo gcamp_world.launch.py 
ros2 launch gcamp_gazebo maze_world.launch.py 

ros2 launch gcamp_gazebo skidbot_description.launch.py
ros2 launch gcamp_gazebo diffbot_description.launch.py

ros2 run py_topic_pkg cmd_vel_pub_node 
ros2 run py_topic_pkg laser_raw_node 
ros2 run py_topic_pkg laser_sub_node
ros2 run py_topic_pkg parking_node

ros2 interface show custom_interfaces/srv/AddThreeInts
# "rosfoxy" required after custom msg/srv build

ros2 run py_service_pkg gazebo_model_spawner
ros2 run py_service_pkg robot_turning_server
ros2 service call /turn_robot custom_interfaces/srv/TurningControl "{time_duration: 5, angular_vel_z: 1.0, linear_vel_x: 0.5}"
ros2 service call /delete_entity gazebo_msgs/srv/DeleteEntity "{name: 'skidbot'}"
ros2 run py_service_pkg robot_turning_client

ros2 run py_action_pkg fibonacci_action_server 
ros2 run py_action_pkg fibonacci_action_client 
ros2 run py_action_pkg fibonacci_action_server_cancel 
ros2 run py_action_pkg fibonacci_action_client_cancel

ros2 action send_goal fibonacci custom_interfaces/action/Fibonacci "{order: 5}"
ros2 action send_goal --feedback fibonacci custom_interfaces/action/Fibonacci "{order: 5}"

ros2 run image_view image_view --ros-args --remap /image:=/diffbot/camera_sensor/image_raw
ros2 run py_action_pkg img_subscriber_node 
ros2 run py_action_pkg odome_sub_node 
ros2 run py_action_pkg robot_controller
ros2 run py_action_pkg maze_action_server
ros2 run py_action_pkg maze_action_client
ros2 action send_goal --feedback maze_action custom_interfaces/action/Maze "{turning_sequence: [2,1,0,1,2]}"

ros2 pkg create --build-type ament_python py_first_pkg   --dependencies rclpy
ros2 pkg create --build-type ament_python py_topic_pkg   --dependencies rclpy sensor_msgs geometry_msgs
ros2 pkg create --build-type ament_python py_service_pkg --dependencies rclpy gazebo_msgs
ros2 pkg create --build-type ament_python py_action_pkg --dependencies rclpy gazebo_msgs custom_interfaces image_transport cv_bridge sensor_msgs std_msgs opencv2

ros2 interface show geometry_msgs/msg/Twist

$ ros2 pkg create my_python_pkg --build-type ament_python rclpy
$ ros2 pkg create my_cpp_py_pkg --build-type ament_cmake
ros2 run cpp_topic_pkg cmd_vel_pub_node
ros2 run cpp_topic_pkg laser_sub_node 
ros2 run cpp_topic_pkg parking_node

ros2 run cpp_service_pkg basic_server 
ros2 run cpp_service_pkg basic_client 1 3

ros2 run cpp_service_pkg robot_turning_server
ros2 run cpp_service_pkg robot_turning_client 5 0.5 1.0

ros2 service call /turn_robot custom_interfaces/srv/TurningControl "{time_duration: 5, angular_vel_z: 1.0, linear_vel_x: 0.5}"

ros2 run cpp_action_pkg fibonacci_action_server_node
ros2 run cpp_action_pkg fibonacci_action_client_node
ros2 run cpp_action_pkg fibonacci_action_server_oop_node 
ros2 run cpp_action_pkg fibonacci_action_client_oop_node 

ros2 interface show example_interfaces/srv/AddTwoInts
ros2 interface show custom_interfaces/srv/TurningControl


ros2 pkg create --build-type ament_cmake  cpp_topic_pkg     --dependencies rclcpp sensor_msgs geometry_msgs
ros2 pkg create --build-type ament_cmake  cpp_service_pkg     --dependencies rclcpp gazebo_msgs geometry_msgs custom_interfaces
ros2 pkg create --build-type ament_cmake  cpp_action_pkg     --dependencies rclcpp rclcpp_action rclcpp_components custom_interfaces

ros2 pkg create --dependencies action_tutorials_interfaces rclcpp rclcpp_action rclcpp_components -- action_tutorials_cpp
ros2 pkg create --build-type ament_cmake  cpp_srvcli --dependencies rclcpp example_interfaces
ros2 pkg create --build-type ament_cmake  custom_interfaces


https://answers.ros.org/question/302037/ros2-how-to-call-a-service-from-the-callback-function-of-a-subscriber/

windows

colcon build --symlink-install --packages-select gcamp_gazebo
colcon build --symlink-install --packages-select py_action_pkg
install\setup.bat
ros2 launch gcamp_gazebo gcamp_world_windows.launch.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.3%
  • C++ 34.9%
  • CMake 7.8%