# RTIOMS Mobile Robotics Group
## HackMd tutorial
- https://hackmd.io/c/tutorials/%2Fs%2Ftutorials (English version)
- https://hackmd.io/s/quick-start-tw
---
## TECO AGV TODO list
- Use catkin build tool
- 測試AGV和外部PC連線 -OK
- AP client設定寫成word紀錄 -OK
- - src裡面加 teloep和joy_stick
---
## PS4 joystick
https://github.com/solbach/ps4-ros
https://github.com/engcang/PS4_Joystick_teleop_Mobile_Robots_ROS_Python
http://willshw.me/2018/12/24/connect-ps4-joystick.html
---
## SIMPLIFY INSTRICTION ON TECO AGV
sb='source ~/.bashrc'
gb='gedit ~/.bashrc'
cdntut='cd /opt/ros/ntut_ws'
sd='source devel/setup.bash'
---
## PC Network Connection Example
**Two PC need to connect same WIFI.**
```
#in AGV .bashrc
#If AGV IP : 192.168.0.21
export ROS_IP=192.168.0.21
export ROS_MASTER_URI=http://$ROS_IP:11311
export ROS_HOSTNAME=192.168.0.21
```
```
#in laptop .bashrc
#IF Laptop IP : 192.168.0.4
export ROS_IP=192.168.0.4
export ROS_MASTER_URI=http://192.168.0.21:11311
export ROS_HOSTNAME=192.168.0.4
```
**roscore** on **AGV** than complete.
---
## Camera Install
### mynteye depth camera
https://blog.rneko.com/posts/1689450762.html
## Motor driver
rs485 in inux testing
https://www.twblogs.net/a/5b9ede162b71773ebaceac72
## launch file tips
1.Select specific rviz file
```htmlmixed=
<group if="$(arg open_rviz)">
<node pkg="rviz" type="rviz" name="rviz" required="true"
args="-d $(find turtlebot3_navigation)/rviz/turtlebot3_navigation.rviz"/>
</group>
```
## Online course
### Vlisual SLAM
1.高翔VLAM14講課程
https://www.bilibili.com/video/av54502823/
2.VSLAM中文相關課程
https://v.youku.com/v_show/id_XNDIyMTU3NjY3Mg==.html
3.视觉SLAM开源代码论文带读(ORB_SLAM2 )
https://www.bilibili.com/video/av88680423
## ROS foundation study resource
### - Overview
- https://sychaichangkun.gitbooks.io/ros-tutorial-icourse163/content/
### - launch file
- https://zhuanlan.zhihu.com/p/47919563 (古月教學)
- https://blog.csdn.net/lewif/article/details/75736286 (launch文件中的tag完整說明)
- https://blog.csdn.net/EliminatedAcmer/article/details/80639546 (how to read launch parameter sample code)
### - catkin compiler system
#### CMakelist
- https://blog.csdn.net/TurboIan/article/details/74604052
- https://blog.csdn.net/xuehuafeiwu123/article/details/53929834
- https://www.cnblogs.com/coderfenghc/archive/2012/07/15/2592758.html
#### catkin build tool
- https://blog.csdn.net/xiaoma_bk/article/details/81017044
-
#### ROS1 with Python3
- https://www.twblogs.net/a/5c9267e5bd9eee35cd6b9cbe
- https://www.jianshu.com/p/4e437e25480b
- https://medium.com/@beta_b0t/how-to-setup-ros-with-python-3-44a69ca36674
### - TF
- http://stevenshi.me/2017/06/07/ros-primary-tutorial-13/
- https://blog.csdn.net/Start_From_Scratch/article/details/50762293
### - action
- http://www.guyuehome.com/908 (古月教學)
## Realsense series camera install
- https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md
- https://github.com/IntelRealSense/librealsense
- https://github.com/IntelRealSense/librealsense/issues/3354
- https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md
- https://github.com/IntelRealSense/realsense-ros
## Turtlebot3 openCR install
- http://emanual.robotis.com/docs/en/parts/controller/opencr10/#install-on-linux
- https://www.arduino.cc/en/Main/Software?setlang=cn
- http://emanual.robotis.com/docs/en/platform/turtlebot3/opencr_setup/#opencr-firmware-upload-for-tb3
## ros using class member function be a callback
https://wiki.ros.org/roscpp_tutorials/Tutorials/UsingClassMethodsAsCallbacks
## Gazobo
When we use the simulatiom Gazebo for publis a new ekf TF,we need to stop publish /gazebo tf, follow the this web
https://answers.ros.org/question/229722/how-to-stop-gazebo-publishing-tf/
---
```cpp=
void Node::PublishCameratoBaselink2()
{
geometry_msgs::PoseStamped map_pose_msg;
geometry_msgs::PoseStamped visual_footprint_pose_msg;
geometry_msgs::PoseStamped CameraInBaselink;
map_pose_msg.header.frame_id = "map";
map_pose_msg.pose.position.x = 0;
map_pose_msg.pose.position.y = 0;
map_pose_msg.pose.position.z = 0;
map_pose_msg.pose.orientation.w = 1;
map_pose_msg.pose.orientation.x = 0;
map_pose_msg.pose.orientation.y = 0;
map_pose_msg.pose.orientation.z = 0;
visual_footprint_pose_msg.header.frame_id = "visual_footprint";
visual_footprint_pose_msg.pose.position.x = 0;
visual_footprint_pose_msg.pose.position.y = 0;
visual_footprint_pose_msg.pose.position.z = 0;
visual_footprint_pose_msg.pose.orientation.w = 1;
visual_footprint_pose_msg.pose.orientation.x = 0;
visual_footprint_pose_msg.pose.orientation.y = 0;
visual_footprint_pose_msg.pose.orientation.z = 0;
ROS_INFO("Publish Camera to Baselink");
try
{
ROS_INFO("Enter transform");
//ros::Duration(5.0).sleep();
listener.waitForTransform(map_pose_msg.header.frame_id, visual_footprint_pose_msg.header.frame_id, ros::Time(0), ros::Duration(1.0) );
listener.transformPose(map_pose_msg.header.frame_id, visual_footprint_pose_msg, CameraInBaselink);
ROS_INFO("map_msg: (%.2f, %.2f. %.2f) -----> CameraInBaselink: (%.2f, %.2f, %.2f) at time %.2f",
map_pose_msg.pose.position.x, map_pose_msg.pose.position.y, map_pose_msg.pose.position.z,
CameraInBaselink.pose.position.x, CameraInBaselink.pose.position.y, CameraInBaselink.pose.position.z, CameraInBaselink.header.stamp.toSec());
}
catch(tf::TransformException& ex)
{
ROS_ERROR("Received an exception trying to transform a point from \"camera_pose_msg\" to \"CameraInBaselink\": %s", ex.what());
}
geometry_msgs::PoseWithCovarianceStamped fusion_pose;
fusion_pose.pose.pose.position.x = CameraInBaselink.pose.position.x;
fusion_pose.pose.pose.position.y = CameraInBaselink.pose.position.y;
fusion_pose.pose.pose.position.z = CameraInBaselink.pose.position.z;
fusion_pose.pose.pose.orientation.w = CameraInBaselink.pose.orientation.w;
fusion_pose.pose.pose.orientation.x = CameraInBaselink.pose.orientation.x;
fusion_pose.pose.pose.orientation.y = CameraInBaselink.pose.orientation.y;
fusion_pose.pose.pose.orientation.z = CameraInBaselink.pose.orientation.z;
fusion_pose_publisher_.publish(fusion_pose);
}
```