Skip to content

Dji cap upgrades #183

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

Merged
merged 5 commits into from
Jul 11, 2025
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ __pycache__

mpc_codegen
c_generated_code

COLCON_IGNORE
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,3 @@
[submodule "utilities/serial_ping_pkg"]
path = utilities/serial_ping_pkg
url = https://github.com/NinjaTuna007/serial_ping_pkg.git
[submodule "external_equipment/PlayStation-JoyInterface-ROS2"]
path = external_equipment/PlayStation-JoyInterface-ROS2
url = https://github.com/HarvestX/PlayStation-JoyInterface-ROS2
branch = humble
1 change: 0 additions & 1 deletion external_equipment/PlayStation-JoyInterface-ROS2
Submodule PlayStation-JoyInterface-ROS2 deleted from 88f923
33 changes: 33 additions & 0 deletions messages/dji_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.8)
project(dji_msgs)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Find necessary dependencies
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)

find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)

# Generate drone-related message and service interfaces
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/Topics.msg" # Topics for the drone
"msg/Links.msg" #links for drone
DEPENDENCIES geometry_msgs sensor_msgs std_msgs
)

# Add build tests (if testing is enabled)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# Skipping linting for copyright and cpplint
set(ament_cmake_copyright_FOUND TRUE)
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()

ament_package()

14 changes: 14 additions & 0 deletions messages/dji_msgs/msg/Links.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# DJI Drone links and relevant frames
# Most are published by the dji_captain node
#

string UTM = 'utm'
string MAP = 'map'
string ODOM = 'odom'
string HOME_POINT = 'home_point'

string BASE_LINK = 'base_link'
string BASE_FLAT = 'base_flat_link'
string BASE_ENU = 'base_ENU_link'

9 changes: 9 additions & 0 deletions messages/dji_msgs/msg/Topics.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Used by the dji_captain, namespaced as needed.
# Usually under /M350
string MOVE_TO_SETPOINT_TOPIC = 'move_to_setpoint'
string CONTROLLER_INPUT_TOPIC = 'joy'
string CONTROLLER_VIBRATION_TOPIC = 'joy/set_feedback'
string TTS_TOPIC = 'speak'



26 changes: 26 additions & 0 deletions messages/dji_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>dji_msgs</name>
<version>0.1.0</version>
<description>The dji_msgs package</description>
<maintainer email="[email protected]">aryan</maintainer>
<license>MIT</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<depend>geometry_msgs</depend>
<depend>sensor_msgs</depend>
<depend>std_msgs</depend>

<!-- Message gen depends -->
<build_depend>rosidl_default_generators</build_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
10 changes: 10 additions & 0 deletions scripts/smarc_bringups/launch/speaking_joy.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<launch>
<arg name="robot_name" default="M350"/>

<group>
<push-ros-namespace namespace="$(var robot_name)"/>
<node name="joy" pkg="joy" exec="game_controller_node" output="screen"/>
<node name="speaker" pkg="smarc_utilities" exec="simple_tts" output="screen"/>
</group>

</launch>
3 changes: 2 additions & 1 deletion scripts/smarc_bringups/scripts/dji_bringup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ if [ "$USE_SIM_TIME" = "False" ]; then
tmux send-keys "ros2 topic echo /$ROBOT_NAME/captain_status std_msgs/msg/String --field data" C-m

tmux select-pane -t $SESSION:0.3
tmux send-keys "cd ~ && ./record_bag_ex_camComp.sh" C-m
# tmux send-keys "cd ~ && ./record_bag_ex_camComp.sh" C-m
tmux send-keys "fast-discovery-server -i 0" C-m
else
tmux select-window -t $SESSION:0
tmux send-keys "ros2 topic pub /$ROBOT_NAME/smarc/vehicle_health std_msgs/msg/Int8 \"data: 0\" -r 5" C-m
Expand Down
85 changes: 0 additions & 85 deletions scripts/smarc_bringups/scripts/quad_bringup.sh

This file was deleted.

Loading