Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
ros2_dji_osdk_ros_msgs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lrs2
ros2_dji_osdk_ros_msgs
Commits
fb5de5ff
Commit
fb5de5ff
authored
3 years ago
by
Tommy Persson
Browse files
Options
Downloads
Patches
Plain Diff
Adding service call for changing which camera to use in H20T and H20.
parent
2131424c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
README.md
+38
-0
38 additions, 0 deletions
README.md
srv/ChangeH264Source.srv
+16
-0
16 additions, 0 deletions
srv/ChangeH264Source.srv
with
55 additions
and
0 deletions
CMakeLists.txt
+
1
−
0
View file @
fb5de5ff
...
@@ -99,6 +99,7 @@ set(msg_files
...
@@ -99,6 +99,7 @@ set(msg_files
"srv/MissionWpUpload.srv"
"srv/MissionWpUpload.srv"
"srv/MissionWpAction.srv"
"srv/MissionWpAction.srv"
"srv/MissionWpGetInfo.srv"
"srv/MissionWpGetInfo.srv"
"srv/ChangeH264Source.srv"
)
)
rosidl_generate_interfaces
(
${
PROJECT_NAME
}
rosidl_generate_interfaces
(
${
PROJECT_NAME
}
...
...
This diff is collapsed.
Click to expand it.
README.md
+
38
−
0
View file @
fb5de5ff
...
@@ -4,6 +4,44 @@ Fixed messages and services definitions from dji_osdk_ros. Plus a mapping file.
...
@@ -4,6 +4,44 @@ Fixed messages and services definitions from dji_osdk_ros. Plus a mapping file.
The problem with the original definitions is that they use characters that are not allowed in constants and firldname in ROS2.
The problem with the original definitions is that they use characters that are not allowed in constants and firldname in ROS2.
## Patches to ros1 bridge needed
Pattern file: resource/interface_factories.cpp.em
auto & @(field
[
"ros2"
][
"name"
]
)2 = req2.@(field
[
"ros2"
][
"name"
]
);
@[ end if]@
@[ if field["basic"]]@
@[ if frm == "1"]@
@(field
[
"ros2"
][
"name"
]
)@(to) = @(field
[
"ros1"
][
"name"
]
)@(frm);
@[ else]@
@(field
[
"ros1"
][
"name"
]
)@(to) = @(field
[
"ros2"
][
"name"
]
)@(frm);
@[ end if]@
@[ else]@
@[ if frm == "1"]@
Factory
<
@(
field
["
ros1
"]["
cpptype
"]),@(
field
["
ros2
"]["
cpptype
"])
>
::convert_@(frm)_to_@(to)(@
@(field
[
"ros1"
][
"name"
]
)@(frm), @(field
[
"ros2"
][
"name"
]
)@(to));
@[ else]@
Factory
<
@(
field
["
ros1
"]["
cpptype
"]),@(
field
["
ros2
"]["
cpptype
"])
>
::convert_@(frm)_to_@(to)(@
@(field
[
"ros2"
][
"name"
]
)@(frm), @(field
[
"ros1"
][
"name"
]
)@(to));
@[ end if]@
@[ end if]@
@[ if field["array"]]@
}
@[ end if]@
Same place as below:
# This must be wrong, different name with same type will now be allowed, changing it
#if ros1_type != ros2_type or ros1_name != ros2_name:
if ros1_type != ros2_type:
Fix case with arrays in service calls:
```
python
if
(
ros1_type
.
rstrip
(
"
[]
"
),
ros2_type
.
rstrip
(
"
[]
"
))
not
in
message_string_pairs
:
match
=
False
break
```
## Getting started
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
...
...
This diff is collapsed.
Click to expand it.
srv/ChangeH264Source.srv
0 → 100644
+
16
−
0
View file @
fb5de5ff
# NO_1 = 0
# NO_2 = 1
# NO_3 = 2
# FPV = 7
#
# H20_WIDE=1
# H20T_WIDE=1
# H20_ZOOM=2
# H20T_ZOOM=2
# H20T_IT=3
uint8 camera
uint8 source
---
bool result
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment