Last active
November 21, 2019 10:25
-
-
Save nicholaskajoh/44fe4ff7f0b7e58a5c0c110c1379f45d to your computer and use it in GitHub Desktop.
ROS build and run packages (Let's Build an Autonomous Toy Car! series)
This file contains 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
# Source ROS env | |
source /opt/ros/melodic/setup.bash | |
# Create package (in path/to/workspace/src) | |
# NB: std_msgs and rospy are dependencies | |
# catkin_create_pkg my_package std_msgs rospy | |
# Create scripts directory in package root | |
# mkdir scripts | |
# Create python script(s) e.g: | |
# touch scripts/my_script.py | |
# Make script(s) executable | |
# chmod +x my_script.py | |
# Build packages (in path/to/workspace) | |
catkin_make | |
# Setup workspace env (in path/to/workspace) | |
source devel/setup.bash | |
# Start ROS | |
roscore | |
# Run package | |
rosrun my_package my_script.py | |
# Test a publisher node | |
# rostopic echo topic_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment