Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/integration' into rtk
Browse files Browse the repository at this point in the history
  • Loading branch information
qhdwight committed Apr 28, 2024
2 parents f6b435d + 323b36c commit 9cb5e69
Show file tree
Hide file tree
Showing 83 changed files with 1,205 additions and 580 deletions.
16 changes: 12 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,19 @@ set(MROVER_ROS_DEPENDENCIES
tf2
tf2_ros
tf2_geometry_msgs
actionlib_msgs
)

extract_filenames(msg/*.msg MROVER_MESSAGE_FILES)

extract_filenames(srv/*.srv MROVER_SERVICE_FILES)

extract_filenames(action/*.action MROVER_ACTION_FILES)

set(MROVER_MESSAGE_DEPENDENCIES
std_msgs
sensor_msgs
actionlib_msgs
)

set(MROVER_PARAMETERS
Expand All @@ -98,7 +102,7 @@ if (ZED_FOUND)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
set(CMAKE_CUDA_FLAGS "--diag-suppress 108,68")
set(CMAKE_CUDA_FLAGS "--diag-suppress 20012")
# Jetson Xavier NX/AGX has Volta 7.2 architecture
# Perception Laptop (A4000, Quadro version of RTX 3080) has Ampere 8.6 architecture
set(CMAKE_CUDA_ARCHITECTURES 72 86)
Expand All @@ -123,6 +127,8 @@ add_message_files(FILES ${MROVER_MESSAGE_FILES})

add_service_files(FILES ${MROVER_SERVICE_FILES})

add_action_files(DIRECTORY action FILES ${MROVER_ACTION_FILES})

generate_messages(DEPENDENCIES ${MROVER_MESSAGE_DEPENDENCIES})

generate_dynamic_reconfigure_options(${MROVER_PARAMETERS})
Expand Down Expand Up @@ -197,9 +203,11 @@ if (CUDA_FOUND)
# target_include_directories(nv_vid_codec_h265_enc SYSTEM PUBLIC deps/nvenc)
endif ()

mrover_add_nodelet(gst_websocket_streamer src/esw/gst_websocket_streamer/*.c* src/esw/gst_websocket_streamer src/esw/gst_websocket_streamer/pch.hpp)
mrover_nodelet_link_libraries(gst_websocket_streamer PRIVATE websocket_server ${Gst_LIBRARIES} ${GstApp_LIBRARIES})
mrover_nodelet_include_directories(gst_websocket_streamer ${Gst_INCLUDE_DIRS} ${GstApp_INCLUDE_DIRS})
if (Gst_FOUND AND GstApp_FOUND AND LibUsb_FOUND AND LibUdev_FOUND)
mrover_add_nodelet(gst_websocket_streamer src/esw/gst_websocket_streamer/*.c* src/esw/gst_websocket_streamer src/esw/gst_websocket_streamer/pch.hpp)
mrover_nodelet_link_libraries(gst_websocket_streamer PRIVATE websocket_server ${Gst_LIBRARIES} ${GstApp_LIBRARIES} ${LibUsb_LIBRARIES} ${LibUdev_LIBRARIES} opencv_core opencv_imgproc)
mrover_nodelet_include_directories(gst_websocket_streamer ${Gst_INCLUDE_DIRS} ${GstApp_INCLUDE_DIRS} ${LibUsb_INCLUDE_DIRS} ${LibUdev_INCLUDE_DIRS})
endif ()

if (ZED_FOUND)
mrover_add_nodelet(object_detector src/perception/object_detector/*.c* src/perception/object_detector src/perception/object_detector/pch.hpp)
Expand Down
3 changes: 3 additions & 0 deletions action/ArmAction.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
string name
---
---
4 changes: 2 additions & 2 deletions ansible/roles/build/files/profiles/ci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ catkin_make_args: [ ]
cmake_args:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_C_COMPILER=clang-16
- -DCMAKE_CXX_FLAGS=-pipe
- -DCMAKE_CXX_FLAGS=-pipe -fgnuc-version=13.1.0
- -DCMAKE_CXX_COMPILER=clang++-16
- -DCMAKE_CUDA_HOST_COMPILER=clang++-16
- -DCMAKE_CUDA_HOST_COMPILER=g++-9
- -DMROVER_IS_CI=ON
- -Wno-dev
devel_layout: linked
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/build/files/profiles/debug/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ catkin_make_args: [ ]
cmake_args:
- -DCMAKE_BUILD_TYPE=Debug
- -DCMAKE_C_COMPILER=clang-16
- -DCMAKE_CXX_FLAGS=-pipe
- -DCMAKE_CXX_FLAGS=-pipe -fgnuc-version=13.1.0
- -DCMAKE_CXX_COMPILER=clang++-16
- -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache
- -DCMAKE_CUDA_HOST_COMPILER=clang++-16
- -DCMAKE_CUDA_HOST_COMPILER=g++-9
- -Wno-dev
devel_layout: linked
devel_space: devel
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/build/files/profiles/release/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ catkin_make_args: [ ]
cmake_args:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_C_COMPILER=clang-16
- -DCMAKE_CXX_FLAGS=-march=native -pipe
- -DCMAKE_CXX_FLAGS=-march=native -pipe -fgnuc-version=13.1.0
- -DCMAKE_CXX_COMPILER=clang++-16
- -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache
- -DCMAKE_CUDA_HOST_COMPILER=clang++-16
- -DCMAKE_CUDA_HOST_COMPILER=g++-9
- -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
- -Wno-dev
devel_layout: linked
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/build/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
- libgstreamer1.0-dev
- libgstreamer-plugins-base1.0-dev
- vainfo
- x264

- name: Install Local APT Packages
become: True
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/esw/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

- name: Install Moteus GUI
pip:
name: moteus_gui
name: moteus-gui
3 changes: 3 additions & 0 deletions ansible/roles/jetson_services/files/rules/99-usb-serial.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SUBSYSTEM=="tty", ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a9", SYMLINK+="gps_%n"
SUBSYSTEM=="tty", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0058", SYMLINK+="imu"
SUBSYSTEM=="video4linux", KERNEL=="video*", ATTRS{idVendor}=="1bcf", ATTRS{idProduct}=="0b12", ATTR{index}=="0", GROUP="video", SYMLINK+="arducam"
14 changes: 14 additions & 0 deletions ansible/roles/jetson_services/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- name: USB Rules
become: true
synchronize:
src: files/rules/
dest: /etc/udev/rules.d
recursive: true

- name: udev Reload Rules
become: true
command: udevadm control --reload-rules

- name: udev TTY Trigger
become: true
command: udevadm trigger --subsystem-match=tty
2 changes: 2 additions & 0 deletions cmake/deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ pkg_search_module(NetLink libnl-3.0 QUIET)
pkg_search_module(NetLinkRoute libnl-route-3.0 QUIET)
pkg_search_module(Gst gstreamer-1.0 QUIET)
pkg_search_module(GstApp gstreamer-app-1.0 QUIET)
pkg_search_module(LibUsb libusb-1.0 QUIET)
pkg_search_module(LibUdev libudev QUIET)
24 changes: 12 additions & 12 deletions config/esw.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
right_gps_driver:
port: "/dev/gps"
port: "/dev/ttyACM0"
baud: 38400
frame_id: "base_link"

left_gps_driver:
port: "/dev/ttyACM0"
port: "/dev/gps_0"
baud: 38400
frame_id: "base_link"

Expand Down Expand Up @@ -52,7 +52,7 @@ can:
id: 0x15
- name: "joint_a"
bus: 1
id: 0x20
id: 0x20
- name: "joint_b"
bus: 1
id: 0x21
Expand All @@ -73,10 +73,10 @@ can:
id: 0x26
- name: "mast_gimbal_y"
bus: 3
id: 0x28
id: 0x27
- name: "mast_gimbal_z"
bus: 3
id: 0x27
id: 0x28
- name: "sa_x"
bus: 1
id: 0x29
Expand Down Expand Up @@ -131,10 +131,10 @@ brushless_motors:
max_velocity: 20.0
max_torque: 5.0
joint_a:
# 1236.8475 rad/meter, or 196.850393476 rev/meter, and we want a max vel of 40 meter/s.
# 1236.8475 rad/meter, or 196.850393476 rev/meter, and we want a max vel of 40 meter/s.
# gear ratio is currently at 0.005080 revolutions = 1 meter
min_velocity: -0.10 # this means -0.10 meters per second.
max_velocity: 0.10
min_velocity: -0.05 # this means -0.10 meters per second.
max_velocity: 0.05
limit_0_present: true
limit_1_present: true
limit_0_enabled: true
Expand All @@ -153,11 +153,11 @@ brushless_motors:
max_backward_pos: 0.0
max_torque: 20.0
joint_c:
min_velocity: -0.08 # in terms of output
max_velocity: 0.08 # max output shaft speed: 5 rpm (for now)
min_velocity: -0.03 # in terms of output
max_velocity: 0.03 # max output shaft speed: 5 rpm (for now)
min_position: -0.125
max_position: 0.30 # 220 degrees of motion is the entire range
max_torque: 20.0
max_torque: 200.0
joint_de_0:
min_velocity: -5.0
max_velocity: 5.0
Expand Down Expand Up @@ -604,4 +604,4 @@ auton_led_driver:
baud: 115200

science:
shutoff_temp: 50.0f
shutoff_temp: 50.0f
2 changes: 1 addition & 1 deletion config/localization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ gps_linearization:
reference_point_longitude: -83.7096706
reference_point_altitude: 234.1
reference_heading: 90.0
use_both_gps: true
use_both_gps: false
4 changes: 2 additions & 2 deletions config/moteus/joint_c.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1363,9 +1363,9 @@ servo.adc_cur_cycles 2
servo.adc_aux_cycles 47
servo.pid_dq.kp 0.060606
servo.pid_dq.ki 102.321388
servo.pid_position.kp 14.000000
servo.pid_position.kp 800.000000
servo.pid_position.ki 0.000000
servo.pid_position.kd 1.450000
servo.pid_position.kd 50.000000
servo.pid_position.iratelimit -1.000000
servo.pid_position.ilimit 0.000000
servo.pid_position.max_desired_rate 0.000000
Expand Down
47 changes: 24 additions & 23 deletions config/teleop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,24 @@ teleop:
joint_a:
multiplier: -1
slow_mode_multiplier: 0.5
invert: True
xbox_index: 0
joint_b:
multiplier: 1
slow_mode_multiplier: 1
invert: False
xbox_index: 1
joint_c:
multiplier: -1
multiplier: 1
slow_mode_multiplier: 0.6
invert: False
xbox_index: 3
joint_de_pitch:
multiplier: 0.5
multiplier: -1
slow_mode_multiplier: 1
invert: True
joint_de_roll:
multiplier: -0.5
multiplier: 1
slow_mode_multiplier: 1
invert: True
allen_key:
multiplier: 1
slow_mode_multiplier: 1
invert: False
gripper:
multiplier: 1
slow_mode_multiplier: 1
invert: True

sa_controls:
sa_x:
Expand Down Expand Up @@ -67,21 +57,32 @@ teleop:
enabled: true
multiplier: 1
twist:
multiplier: 0.7
multiplier: 0.6
tilt:
multiplier: 1

xbox_mappings:
left_js_x: 0
left_js_y: 1
right_js_x: 2
right_js_y: 3
left_trigger: 6
right_trigger: 7
left_x: 0
left_y: 1
right_x: 2
right_y: 3
a: 0
b: 1
x: 2
y: 3
left_bumper: 4
right_bumper: 5
left_trigger: 6
right_trigger: 7
back: 8
forward: 9
left_stick_click: 10
right_stick_click: 11
dpad_up: 12
dpad_down: 13
dpad_left: 14
dpad_right: 15
home: 16

joystick_mappings:
left_right: 0
Expand Down Expand Up @@ -119,6 +120,6 @@ teleop:
bar: ["/tf_static", "/rosout", "/tf"]

ik_multipliers:
x: 1
y: 1
z: 1
x: 0.1
y: 0.1
z: 0.1
10 changes: 7 additions & 3 deletions launch/basestation.launch
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
<launch>
<arg name="run_rviz" default="false" />
<arg name="run_network_monitor" default="false" />
<arg name="run_backend" default="true" />
<arg name="run_frontend" default="true" />
<arg name="run_browser" default="true" />

<rosparam command="load" file="$(find mrover)/config/esw.yaml" />
<rosparam command="load" file="$(find mrover)/config/teleop.yaml" />
<rosparam command="load" file="$(find mrover)/config/localization.yaml" />

<node name="gui_frontend" pkg="mrover" type="gui_frontend.sh" cwd="node" required="true" />
<node name="gui_backend" pkg="mrover" type="gui_backend.sh" cwd="node" required="true" />
<node name="gui_chromium" pkg="mrover" type="gui_chromium.sh" />
<node if="$(arg run_frontend)" name="gui_frontend" pkg="mrover" type="gui_frontend.sh" cwd="node" required="true" />
<node if="$(arg run_backend)" name="gui_backend" pkg="mrover" type="gui_backend.sh" cwd="node" required="true" />
<node if="$(arg run_browser)" name="gui_chromium_menu" pkg="mrover" type="gui_chromium_menu.sh" />
<node if="$(arg run_browser)" name="gui_chromium_cameras" pkg="mrover" type="gui_chromium_cameras.sh" />

<group if="$(arg run_rviz)">
<arg name="rvizconfig" default="$(find mrover)/config/rviz/basestation.rviz" />
Expand Down
Loading

0 comments on commit 9cb5e69

Please sign in to comment.