Difference between revisions of "Category:HamsterProKit/RosExample"

From cogniteam
Jump to: navigation, search
Line 36: Line 36:
 
'''''/agent<your_agent_number>/openvino_toolkit/images''''' - topic to see detection
 
'''''/agent<your_agent_number>/openvino_toolkit/images''''' - topic to see detection
  
To control robot drive/steering use '''/agent*/ackermann_cmd''' topic.
+
To control robot drive/steering use '''/agent1/ackermann_cmd''' topic.
  
 
Optionally you can publish through rqt standard ROS program:  
 
Optionally you can publish through rqt standard ROS program:  
Line 42: Line 42:
 
Open new terminal, make source to ros1:  
 
Open new terminal, make source to ros1:  
  
<code>ros_prokit<code>
+
<code>ros_prokit</code>
  
 
Run rqt:
 
Run rqt:
Line 48: Line 48:
 
<code>rqt</code>
 
<code>rqt</code>
  
In the top menu open tabs plugins->topics-message publisher
+
In the top menu open tabs choose plugins->topics-message publisher
  
Set the topic name and press "+" like shows on the screen below
+
Set the topic name to /agent1/ackermann_cmd and press on the right green "+" like shows on the screen below - this will add topic to UI
  
 
[[File:rqt.png|400px]]
 
[[File:rqt.png|400px]]

Revision as of 10:58, 7 May 2020

ROS1 examples

1. For launch SLAM example:

roslaunch hamster_launch prokit_slam_2d.launch

To visualize output run rviz and output topics:

/map - 2D map

/agent<your_agent_number>/scan - 2D scan

/agent<your_agent_number>/camera/depth/color/points - point cloud

Example image below

Slam2D rviz.png

2. For launch wandering example:

roslaunch hamster_launch prokit_wandering.launch

Wandering with obstacle avoidance will start automatically.

3. For launch detection example:

roslaunch hamster_launch prokit_detection.launch

To see picture with detection use standard ros plugin: rqt_image_view

NOTE: In case no input from camera - reconnect USB realsense D435i


/agent<your_agent_number>/openvino_toolkit/images - topic to see detection

To control robot drive/steering use /agent1/ackermann_cmd topic.

Optionally you can publish through rqt standard ROS program:

Open new terminal, make source to ros1:

ros_prokit

Run rqt:

rqt

In the top menu open tabs choose plugins->topics-message publisher

Set the topic name to /agent1/ackermann_cmd and press on the right green "+" like shows on the screen below - this will add topic to UI

Rqt.png

More detailed about ROS rqt:

ROS_rqt

This category currently contains no pages or media.