1 运行roscore
$ roscore
2 运行rosbridge_websocket
如未按照rosbridge,要先进行安装,安装方式为:
$ sudo apt-get install ros-kinetic-rosbridge-server
若已安装则直接运行:
$ roslaunch rosbridge_server rosbridge_websocket.launch
3 安装并启动rocos-agent
依次运行如下程序:
$ echo "deb https://packages.rocos.cloud/apt stable main" | sudo tee -a /etc/apt/sources.list.d/rocos.list
$ curl https://packages.rocos.cloud/apt/docs/key.gpg | sudo apt-key add -
$ sudo apt-get update && sudo apt-get install rocos-agent -y
按照过程中如果按照缓慢,可以切换ros源为国内清华大学或163源来确保网络和源可用且速度快,安装完成后,运行如下程序启动:
$ sudo rocos-agent
运行完成后会出现交互界面,需要先输入密钥,这个是和您账户绑定的.直接打开那个随机链接,然后登录后就会出现一个密钥,复制然后粘贴到这个终端即可.
sudo: unable to resolve host destop
Rocos Agent v0.0.10-5863-cn
Starting setup.
Click on the URL below, or copy and paste it into a browser to authenticate yourself.
Once you have a code come back and enter it below
https://portal-cn.rocos.cloud/agent-login?code_challenge=1M-hQmcUEZtMujt07dxmP6o9pbXIN8waEbgOVjrqQKs
> Code: 5dc22f1d2209b0001873303d
接着,终端会继续运行,让您选择项目project
sudo: unable to resolve host destop
Rocos Agent v0.0.10-5863-cn
Starting setup.
Click on the URL below, or copy and paste it into a browser to authenticate yourself.
Once you have a code come back and enter it below
https://portal-cn.rocos.cloud/agent-login?code_challenge=1M-hQmcUEZtMujt07dxmP6o9pbXIN8waEbgOVjrqQKs
> Code: 5dc22f1d2209b0001873303d
This robot needs to belong to a project. To start with, choose which account your target project belongs to.
[1] IFLYTEK_SZ (iflytek-sz)
[2] Rocos (rocos-481445)
> Enter the number of the account: 1
Do you want to:
[1] Add this as a new robot
[2] Link this robot to an existing robot in this project
> You choose: 2
[1] ifly-car - Ifly Car
[2] ifly-arm - ifly Arm
Enter the number of the robot:
> You choose: 2
Linking this robot to existing callsign xarm
The Rocos Agent has been configured successfully.
It is now running as a service, and will restart on reboot.
You can view this robot's details at https://portal-cn.rocos.cloud/project/1024/robots/xarm/dashboard
jetbot@destop:~$
至此agent已启动.
4)在机器人端或本地端运行ros节点
在本地运行你想要的ros节点即可.
5)打开rocos网站查看
打开rocos网站,可以看到你的机器人,然后通过设置button,command等可以监控机器人