Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Herpderk committed Aug 20, 2023
1 parent 0dc43da commit 2d1fe73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ install(PROGRAMS
DESTINATION lib/${PROJECT_NAME}
)

# scripts/node_commander.py
# scripts/node_mpc.py

if(BUILD_TESTING)
find_package(ament_cmake_pytest REQUIRED)
Expand Down
18 changes: 4 additions & 14 deletions scripts/controller_node.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

import rclpy
from rclpy.node import Node
from rclpy.qos import QoSProfile, ReliabilityPolicy, HistoryPolicy, DurabilityPolicy
Expand Down Expand Up @@ -84,6 +86,7 @@ def odom_cb(self, ned_enu_odom):
self.curr_state[9:12] = ned_enu_odom.inertial_angle_rate_ned
else:
self.curr_state[9:12] = ned_enu_odom.body_angle_rate_ned
print(self.curr_state)


def commander_cb(self, ned_enu_setpt):
Expand Down Expand Up @@ -138,22 +141,9 @@ def publish_controller_setpoint(self, setpoint:np.ndarray):


def main(args=None):
'''
Startup:
send offboard control mode msg 10 times,
engage offboard mode,
arm
The loop goes:
get setpoint: next objective
get state: pos_enu, vel_enu, angle_enu, ang_rate_enu
mpc -> next_control_and_state(state, setpoint)
set next state
'''

is_ENU = True
is_inertial = True
time_step = 0.1
time_step = 0.1 # seconds

print('Starting controller node...')
rclpy.init(args=args)
Expand Down

0 comments on commit 2d1fe73

Please sign in to comment.