[Morpheus Chair] Vector ROS Simulation | T2.Ep.3

vector and ball

Written by Miguel Angel

11/04/2019

.

What will you learn in this post

  • Learn how to launch the Vector simulation and how to launch a Red Ball tracking node using ROS and the
    package created by BetaB0t Vector_ROS

List of resources used in this post

More resources (for real robot)

 

Launching COZMO and VECTOR simulations

If you click in the ROSject provided above (http://www.rosject.io/l/908ce19/), you will get a copy of it on ROSDS (ROS Development Studio)

To launch it, you first need to open the ROSject clicking on the Open button.

Open Cozmo and Vector robots in ROSDS

Open Cozmo and Vector robots in ROSDS

Once the ROSject open, you just launch the simulation by clicking  Simulations–>Select Launch File, then you select  cozmo_gazebo main_cozmo.launch

Launch cozmo_gazebo main_vector.launch in ROSDS

Launch cozmo_gazebo main_vector.launch in ROSDS

If everything went ok, now you should have the simulation up and running:

cozmo vector running in ROSDS

cozmo vector running in ROSDS

You can launch cozmo and vector just by choosing between the main_vector.launch and main_cozmo.launch

You can access the camera, the forklift, the wheels (through the /cmd_vel ROS Topic), imu and the Infra-Red sensors form their corresponding topics. All the topics have the exact same name in the two different robots, except that you have to change the word vector for cozmo.

Launching the Simple Red Ball tracking

To do so you have to launch the simulation you want, in this case, we will launch the Vector simulation as described in the previous section.

Launch cozmo_gazebo main_vector.launch in ROSDS

Then open a Webshell from the Tools Bar (Tools -> Shell), and execute the following commands:

roslaunch vector_ros simple_ball_tracker.launch is_simulation:=true

You should then Open the Graphical Tools from the Tools menu to see the RedBall detection Gui:

Launching Graphical Tools in ROSDS

Launching Graphical Tools in ROSDS

You should then be able to see the robot camera:

redball seen by cozmo and vector in ROSDS

redball seen by cozmo and vector in ROSDS

If you now move the ball around with the move object icon of the 3D view, you can see how Vector follows the ball. You can also move the ball with the keyboard, which will send absolute position commands to the ball. You first need to run the launch file below:

roslaunch cozmo_gazebo move_redball.launch

Then use the Keys below:

i“=+X Axis,

k“=STOP,

j“=-Y Axis,

l“=+Y Axis,

,“=-X Axis:

 

Moving the robot around

With the ball tracking enabled, you can move the robot around using the command below in the web shell:

rosrun teleop_twist_keyboard teleop_twist_keyboard.py
Reccomended values:
    turn = 5.55991731349
    speed = 0.1937102445

Seeing the camera

In order to see the camera in the Graphical Tools, you can run rqt_image_view through the webshell using the command below:

rosrun rqt_image_view rqt_image_view

Now open the Graphical Interface as explained earlier by clicking Tools -> Graphical Tools.

Moving FORK and Head

Before publishing the positions of the fork, it is worth mentioning that the fork range is [0.0,-0.8]

Now, let’s go ahead and move it with the command below:

rostopic pub /vector/lift_height/command std_msgs/Floa4 "data: -0.8"

Now, to move the head we use the commands below. Also, important to note that the range of the head is [0.1,-0.57]

Let’s then move the head:

rostopic pub /vector/head_angle/command std_msgs/Float64 "data: -0.57"

 

Where is the IMU

To see the IMU of the robot, you can see the /imu topic using the command below:
rostopic echo /imu

Current known issues

We noticed that there is a drift that occurs when Vector or Cozmo is still.

SPECIAL THANKS:

Our special thanks to beat_b0t for creating the Vector_ROS package.

Also, thanks to TheConstructSim For creating the COZMO and Vector simulation package. and thanks to ANKI for creating COZMO and VECTOR real robots that we can use to play around and learn more about robotics.

Youtube Video

We hope you like the post. If you prefer, we also have a live version of this post in YouTube. You can find it in the link below. If you like it, please consider subscribing to our channel on youTube. We are constantly adding new ROS-related content.

 

———————————————————————————
Music:
Original Track:https://youtu.be/FBv6rm1lY0w
Thanks to NewRetroWave for letting us use their music.
Here more info:

New Retro Wave + Bachelor of Hearts Aurora Borealis

Smooth vibes for you retro soul. Listen and enjoy.
OUT NOW on NRW Records:
https://newretrowave.bandcamp.com/album/a-cosmic-funk-odyssey-ep
iTunes: http://apple.co/2r6N1T7

Support:

https://www.facebook.com/BachelorOfHeartsmusic/

Artwork provided by Murryous, who is our featured artist for May. Please support him:
https://www.instagram.com/murryous/

———————————————————————————

3D Models:
Orange Robot:
https://www.blendswap.com/blends/view/77718

Sphere Robot:
https://www.blendswap.com/blends/view/80818

Robot Parts:
https://www.blendswap.com/blends/view/78357

Mars Lander:
https://www.blendswap.com/blends/view/81264

#Vector #COZMO #ANKI #ROS

Topics: ROS Q&A
Masterclass 2023 batch2 blog banner

Check Out These Related Posts

0 Comments

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest

Share This