[ROS Q&A]  105 – How to pass arguments to a ROS node

[ROS Q&A] 105 – How to pass arguments to a ROS node

In this video we are showing how to provide arguments to a ROS node program made in Python.
Sometimes, when you want to launch a ROS program made in Python, you need to provide some arguments to the program, so it can adapt to your specific requirement of the moment.

In this video, we show how to make an Aibo robot move based on the movement file we provide at launch time to the ROS node.

Please, bear in mind the difference between arguments (what we are teaching in this video) and parameters (that is something completely different handled by the ROS param server) .

[ROS Q&A] 104 – How to add a rotating join to Kinect in Turtlebot

[ROS Q&A] 104 – How to add a rotating join to Kinect in Turtlebot

We solve today a question from ROS answers that asks about how to add a rotating joint to the Turtlebot Kinect sensor: https://answers.ros.org/question/280715/include-a-rotation-axis-to-turtlebot/

Q: How to Include a rotation Axis to Turtlebot Kinect?

A: Basically, what you need is to change the type of joint that ties the Kinect to the Turtlebot structure from fixed to continuous . Then you need to add the controller for the joint. The video shows how to do it

// RELATED LINKS
* A simple example of how to create a movable joint in Gazebo: https://youtu.be/3qCh-p-hzCM

* The Turtlebot simulation used on the video (for Indigo-Gazebo 7): https://bitbucket.org/theconstructcore/turtlebot

[RDS] 004 – ROS Development Studio #Howto use git in RDS

[RDS] 004 – ROS Development Studio #Howto use git in RDS

In this video we show how to use git in RDS.

We do that by showing how to use git to clone a Gazebo Simulation of the Parrot Ardrone on the ~/simulation_ws (Simulation Workspace) and also we use git to clone a training package to the ~/catkin_ws (Catkin Workspace). This last package is used to train the robot.

Important thins about the video:

1. We use RDS (ROS Development Studio) available at: http://rds.theconstructsim.com/
2. The drone_training package used is available at: https://bitbucket.org/theconstructcore/drone_training.git
3. The Parrot Ardrone simulation is available at: https://bitbucket.org/theconstructcore/parrot_ardrone
4. If you want more details about the drone_training package you can go to https://www.theconstruct.ai/using-openai-ros/
5. The simulation was cloned to ~/simulation_ws/src
6. The training package was cloned to ~/catkin_ws/src
7. To start the training we used: roslaunch drone_training main.launch

If you prefer to use your own computer, you just have to install:

1. ROS (http://wiki.ros.org/ROS/Installation)
2. OpenAI (https://gym.openai.com/docs/)
3. Have a Gazebo simulation (https://bitbucket.org/account/user/theconstructcore/projects/PS)

[RDS] 003 – ROS Development Studio Howto #3 move a robot with a python script

[RDS] 003 – ROS Development Studio Howto #3 move a robot with a python script

 

In this video, the third of a series, we are going to show how to move a robot with a python script by using the ROS Development Studio environment (http://rds.theconstructsim.com)

This video shows:
1- How to create a new ROS project and how to open it for development
2- How to launch a simulation to test your program, with any of the robots already integrated in the system
3- How to move a robot by command line
4- How to create the python script that moves/rotates the robot.

You can access the ROS Development Studio here: http://rds.theconstructsim.com

The code used during the video was the following:

#! /usr/bin/env python

import rospy
from geometry_msgs.msg import Twist
from time import sleep

rospy.init_node(‘rotate’)

publisher = rospy.Publisher(‘/cmd_vel’, Twist, queue_size=1)

rotate_right = True

while not rospy.is_shutdown():
msg = Twist()
msg.angular.z = 0.1 if rotate_right else -0.1

publisher.publish(msg)
rospy.loginfo(‘Msg published.’)
rotate_right = not rotate_right
sleep(10)

Pin It on Pinterest