So, go ahead and install distcc on the server computer (in my case, the desktop)
And then spin up the server. (The following assumes I’m on the 10.8.33.0 subnet, and I’m allowing all hosts on that subnet to send jobs)
1
sudo distccd --log-file=/tmp/distccd.log --daemon -a 10.8.33.0/24
Setting up distcc (client) So, now you have to tell ccache to use the distcc distributed compilation servers. To do this, just add the following line to your ~/.bashrc file.
1
export CCACHE_PREFIX=distcc
Next, we have to tell distcc where to go to find the server. This also, just add to the bottom of your ~/.bashrc (my desktop is at 10.8.33.182 and it has 8 cores, my laptop is at localhost and has 4)
1
export DISTCC_HOSTS='localhost/4 10.8.33.182/8'
在另一个终端,使用下面命令检验ccache的运行效果
1
watch -n1 'ccache -s -v'
或者watch -n1 'ccache --show-stats -v'
编译时,使用top看 distcc process starts spooling up its threads.
/* * @tparam T point type * @param first Given the starting point of a line segment * @param last The endpoint of a given line segment * @param third Given point * @return T Distance from point to line */ template <typename T> static T PointToLineDistance(const Point<T>& first, const Point<T>& last, const Point<T>& third){ float dis_suqare = ((first.y - last.y) * third.x + (last.x - first.x) * third.y + (first.x * last.y - last.x * first.y)) * ((first.y - last.y) * third.x + (last.x - first.x) * third.y + (first.x * last.y - last.x * first.y)) / ((last.x - first.x) * (last.x - first.x) + (last.y - first.y) * (last.y - first.y)); return std::sqrt(dis_suqare); }
在Gazebo中进行小车仿真的过程中会出现如下警告 The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF 该警告的意思是根关节的base_link在urdf中具有惯性参数,但是KDL不支持,建议的解决办法是,增加一个额外的dummy link。
[spawn_entity.py-5] [ERROR] [1715655287.539237215] [spawn_entity]: Service %s/spawn_entity unavailable. Was Gazebo started with GazeboRosFactory? [spawn_entity.py-5] [ERROR] [1715655287.540067060] [spawn_entity]: Spawn service failed. Exiting.
1
[ERROR] [gzserver-1]: process has died [pid 239512, exit code 255, cmd 'gzserver -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so'].
Auto-merging readme.txt CONFLICT (content): Merge conflict in readme.txt Automatic merge failed; fix conflicts and then commit the result.
git status 也可以告诉我们冲突的文件. 在冲突的文件里,Git用<<<<<<<,=======,>>>>>>>标记出不同分支的内容,只能自己手动修改,然后再提交。解决冲突的过程一直是在master分支。 用带参数的git log也可以看到分支的合并情况
将user分支合并到master分支
1 2 3 4 5 6 7 8 9
# 当前是user分支 git add test.yaml git commit -m ":wrench:" git push origin user # 切换到 master 分支 git checkout master git merge user git push origin master git checkout user
删除本地分支
git branch -d user
1 2 3 4 5 6
user@user:~/dev_ws/$ git branch -d user error: The branch 'user' is not fully merged. If you are sure you want to delete it, run 'git branch -D user'.
user@user:~/dev_ws/$ git branch -D user Deleted branch user (was cf64937b)
删除远程分支, 千万小心使用 !
1
git push origin --delete remoteBranchName
难题 1
1 2 3 4 5 6 7
# 执行 git status 的结果 On branch master Your branch and 'origin/master' have diverged, and have 5 and 21 different commits each, respectively. (use "git pull" to merge the remote branch into yours)
Tree BehaviorTreeFactory::createTreeFromFile(const std::string& file_path, Blackboard::Ptr blackboard) { if(!parser_->registeredBehaviorTrees().empty()) { std::cout << "WARNING: You executed BehaviorTreeFactory::createTreeFromFile " "after registerBehaviorTreeFrom[File/Text].\n" "This is NOTm probably, what you want to do.\n" "You should probably use BehaviorTreeFactory::createTree, instead" << std::endl; } XMLParser parser(*this); parser.loadFromFile(file_path); auto tree = parser.instantiateTree(blackboard); tree.manifests = this->manifests(); return tree; }