Our new, ROS 1 Noetic repository.
Our ROS2 Humble/Foxy repository is RoverFlake2
Our Firmware repository is FirmFlake
Make sure to clone reccursively
git clone https://github.com/UBC-Snowbots/RoverFlake.git --recursive
We are using branches only, you are free to make a fork if you are experienced with git, but using git with 1 remote is going to be easier. We reccommend using gitt CLI if you have experience with it. We reccomend the git GUI from VS code if you havent used git before to pull/push code and manage commits (easiest to use git CLI to set up repo)
git remote -v
should return:
origin https://github.com/UBC-Snowbots/RoverFlake.git (fetch)
origin https://github.com/UBC-Snowbots/RoverFlake.git (push)
To run or build any of the ROS code, you will need to set up an ubuntu enviroment. To see how, read the "setup_ubuntu.md" in "resources" (https://github.com/UBC-Snowbots/RoverFlake/blob/fce38688cf4b68fb9d10681cf8c75e355d8a5337/resources/setup_ubuntu.md)
CIRC Competition Rules: https://circ.cstag.ca/2023/tasks/
Tutorials and advice for new members.
First of all, if you're new to the Ubuntu command line: it is primarily used over the graphical user interface as it allows you to do more.
In case you're new to GitHub, get started with this tutorial
Pretty cool right? Now you're wondering how you can use GitHub from the terminal/command line, it's called Git
Now you're wondering how we develop our software, the first place to start is understanding how our workflow works. We use the Forking Workflow, which you can learn more about under Github Conventions in README.md
(located in the same directory you opened this readme from) and other important information you should know. If you have questions, you may find your answers over there.
This is the language we use to develop most of our software, so if you are new with C++, understand the fundamentals from this tutorial, but there are much more resources online as well.
By now you understand the basics of ROS, but to learn more about it, you can complete the intermediate tutorials or brush up on the basics if you need to here
Rarely will your Github issues contain all the information that you need to resolve them. Using google to search for that missing piece you need is sometimes useful (think like an optimist when you're understanding/interpreting your project/issue: "If only I knew how to do...", then search "how to do..."), or of course don't hesitate to ask for help, clarification, or just more information from any of the software leads.
Remember it is much better to get help when you're stuck than to waste time trying to figure out what's wrong. This way, you're more or less continuously progressing, and as a whole, we develop efficiently and our software stack progresses.
clang-format
tool.
Snowflake
repo run ./clang_format/fix_formatting.sh BRANCH_NAME
, where BRANCH_NAME
is the name of the branch you intend to merge your code into (ex. iarrc
or core
). This script will fix any improperly formatted code, but will refuse to change any files with uncommited changes (to prevent you losing work)Below are some notes we would like to highlight about pull requests:
Every .cpp and .h file should start with
/*
* Created By: Someone
* Created On: December 1st, 2000
* Description: A quick description of what this file does/is for
*/
Functions should be commented a la JavaDoc
The Javadoc comment (below) should be directly above every function in the header file
/**
* One line description of the function
*
* A longer and more in depth description of the function
* if it is needed.
*
* @param param_one the first parameter of the function
* @param param_two the second parameter of the function whose
* description goes longer than one line
* @return what the function returns if it returns anything
*
*/
Classes are CamelCase
Variables are non_camel_case
Constants are ALL_CAPS_WITH_UNDERSCORES
Functions are camelCase
Indentations are 4 spaces
CMakeLists.txt
files should be reduced to only contain the minimum amount of comments. The version in sample_package
has all the comments left in (for the sake of verbosity), so for a more representative example of what yours should look like, see sb_vision/CMakeLists.txt
(or really any package aside from sample_package
)
+X
^
|
+θ +<----->+ -θ
| | |
V | V
+Y <---------------------> -Y
|
|
|
V
-X
src/sample_package
some_ros_package | CMakeLists.txt | package.xml └───src | | MyNode.cpp | | my_node.cpp | └───launch | | my_node.launch | └───include | | MyNode.h | └───test | | my-node-test.cpp | | my_node_rostest.cpp | | sample_package_test.test
while(ros::ok()){}
loop
some_ros_package | CMakeLists.txt | package.xml └───src | | my_node.cpp
roslaunch package_name package_launch_file.launch
catkin_make run_tests
to run themcatkin_make run_tests_MY_PACKAGE_NAME
<test></test>
tag. This also needs a special entry under CMakelists as shown in the sample package. See more details hererostest package_name package_test_file.test
.cd ~/Snowflake
and then source devel/setup.sh
sb_gazebo/urdf/**ROBOT_NAME**.gazebo
and switch around the lidar settings (see comments in said file)sb_gazebo/worlds
foldersb_gazebo/launch
cd ~/Snowflake
and then source devel/setup.sh
, then run the appriate launchfile from src/sb_gazebo/launch
by running roslaunch LAUNCH_FILE.launch
(from within the launch folder). Note: At least with PS3 controllers, you have to hold down L1
while using the joystick for the controller to worksrc/firmware
. This way you don't need to worry about downloading the libraries yourself!/your/path/to/Snowflake/src/firmware
as your sketchbook directory. Open arduino sketches in the workspace and they will work!Intel Realsense is a sensor that captures a 3D depth map of the environment in front of the sensor. This 3D depth map is called a point cloud, which is essentially just a list (vector in c++) that contains a bunch of points, where each point contains the x, y, and z coordinates, as well as a color value associated to it.
roslaunch realsense2_camera rs_rgbd.launch
to launch realsense. You should be able to see the point cloud at the topic named /camera/depth_registered/points
in rviz
.roslaunch realsense2_camera rs_rgbd.launch
.rosbag record /camera/depth_registered/points <options>
. See rosbag record -h
for the list of options. To stop the recording, just press ctrl+c. E.g. rosbag record /camera/depth_registered/points --split --duration 1m --max-splits 3 -o ../rosbags/tennis_ball/
- split files every 1 minute, split for maximum of 3 times, and store the rosbag in ../rosbags/tennis_ball/
folder.rosbag play path/to/rosbag/file -l
. path/to/rosbag/file
is the path to the rosbag generated in step 2. Note that the -l
flag loops the recording so it will play forever until you terminate it manually (using ctrl+c).rviz
. You should be able to see the recording of the point cloud at /camera/depth_registered/points
.build
and devel
folders (if present) to remove any "cached" information