Skip to content

Commit

Permalink
upgrade to humble for docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew2002zhao committed Oct 15, 2023
1 parent 8450971 commit 6769b56
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
11 changes: 8 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile.dev"
"dockerfile": "../Dockerfile.jetson"
},
"containerEnv": { "DISPLAY": "host.docker.internal:0.0" }
"containerEnv": { "DISPLAY": "host.docker.internal:0.0" },

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand All @@ -21,7 +21,12 @@

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"

// Build arguments to pass to the CLI

"runArgs":["--runtime=nvidia", "--rm" , "--network=host"]

}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ bin/
build/
install/
log/
ros_dependencies/
msg_gen/
srv_gen/
msg/*Action.msg
Expand Down
23 changes: 23 additions & 0 deletions Dockerfile.jetson
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Start with the desktop ROS Humble 20.04 image
FROM dustynv/ros:humble-desktop-l4t-r35.1.0
# FROM dustynv/ros:galactic-desktop-l4t-r35.1.0

# This dockerfile assumes you'll share your development folder from your computer over to the container,
# so we don't do `rosdep install` for you, or clone the repository.

# update everything
RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 42D5A192B819C5DA
RUN sudo apt purge '*opencv*'
RUN sudo apt install libopencv-dev
RUN sudo apt-get update -y && sudo apt-get install -y
# # Ensure rosinstall and rosdep are installed and up to date
RUN sudo apt-get install -y python3-rosdep


# build via docker build -f .\Dockerfile.dev -t uwrt_dev_image .
# run via docker run --name uwrt_dev_container -e DISPLAY=host.docker.internal:0.0 -it -v uwrt_dev_image
RUN rosdep install --from-paths . -y -r --ignore-src




Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class UWRTMarsRoverDrivetrainHWActuatorInterface : public hardware_interface::Ac
LifecyleNodeCallbackReturn on_activate(const rclcpp_lifecycle::State& previous_state) override;

UWRT_MARS_ROVER_DRIVETRAIN_HW_PUBLIC
hardware_interface::return_type read() override;
hardware_interface::return_type read(const rclcpp::Time & time, const rclcpp::Duration & period) override;

UWRT_MARS_ROVER_DRIVETRAIN_HW_PUBLIC
hardware_interface::return_type write() override;
hardware_interface::return_type write(const rclcpp::Time & time, const rclcpp::Duration & period) override;

UWRT_MARS_ROVER_DRIVETRAIN_HW_PUBLIC
std::vector<hardware_interface::StateInterface> export_state_interfaces() override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ LifecyleNodeCallbackReturn UWRTMarsRoverDrivetrainHWActuatorInterface::on_activa
return LifecyleNodeCallbackReturn::SUCCESS;
}

hardware_interface::return_type UWRTMarsRoverDrivetrainHWActuatorInterface::read() {
hardware_interface::return_type UWRTMarsRoverDrivetrainHWActuatorInterface::read(const rclcpp::Time & time, const rclcpp::Duration & period) {
RCLCPP_DEBUG(logger_, "Drivetrain Actuator Reading...");

TwoFloats encoder_readings;
Expand All @@ -182,7 +182,7 @@ hardware_interface::return_type UWRTMarsRoverDrivetrainHWActuatorInterface::read
return hardware_interface::return_type::OK;
}

hardware_interface::return_type UWRTMarsRoverDrivetrainHWActuatorInterface::write() {
hardware_interface::return_type UWRTMarsRoverDrivetrainHWActuatorInterface::write(const rclcpp::Time & time, const rclcpp::Duration & period) {
RCLCPP_DEBUG(logger_, "Drivetrain Actuator Writing...");

// RCLCPP_INFO_STREAM(logger_, "Joint Velocity: " << motor_velocity_);
Expand Down

0 comments on commit 6769b56

Please sign in to comment.