Skip to content

Commit

Permalink
Merge pull request #16 from Gold-Rush-Robotics/hardware_cmake
Browse files Browse the repository at this point in the history
Hardware cmake
  • Loading branch information
c4glenn authored Mar 2, 2024
2 parents 60232d5 + e20e4db commit 667b4b1
Show file tree
Hide file tree
Showing 66 changed files with 6,129 additions and 83 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ jobs:
- uses: actions/checkout@v2
- name: build docker container
run: docker buildx build -t local .
- name: rosdep install
run: docker run local rosdep install --from-paths src -y --ignore-src --rosdistro humble
- name: colcon build
run: docker run local colcon build
- name: rosdep install and colcon build
run: docker run local /bin/bash -c "source /opt/ros/humble/setup.bash && rosdep install --from-paths src -y --ignore-src --rosdistro humble && colcon build --symlink-install"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ CATKIN_IGNORE

install/
log/

bloodstone.urdf
36 changes: 16 additions & 20 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
{
"configurations": [
{
"browse": {
"databaseFilename": "${default}",
"limitSymbolsToIncludedHeaders": false
},
"includePath": [
"/workspaces/DevEnv/repos/Robot2023/install/grr_hardware/include/**",
"/workspaces/DevEnv/repos/Robot2023/install/grr_cmake_controller/include/**",
"/opt/ros/humble/include/**",
"/usr/include/**"
],
"name": "ROS",
"intelliSenseMode": "gcc-x64",
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu11",
"cppStandard": "c++14"
}
],
"version": 4
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"~/miniforge3/envs/ros_env/include/**",
"/robotics/bcm2835-1.73/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-arm64"
}
],
"version": 4
}
81 changes: 75 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,90 @@
{
"files.associations": {
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"array": "cpp",
"atomic": "cpp",
"strstream": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cfenv": "cpp",
"chrono": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"semaphore": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"variant": "cpp"
},
"ros.distro": "humble",
"python.autoComplete.extraPaths": [
"/workspaces/DevEnv/repos/Robot2023/build/grr_test",
"/workspaces/DevEnv/repos/Robot2023/install/grr_test/lib/python3.10/site-packages",
"/workspaces/DevEnv/repos/Robot2023/build/grr_python_controllers",
"/workspaces/DevEnv/repos/Robot2023/install/grr_python_controllers/lib/python3.10/site-packages",
"/workspaces/DevEnv/repos/Robot2023/build/grr_bringup",
"/workspaces/DevEnv/repos/Robot2023/install/grr_bringup/lib/python3.10/site-packages",
"/opt/ros/humble/lib/python3.10/site-packages",
"/opt/ros/humble/local/lib/python3.10/dist-packages"
],
"python.analysis.extraPaths": [
"/workspaces/DevEnv/repos/Robot2023/build/grr_test",
"/workspaces/DevEnv/repos/Robot2023/install/grr_test/lib/python3.10/site-packages",
"/workspaces/DevEnv/repos/Robot2023/build/grr_python_controllers",
"/workspaces/DevEnv/repos/Robot2023/install/grr_python_controllers/lib/python3.10/site-packages",
"/workspaces/DevEnv/repos/Robot2023/build/grr_bringup",
"/workspaces/DevEnv/repos/Robot2023/install/grr_bringup/lib/python3.10/site-packages",
"/opt/ros/humble/lib/python3.10/site-packages",
"/opt/ros/humble/local/lib/python3.10/dist-packages"
Expand Down
17 changes: 3 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is an auto generated Dockerfile for ros:ros-base
# generated from docker_images_ros2/create_ros_image.Dockerfile.em
FROM ros:humble-ros-core-jammy
FROM ros:humble-ros-base-jammy

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
Expand All @@ -13,21 +13,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
&& rm -rf /var/lib/apt/lists/*

# bootstrap rosdep
RUN rosdep init && \
rosdep update --rosdistro $ROS_DISTRO

# setup colcon mixin and metadata
RUN colcon mixin add default \
https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml && \
colcon mixin update && \
colcon metadata add default \
https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml && \
colcon metadata update

RUN rosdep update --rosdistro $ROS_DISTRO
# install ros2 packages
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-humble-ros-base=0.10.0-1* \
&& rm -rf /var/lib/apt/lists/*
ros-humble-ros-base=0.10.0-1*

COPY src /workspace/src

Expand Down
63 changes: 63 additions & 0 deletions src/grr_bringup/config/controllers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
controller_manager:
ros__parameters:
update_rate: 1 # Hz

joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster

grr_cmake_controller:
type: grr_cmake_controller/MecanumController

joint_state_broadcaster:
ros__parameters:
extra_joints: [
"rear_right_roller_0_joint",
"rear_right_roller_1_joint",
"rear_right_roller_2_joint",
"rear_right_roller_3_joint",
"rear_right_roller_4_joint",
"rear_right_roller_5_joint",
"rear_right_roller_6_joint",
"rear_right_roller_7_joint",
"rear_right_roller_8_joint",
"rear_left_roller_0_joint",
"rear_left_roller_1_joint",
"rear_left_roller_2_joint",
"rear_left_roller_3_joint",
"rear_left_roller_4_joint",
"rear_left_roller_5_joint",
"rear_left_roller_6_joint",
"rear_left_roller_7_joint",
"rear_left_roller_8_joint",
"front_left_roller_0_joint",
"front_left_roller_1_joint",
"front_left_roller_2_joint",
"front_left_roller_3_joint",
"front_left_roller_4_joint",
"front_left_roller_5_joint",
"front_left_roller_6_joint",
"front_left_roller_7_joint",
"front_left_roller_8_joint",
"front_right_roller_0_joint",
"front_right_roller_1_joint",
"front_right_roller_2_joint",
"front_right_roller_3_joint",
"front_right_roller_4_joint",
"front_right_roller_5_joint",
"front_right_roller_6_joint",
"front_right_roller_7_joint",
"front_right_roller_8_joint"]

grr_cmake_controller:
ros__parameters:
front_left_joint: "front_left_mecanum_joint"
front_right_joint: "front_right_mecanum_joint"
rear_left_joint: "rear_left_mecanum_joint"
rear_right_joint: "rear_right_mecanum_joint"

chassis_center_to_axle: 0.104775 #4.125 in to m
axle_center_to_wheel: 0.10795 #4.25 in
wheel_radius: 0.0375 #1.5 in

cmd_vel_timeout: 0.5
use_stamped_vel: false
Loading

0 comments on commit 667b4b1

Please sign in to comment.