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

add program #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(my_bot)
project(robot)

# Default to C99
if(NOT CMAKE_C_STANDARD)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

This is a GitHub template. You can make your own copy by clicking the green "Use this template" button.

It is recommended that you keep the repo/package name the same, but if you do change it, ensure you do a "Find all" using your IDE (or the built-in GitHub IDE by hitting the `.` key) and rename all instances of `my_bot` to whatever your project's name is.
It is recommended that you keep the repo/package name the same, but if you do change it, ensure you do a "Find all" using your IDE (or the built-in GitHub IDE by hitting the `.` key) and rename all instances of `robot` to whatever your project's name is.

Note that each directory currently has at least one file in it to ensure that git tracks the files (and, consequently, that a fresh clone has direcctories present for CMake to find). These example files can be removed if required (and the directories can be removed if `CMakeLists.txt` is adjusted accordingly).
30 changes: 30 additions & 0 deletions config/ball_tracker_params_robot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
detect_ball:
ros__parameters:
# tuning_mode: false # Could set this here but leave it off so it can be easily set by the launch script
x_min: 0
x_max: 100
y_min: 42
y_max: 100
h_min: 27
h_max: 43
s_min: 23
s_max: 255
v_min: 49
v_max: 255
sz_min: 2
sz_max: 25

detect_ball_3d:
ros__parameters:
h_fov: 1.089
ball_radius: 0.033
camera_frame: "camera_link_optical"

follow_ball:
ros__parameters:
rcv_timeout_secs: 1.0
angular_chase_multiplier: 0.7
forward_chase_speed: 0.1
search_angular_speed: 0.5
max_size_thresh: 0.1
filter_value: 0.9
30 changes: 30 additions & 0 deletions config/ball_tracker_params_sim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
detect_ball:
ros__parameters:
# tuning_mode: false # Could set this here but leave it off so it can be easily set by the launch script
x_min: 0
x_max: 100
y_min: 32
y_max: 100
h_min: 20
h_max: 37
s_min: 42
s_max: 255
v_min: 0
v_max: 255
sz_min: 0
sz_max: 20

detect_ball_3d:
ros__parameters:
h_fov: 1.089
ball_radius: 0.033
camera_frame: "camera_link_optical"

follow_ball:
ros__parameters:
rcv_timeout_secs: 1.0
angular_chase_multiplier: 0.7
forward_chase_speed: 0.1
search_angular_speed: 0.5
max_size_thresh: 0.1
filter_value: 0.9
205 changes: 205 additions & 0 deletions config/drive_bot.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
Panels:
- Class: rviz_common/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
- /RobotModel1
Splitter Ratio: 0.5
Tree Height: 759
- Class: rviz_common/Selection
Name: Selection
- Class: rviz_common/Tool Properties
Expanded:
- /2D Goal Pose1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz_common/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz_default_plugins/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.029999999329447746
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Class: rviz_default_plugins/TF
Enabled: true
Frame Timeout: 15
Frames:
All Enabled: true
base_link:
Value: true
caster_wheel:
Value: true
chassis:
Value: true
left_wheel:
Value: true
odom:
Value: true
right_wheel:
Value: true
Marker Scale: 1
Name: TF
Show Arrows: true
Show Axes: true
Show Names: false
Tree:
odom:
base_link:
chassis:
caster_wheel:
{}
left_wheel:
{}
right_wheel:
{}
Update Interval: 0
Value: true
- Alpha: 1
Class: rviz_default_plugins/RobotModel
Collision Enabled: false
Description File: ""
Description Source: Topic
Description Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /robot_description
Enabled: true
Links:
All Links Enabled: true
Expand Joint Details: false
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
Alpha: 1
Show Axes: false
Show Trail: false
caster_wheel:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
chassis:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
left_wheel:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
right_wheel:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
Name: RobotModel
TF Prefix: ""
Update Interval: 0
Value: true
Visual Enabled: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Fixed Frame: odom
Frame Rate: 30
Name: root
Tools:
- Class: rviz_default_plugins/Interact
Hide Inactive Objects: true
- Class: rviz_default_plugins/MoveCamera
- Class: rviz_default_plugins/Select
- Class: rviz_default_plugins/FocusCamera
- Class: rviz_default_plugins/Measure
Line color: 128; 128; 0
- Class: rviz_default_plugins/SetInitialPose
Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /initialpose
- Class: rviz_default_plugins/SetGoal
Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /goal_pose
- Class: rviz_default_plugins/PublishPoint
Single click: true
Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /clicked_point
Transformation:
Current:
Class: rviz_default_plugins/TF
Value: true
Views:
Current:
Class: rviz_default_plugins/Orbit
Distance: 10
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 0
Y: 0
Z: 0
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.785398006439209
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 0.785398006439209
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 997
Hide Left Dock: false
Hide Right Dock: true
QMainWindow State: 000000ff00000000fd00000004000000000000016a00000386fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000004100000386000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f00000385fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000004100000385000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000006100000038600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: true
Width: 1920
X: 0
Y: 28
3 changes: 3 additions & 0 deletions config/gaz_ros2_ctl_use_sim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
controller_manager:
ros__parameters:
use_sim_time: true
3 changes: 3 additions & 0 deletions config/gazebo_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gazebo:
ros__parameters:
publish_rate: 400.0
27 changes: 27 additions & 0 deletions config/joystick.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
joy_node:
ros__parameters:
device_id: 0
deadzone: 0.05
autorepeat_rate: 20.0

teleop_node:
ros__parameters:
axis_linear:
x: 1
scale_linear:
x: 0.5
scale_linear_turbo:
x: 1.0

axis_angular:
yaw: 0
scale_angular:
yaw: 0.5
scale_angular_turbo:
yaw: 1.0


enable_button: 6
enable_turbo_button: 7

require_enable_button: true
Loading