sudo snap install chromium
sudo apt install -y g++ build-essential cmake git htop tree tmux curl openssh-server imagemagick maim vim-gtk3 i3 python3-pip python3-virtualenv libappindicator3-dev castxml qt5-style-plugins trash-cli checkinstall gparted net-tools rename libreadline-dev imagemagick policykit-1-gnome
sudo snap install pycharm-professional --classic
sudo snap install clion --classic
# https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-20-04-focal-fossa-linux
sudo ubuntu-drivers autoinstall
# https://linuxconfig.org/how-to-install-cuda-on-ubuntu-20-04-focal-fossa-linux
sudo apt install -y nvidia-cuda-toolkit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import threading | |
| from time import sleep | |
| import rclpy | |
| from rclpy.node import Node | |
| from example_interfaces.srv import AddTwoInts | |
| class MinimalClientAsync(Node): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is useful for testing buggy ros launch setups, | |
| # because you can run it like `while ros2 launch pkg debug.launch.py; do sleep 0.5; done;` | |
| # and it will keep restarting util the test node returns an error. | |
| # this was really difficult to figure out how to do.... :( | |
| import os | |
| import sys | |
| from launch import LaunchDescription | |
| from launch.actions import DeclareLaunchArgument, RegisterEventHandler, EmitEvent | |
| from launch.event_handlers import OnProcessExit | |
| from launch.events import Shutdown |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import launch | |
| import launch_ros | |
| from launch import LaunchService | |
| from launch.frontend import Parser | |
| from launch.launch_description_sources import PythonLaunchDescriptionSource | |
| from launch.utilities import normalize_to_list_of_substitutions | |
| import os | |
| # Absolute path to your launch file | |
| launch_file_path = ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from io import BytesIO | |
| from geometry_msgs.msg import Point | |
| p = Point(x=2, y=4) | |
| print(p) | |
| buff = BytesIO() | |
| p.serialize(buff) | |
| serialized_bytes = buff.getvalue() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def open_bagfile(bagfile: Path): | |
| reader = rosbag2_py.SequentialReader() | |
| storage_options = rosbag2_py.StorageOptions(bagfile.as_posix()) | |
| converter_options = rosbag2_py.ConverterOptions("cdr", "cdr") | |
| reader.open(storage_options, converter_options) | |
| topic_types = reader.get_all_topics_and_types() | |
| # Create a map for quicker lookup | |
| type_map = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from distutils.core import setup | |
| setup(name='yolo', | |
| version='1.0', | |
| description='yolo v7', | |
| author='', | |
| author_email='', | |
| url='', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NOTE: if using this outside ec2, you will need to copy your ~/.aws/credentials into the computer first | |
| sudo apt update | |
| sudo apt install -y g++ build-essential cmake git htop tree tmux curl openssh-server imagemagick maim vim-gtk3 i3 python3-pip python3-virtualenv libappindicator3-dev castxml qt5-style-plugins trash-cli checkinstall gparted net-tools rename libreadline-dev imagemagick policykit-1-gnome | |
| sudo apt upgrade | |
| git config --global user.email "peter@`echo $HOSTNAME`" | |
| git config --global user.name "peter" | |
| sudo apt-get install ubuntu-drivers-common |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <ros/ros.h> | |
| #include <moveit/kinematic_constraints/utils.h> | |
| #include <moveit/planning_interface/planning_interface.h> | |
| #include <moveit/planning_pipeline/planning_pipeline.h> | |
| #include <moveit/planning_scene_monitor/planning_scene_monitor.h> | |
| #include <moveit/robot_model_loader/robot_model_loader.h> | |
| #include <moveit/robot_state/conversions.h> | |
| #include <moveit_msgs/DisplayTrajectory.h> | |
| #include <moveit_visual_tools/moveit_visual_tools.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| PS3='Choose a workspace type: ' | |
| options=("default" "debug") | |
| select opt in "${options[@]}" | |
| do | |
| case $opt in | |
| "default") | |
| source /home/peter/catkin_ws/devel/setup.bash | |
| cd /home/peter/catkin_ws/ | |
| catkin profile set default |
NewerOlder