Skip to content

Instantly share code, notes, and snippets.

@justinking22
Created October 1, 2023 16:35
Show Gist options
  • Save justinking22/2ff755935a314ffa5ef881c908a1e3bc to your computer and use it in GitHub Desktop.
Save justinking22/2ff755935a314ffa5ef881c908a1e3bc to your computer and use it in GitHub Desktop.
HW5
justin@justin-Standard-PC-Q35-ICH9-2009:~$ # Replace ".bash" with your shell if you're not using bash
justin@justin-Standard-PC-Q35-ICH9-2009:~$ # Possible values are: setup.bash, setup.sh, setup.zsh
justin@justin-Standard-PC-Q35-ICH9-2009:~$ source /opt/ros/foxy/setup.bash
justin@justin-Standard-PC-Q35-ICH9-2009:~$ echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc
justin@justin-Standard-PC-Q35-ICH9-2009:~$ printenv | grep -i ROS
ROS_VERSION=2
ROS_PYTHON_VERSION=3
AMENT_PREFIX_PATH=/opt/ros/foxy
PYTHONPATH=/opt/ros/foxy/lib/python3.8/site-packages
LD_LIBRARY_PATH=/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/opt/rviz_ogre_vendor/lib:/opt/ros/foxy/lib/x86_64-linux-gnu:/opt/ros/foxy/lib
ROS_LOCALHOST_ONLY=0
PATH=/opt/ros/foxy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
ROS_DISTRO=foxy
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ROS_VERSION=2
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ROS_PYTHON_VERSION=3
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ROS_DISTRO=foxy
justin@justin-Standard-PC-Q35-ICH9-2009:~$ export ROS_DOMAIN_ID=<your_domain_id>
bash: syntax error near unexpected token `newline'
justin@justin-Standard-PC-Q35-ICH9-2009:~$ export ROS_DOMAIN_ID=<215-232>
bash: syntax error near unexpected token `newline'
justin@justin-Standard-PC-Q35-ICH9-2009:~$ export ROS_DOMAIN_ID=<177>
bash: syntax error near unexpected token `177'
justin@justin-Standard-PC-Q35-ICH9-2009:~$ /proc/sys/net/ipv4/ip_local_port_range
bash: /proc/sys/net/ipv4/ip_local_port_range: Permission denied
justin@justin-Standard-PC-Q35-ICH9-2009:~$ export ROS_DOMAIN_ID=42
justin@justin-Standard-PC-Q35-ICH9-2009:~$ echo "export ROS_DOMAIN_ID=42" >> ~/.bashrc
justin@justin-Standard-PC-Q35-ICH9-2009:~$ export ROS_LOCALHOST_ONLY=1
justin@justin-Standard-PC-Q35-ICH9-2009:~$ echo "export ROS_LOCALHOST_ONLY=1" >> ~/.bashrc
justin@justin-Standard-PC-Q35-ICH9-2009:~$ sudo apt update
[sudo] password for justin:
Sorry, try again.
[sudo] password for justin:
Sorry, try again.
[sudo] password for justin:
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://packages.ros.org/ros2/ubuntu focal InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://kr.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://kr.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ros2 pkg executables turtlesim
turtlesim draw_square
turtlesim mimic
turtlesim turtle_teleop_key
turtlesim turtlesim_node
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ros2 run turtlesim turtlesim_node
[INFO] [1696171869.775593447] [turtlesim]: Starting turtlesim with node name /turtlesim
[INFO] [1696171869.786519550] [turtlesim]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000]
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ros2 run turtlesim turtle_teleop_key
Reading from keyboard
---------------------------
Use arrow keys to move the turtle.
Use G|B|V|C|D|E|R|T keys to rotate to absolute orientations. 'F' to cancel a rotation.
'Q' to quit.
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ros2 node list
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ros2 topic list
/parameter_events
/rosout
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ros2 service list
justin@justin-Standard-PC-Q35-ICH9-2009:~$ ros2 action list
justin@justin-Standard-PC-Q35-ICH9-2009:~$ sudo apt update
Hit:1 http://packages.ros.org/ros2/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://kr.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://kr.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
justin@justin-Standard-PC-Q35-ICH9-2009:~$
justin@justin-Standard-PC-Q35-ICH9-2009:~$ sudo apt install ~nros-foxy-rqt*
Reading package lists... Done
Building dependency tree
Reading state information... Done
ros-foxy-rqt-action is already the newest version (1.0.2-1focal.20230527.052933).
ros-foxy-rqt-action set to manually installed.
ros-foxy-rqt-common-plugins is already the newest version (1.0.0-1focal.20230606.035221).
ros-foxy-rqt-common-plugins set to manually installed.
ros-foxy-rqt-console is already the newest version (1.1.2-1focal.20230527.052642).
ros-foxy-rqt-console set to manually installed.
ros-foxy-rqt-graph is already the newest version (1.1.3-1focal.20230527.052659).
ros-foxy-rqt-graph set to manually installed.
ros-foxy-rqt-gui is already the newest version (1.1.2-1focal.20230527.052034).
ros-foxy-rqt-gui set to manually installed.
ros-foxy-rqt-gui-cpp is already the newest version (1.1.2-1focal.20230527.053814).
ros-foxy-rqt-gui-cpp set to manually installed.
ros-foxy-rqt-gui-py is already the newest version (1.1.2-1focal.20230527.052317).
ros-foxy-rqt-gui-py set to manually installed.
ros-foxy-rqt-image-view is already the newest version (1.1.1-1focal.20230606.034651).
ros-foxy-rqt-image-view set to manually installed.
ros-foxy-rqt-msg is already the newest version (1.1.1-1focal.20230527.052823).
ros-foxy-rqt-msg set to manually installed.
ros-foxy-rqt-plot is already the newest version (1.1.1-1focal.20230527.052703).
ros-foxy-rqt-plot set to manually installed.
ros-foxy-rqt-publisher is already the newest version (1.3.0-1focal.20230527.052706).
ros-foxy-rqt-publisher set to manually installed.
ros-foxy-rqt-py-common is already the newest version (1.1.2-1focal.20230527.052041).
ros-foxy-rqt-py-common set to manually installed.
ros-foxy-rqt-py-console is already the newest version (1.0.2-1focal.20230527.052719).
ros-foxy-rqt-py-console set to manually installed.
ros-foxy-rqt-reconfigure is already the newest version (1.0.8-1focal.20230527.052824).
ros-foxy-rqt-reconfigure set to manually installed.
ros-foxy-rqt-service-caller is already the newest version (1.0.5-1focal.20230527.052944).
ros-foxy-rqt-service-caller set to manually installed.
ros-foxy-rqt-shell is already the newest version (1.0.2-1focal.20230527.052946).
ros-foxy-rqt-shell set to manually installed.
ros-foxy-rqt-srv is already the newest version (1.0.3-1focal.20230527.052935).
ros-foxy-rqt-srv set to manually installed.
ros-foxy-rqt-top is already the newest version (1.0.2-1focal.20230527.052948).
ros-foxy-rqt-top set to manually installed.
ros-foxy-rqt-topic is already the newest version (1.3.0-2focal.20230527.053005).
ros-foxy-rqt-topic set to manually installed.
The following packages were automatically installed and are no longer required:
gir1.2-goa-1.0 libfwupdplugin1 libxmlb1
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
python3-rospkg
The following NEW packages will be installed:
python3-rospkg ros-foxy-rqt ros-foxy-rqt-gui-cpp-dbgsym ros-foxy-rqt-image-view-dbgsym ros-foxy-rqt-moveit ros-foxy-rqt-robot-dashboard
ros-foxy-rqt-robot-monitor ros-foxy-rqt-robot-steering ros-foxy-rqt-runtime-monitor ros-foxy-rqt-tf-tree
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,492 kB of archives.
After this operation, 6,689 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://packages.ros.org/ros2/ubuntu focal/main amd64 python3-rospkg all 1.5.0-100 [2,536 B]
Get:2 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-rqt amd64 1.1.2-1focal.20230527.054149 [6,880 B]
Get:3 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-rqt-gui-cpp-dbgsym amd64 1.1.2-1focal.20230527.053814 [1,779 kB]
Get:4 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-rqt-image-view-dbgsym amd64 1.1.1-1focal.20230606.034651 [1,571 kB]
Get:5 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-rqt-moveit amd64 1.0.1-1focal.20230527.053126 [14.7 kB]
Get:6 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-rqt-robot-monitor amd64 1.0.5-1focal.20230527.052734 [28.8 kB]
Get:7 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-rqt-robot-dashboard amd64 0.6.1-1focal.20230527.052929 [51.4 kB]
Get:8 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-rqt-robot-steering amd64 1.0.0-1focal.20230527.052738 [10.9 kB]
Get:9 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-rqt-runtime-monitor amd64 1.0.0-1focal.20230527.052940 [13.1 kB]
Get:10 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-rqt-tf-tree amd64 1.0.3-1focal.20230606.034919 [14.1 kB]
Fetched 3,492 kB in 18s (196 kB/s)
Selecting previously unselected package python3-rospkg.
(Reading database ... 264888 files and directories currently installed.)
Preparing to unpack .../0-python3-rospkg_1.5.0-100_all.deb ...
Unpacking python3-rospkg (1.5.0-100) ...
Selecting previously unselected package ros-foxy-rqt.
Preparing to unpack .../1-ros-foxy-rqt_1.1.2-1focal.20230527.054149_amd64.deb ...
Unpacking ros-foxy-rqt (1.1.2-1focal.20230527.054149) ...
Selecting previously unselected package ros-foxy-rqt-gui-cpp-dbgsym.
Preparing to unpack .../2-ros-foxy-rqt-gui-cpp-dbgsym_1.1.2-1focal.20230527.053814_amd64.deb ...
Unpacking ros-foxy-rqt-gui-cpp-dbgsym (1.1.2-1focal.20230527.053814) ...
Selecting previously unselected package ros-foxy-rqt-image-view-dbgsym.
Preparing to unpack .../3-ros-foxy-rqt-image-view-dbgsym_1.1.1-1focal.20230606.034651_amd64.deb ...
Unpacking ros-foxy-rqt-image-view-dbgsym (1.1.1-1focal.20230606.034651) ...
Selecting previously unselected package ros-foxy-rqt-moveit.
Preparing to unpack .../4-ros-foxy-rqt-moveit_1.0.1-1focal.20230527.053126_amd64.deb ...
Unpacking ros-foxy-rqt-moveit (1.0.1-1focal.20230527.053126) ...
Selecting previously unselected package ros-foxy-rqt-robot-monitor.
Preparing to unpack .../5-ros-foxy-rqt-robot-monitor_1.0.5-1focal.20230527.052734_amd64.deb ...
Unpacking ros-foxy-rqt-robot-monitor (1.0.5-1focal.20230527.052734) ...
Selecting previously unselected package ros-foxy-rqt-robot-dashboard.
Preparing to unpack .../6-ros-foxy-rqt-robot-dashboard_0.6.1-1focal.20230527.052929_amd64.deb ...
Unpacking ros-foxy-rqt-robot-dashboard (0.6.1-1focal.20230527.052929) ...
Selecting previously unselected package ros-foxy-rqt-robot-steering.
Preparing to unpack .../7-ros-foxy-rqt-robot-steering_1.0.0-1focal.20230527.052738_amd64.deb ...
Unpacking ros-foxy-rqt-robot-steering (1.0.0-1focal.20230527.052738) ...
Selecting previously unselected package ros-foxy-rqt-runtime-monitor.
Preparing to unpack .../8-ros-foxy-rqt-runtime-monitor_1.0.0-1focal.20230527.052940_amd64.deb ...
Unpacking ros-foxy-rqt-runtime-monitor (1.0.0-1focal.20230527.052940) ...
Selecting previously unselected package ros-foxy-rqt-tf-tree.
Preparing to unpack .../9-ros-foxy-rqt-tf-tree_1.0.3-1focal.20230606.034919_amd64.deb ...
Unpacking ros-foxy-rqt-tf-tree (1.0.3-1focal.20230606.034919) ...
Setting up ros-foxy-rqt-gui-cpp-dbgsym (1.1.2-1focal.20230527.053814) ...
Setting up python3-rospkg (1.5.0-100) ...
Setting up ros-foxy-rqt-image-view-dbgsym (1.1.1-1focal.20230606.034651) ...
Setting up ros-foxy-rqt-robot-steering (1.0.0-1focal.20230527.052738) ...
Setting up ros-foxy-rqt-tf-tree (1.0.3-1focal.20230606.034919) ...
Setting up ros-foxy-rqt-runtime-monitor (1.0.0-1focal.20230527.052940) ...
Setting up ros-foxy-rqt-moveit (1.0.1-1focal.20230527.053126) ...
Setting up ros-foxy-rqt (1.1.2-1focal.20230527.054149) ...
Setting up ros-foxy-rqt-robot-monitor (1.0.5-1focal.20230527.052734) ...
Setting up ros-foxy-rqt-robot-dashboard (0.6.1-1focal.20230527.052929) ...
justin@justin-Standard-PC-Q35-ICH9-2009:~$ rqt
justin@justin-Standard-PC-Q35-ICH9-2009:~$ rqt
justin@justin-Standard-PC-Q35-ICH9-2009:~$ rqt --force-discover
justin@justin-Standard-PC-Q35-ICH9-2009:~$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://kr.archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://kr.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:4 http://packages.ros.org/ros2/ubuntu focal InRelease
Hit:5 http://kr.archive.ubuntu.com/ubuntu focal-backports InRelease
Fetched 114 kB in 2s (49.3 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
justin@justin-Standard-PC-Q35-ICH9-2009:~$
justin@justin-Standard-PC-Q35-ICH9-2009:~$ sudo apt install ros-foxy-rqt*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'ros-foxy-rqt-robot-dashboard' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-topic' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-service-caller' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-reconfigure' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-robot-monitor' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-gui-cpp' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-gui' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-py-console' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-image-view' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-robot-steering' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-msg' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-action' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-tf-tree' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-gui-py' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-console' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-gui-cpp-dbgsym' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-moveit' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-shell' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-common-plugins' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-srv' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-top' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-publisher' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-plot' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-graph' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-image-view-dbgsym' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-runtime-monitor' for glob 'ros-foxy-rqt*'
Note, selecting 'ros-foxy-rqt-py-common' for glob 'ros-foxy-rqt*'
ros-foxy-rqt is already the newest version (1.1.2-1focal.20230527.054149).
ros-foxy-rqt-action is already the newest version (1.0.2-1focal.20230527.052933).
ros-foxy-rqt-common-plugins is already the newest version (1.0.0-1focal.20230606.035221).
ros-foxy-rqt-console is already the newest version (1.1.2-1focal.20230527.052642).
ros-foxy-rqt-graph is already the newest version (1.1.3-1focal.20230527.052659).
ros-foxy-rqt-gui is already the newest version (1.1.2-1focal.20230527.052034).
ros-foxy-rqt-gui-cpp is already the newest version (1.1.2-1focal.20230527.053814).
ros-foxy-rqt-gui-cpp-dbgsym is already the newest version (1.1.2-1focal.20230527.053814).
ros-foxy-rqt-gui-py is already the newest version (1.1.2-1focal.20230527.052317).
ros-foxy-rqt-image-view is already the newest version (1.1.1-1focal.20230606.034651).
ros-foxy-rqt-image-view-dbgsym is already the newest version (1.1.1-1focal.20230606.034651).
ros-foxy-rqt-moveit is already the newest version (1.0.1-1focal.20230527.053126).
ros-foxy-rqt-msg is already the newest version (1.1.1-1focal.20230527.052823).
ros-foxy-rqt-plot is already the newest version (1.1.1-1focal.20230527.052703).
ros-foxy-rqt-publisher is already the newest version (1.3.0-1focal.20230527.052706).
ros-foxy-rqt-py-common is already the newest version (1.1.2-1focal.20230527.052041).
ros-foxy-rqt-py-console is already the newest version (1.0.2-1focal.20230527.052719).
ros-foxy-rqt-reconfigure is already the newest version (1.0.8-1focal.20230527.052824).
ros-foxy-rqt-robot-dashboard is already the newest version (0.6.1-1focal.20230527.052929).
ros-foxy-rqt-robot-monitor is already the newest version (1.0.5-1focal.20230527.052734).
ros-foxy-rqt-robot-steering is already the newest version (1.0.0-1focal.20230527.052738).
ros-foxy-rqt-runtime-monitor is already the newest version (1.0.0-1focal.20230527.052940).
ros-foxy-rqt-service-caller is already the newest version (1.0.5-1focal.20230527.052944).
ros-foxy-rqt-shell is already the newest version (1.0.2-1focal.20230527.052946).
ros-foxy-rqt-srv is already the newest version (1.0.3-1focal.20230527.052935).
ros-foxy-rqt-tf-tree is already the newest version (1.0.3-1focal.20230606.034919).
ros-foxy-rqt-top is already the newest version (1.0.2-1focal.20230527.052948).
ros-foxy-rqt-topic is already the newest version (1.3.0-2focal.20230527.053005).
The following packages were automatically installed and are no longer required:
gir1.2-goa-1.0 libfwupdplugin1 libxmlb1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
justin@justin-Standard-PC-Q35-ICH9-2009:~$ rqt
justin@justin-Standard-PC-Q35-ICH9-2009:~$ rqt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment