ROS source code that for visual servo controller and localization
System: Ubuntu 16.04 LTS
ROS Version: Kinetic
Hardware: NVIDIA Jeston TX2
- modules
- 0_driver
- 1_perception_cv
- 2_perception_others
- 3_estimator
- 4_planning
- 5_decision
- 6_control
- tools
Most used
- 0_driver: CAN driver; dynamic reconfigure; rqt_multiplot.
- 1_perception_cv: RMComputerVision, the visual frontend.
- 3_estimator: wheel_odom, wheel_driver.
- 6_control: the visual servo control backend, handling control and target velocity estimation.
If you compile the source code for the first time, start with the minimum code necessary: The CAN driver, the 1_perception_cv, and 6_control.
-
install Robotics Operating System Kinetic in your Ubuntu computer http://wiki.ros.org/ROS/Installation
-
cd ~ && mkdir ws && cd ws
-
git clone --recursive [email protected]:robomasterhkust/ros_environment.git src
-
git submodule update
-
sudo cp 1_perception_cv/RMComputerVision/lib/libMVSDK.so /usr/lib
-
cd ~/ws && catkin_make
- install the following dependency for fast development
sudo apt-get install openocd minicom -y
sudo apt-get install terminator cmake vim htop libmuparser-dev ntp* -y
install these dependency for the visualization tool rqt_multiplot
sudo apt-get install ros-kinetic-rqt libqwt-dev libqwt-qt5-dev ros-kinetic-rqt-multiplot -y
- set up the .bashrc for speed up the development process
vim ~/.bashrc
and add the following:
alias cmk='cd ~/ws && catkin_make -j4 -l4 && source devel/setup.bash && cd -'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -cF'
source ~/ws/devel/setup.bash
and source ~/.bashrc
after saving the vim file.
- install Computer vision related dependences
openCV, Eigen
Reference I: RMOC open sourced repository https://github.com/robomasterhkust/RoboRTS
Reference II: My TA GAO Wenliang's repository for visual inertial localization
https://github.com/gaowenliang
- World frame. At t = 0, x axis points to the starting direction of gimbal gunner, origin is at the starting rotation center of gimbal.
- Chassis frame. Any time instant, x axis points to current direction of soldier heading, origin is at the current camera position on the chassis.
- Transition frame. At any time instant, x axis points to current direction of soldier heading, origin is at the current rotation center of gimbal.
- Gimbal frame. At any time instant, x axis points to current direction of gimbal gunner, origin is at the current rotation center of gimbal.
- flycapture has one extra step to configure, see https://www.ptgrey.com/tan/10699
- for rqt_multiplot,
sudo apt install libqwt-qt5-dev libqwt5-qt4 -y
, and in the running sequence, userosrun rqt_multiplot rqt_multiplot --force-discover
-- rmsoldierX uses ip 192.168.1.22X in ASUS wifi network. All usernames are victory. -- copy the file tools/lsusb.sh to /etc
- Never add CMakeList.txt to git repo.
- Never add CMakeList.txt to git ignore.
- There will be reminder that CMakeList.txt is not tracked in git. Just leave it there. Every computer has different src CMakeList.txt which linked to the place where ros is installed.
Two ros machines, one Intel Nuc, one TX2.
Follow the guide line here: https://askubuntu.com/questions/22835/how-to-network-two-ubuntu-computers-using-ethernet-without-a-router.
Set the ip address of nuc to be 10.0.0.2
, tx2 to be 10.0.0.1
. Nuc is the ros master.
export ROS_MASTER_URI=http://10.0.0.2:11311
on both computers.
To debug using another ROS machine, using multimachine by modifying the /etc/hosts
and setting three environment variables in the ~/.bashrc
On both machines, add the ip address of the itself and the slave in the /etc/hosts
, for instance, like this:
127.0.0.1 localhost
127.0.1.1 desktop
10.0.0.2 rmsoldier#
10.0.0.1 tegra-ubuntu
Then launch roscore in the master machine, and all nodes don't need to launch roscore and can receive topics from each others.