Questions tagged [python]

Python is a widely used high-level, general-purpose, interpreted, dynamic programming language.

Filter by
Sorted by
Tagged with
9
votes
2answers
630 views

Red [ERROR] output in python in ROS

In ROS, I cannot get [ERROR] logs to print in red when I use python. How can I make them appear in red instead of black? For example, the following Python: ...
8
votes
1answer
1k views

How can I manipulate real-time sonar data from my Arducopter in Arduino?

I have a APM 3DR Quad with a 3DR radio telemetry kit. I would like to send real-time sonar data to my laptop (running Windows 7) in order to manipulate it in an additional Arduino Sketch. The ...
7
votes
1answer
3k views

Unwanted Arduino reconnect: Servo + Arduino + Python (Raspberry Pi)

I am having difficulty sustaining a connection between my Raspberry Pi (Model B running Raspbian) and my Arduino (Uno) while sending signals from the Raspberry Pi to a continuously rotating servo (...
7
votes
1answer
800 views

Numpy alternatives for linear algebra and kinematics in python?

Are there any decent python numerical package libraries besides numpy for python? Numpy relies on gfortan which itself must be compiled correctly for your platform to avoid hidden/insidious numerical ...
6
votes
1answer
278 views

Using Armatures in Morse Robotic Simulator

I'm trying to add my own robot in Morse 1.1 (using Ubuntu 12.04). I am struggling to add an armature actuator and armature pose sensor to an existing robot. Can someone please explain how this can be ...
5
votes
1answer
5k views

Creating MAVLink commands from python

I am struggling to find any clear documentation on how to create MAVlink commands using python. I am looking to create an autonomous glider and require some of the basic functions Retrieve GPS Data ...
5
votes
2answers
128 views

ROS Theoretical Question - How does work properly a node

I'm new at ROS and I'm trying to figure out how does the node works with a pyton/C++ code. I have two codes for the same situation: Use a Xbox Controller to move the turtle in turtlesim FIRST - ...
5
votes
2answers
777 views

A Vector Field Histogram implementation in Python 2.7

I am trying to implement the Vector Field Histogram as described by Borenstein, Koren, 1991 in Python 2.7 using the SciPy stack. I have already been able to calculate the polar histogram, as ...
5
votes
1answer
11k views

Send Arduino sensor data to server with GPRS shield

I'm trying to send Arduino sensor data to a server using a GPRS shield (SIM900 shield from Geeetech). I have this particular set up because the data will be updated to a website and the device will be ...
5
votes
1answer
301 views

Wait simulation time in a non realtime ROS simulation in Python

I want to control a quadrotor with a Python script and run the simulation as fast as my laptop can, not only in real time. I've modified my world and now the simulation runs with 7-10 real time factor....
4
votes
2answers
583 views

Check collision between robot and environment in OpenRAVE

I have a robot arm in an environment. How can I check for collision between this robot arm and the environment?
4
votes
1answer
12k views

How to get a python node in ROS subscribe to multiple topics?

How a ROS node written in Python could subscribe to multiple topics and publish to multiple topics? All examples I found were for a single topic. Is this an event-driven model so subscription to ...
3
votes
1answer
5k views

Determine the relative camera pose given two RGB camera frames in openCV-python

I would like to determine the relative camera pose given two RGB camera frames. I assume there's overlap in field of view between the two cameras, what I am looking for ultimately is the rotation and ...
3
votes
2answers
632 views

Adafruit PCA9685 servo driver connected to Beaglebone Green Wireless generating erratic movement when driving multiple servos

I have a hexapod that a friend and I built this summer, but there is a big problem whenever we try to move multiple servos. When using the Adafruit_Python_PCA9685 library, I am able to move the servos ...
3
votes
1answer
378 views

ROS Installation Error : ARCH LINUX

So I had this old lappy on which I used to play with ROS a lot then it got broken so I bought a new one and installed the same distro as that of old one i.e. arch linux. Now when I am installing the ...
3
votes
1answer
636 views

Choice of a motor for robotic arm

This is my first post here, so hello all. I really hope I can learn a lot from you guys. I am trying to build a robotic arm to carry an object and put it inside of different boxes that are placed in ...
3
votes
2answers
106 views

iRobot Create 2 Wake over Serial on Rpi

So this thread is similiar to this one: IRobot Create 2: Powering Up after Sleep All except I am trying to do this on an RPi. I have followed these intstruction: https://www.irobotweb.com/-/media/...
3
votes
0answers
414 views

Obstacle avoiding by Pi camera [closed]

I designed a mobile robot with my colleagues for our graduation project, the purpose of it is to detect mines (metals) in a specific area We are programming the robot using Python on Raspberry Pi 3 ...
3
votes
1answer
418 views

Are both of C++ and Python necessary in ROS

I'm a newbie on ROS and I'm trying to figure out how ROS works so I'm installing ROS from source. I've found that most of ROS packages contains two kinds of codes: C++ and Python. For example, here ...
2
votes
2answers
307 views

Localization within a map with gyro, accelerometer and magnetometer

My goal is to locate precision within a known map. If the size of the map is known, a rectangle 4 x 3 m, and I know the initial position and orientation of the robot, after a certain period of time ...
2
votes
1answer
310 views

where can I get openinterface.py?

I am trying to program the create2 irobot using python. there is a script called openinterface.py. where can I download this script?
2
votes
2answers
95 views

Microcontrollers and Python

So I am fairly new to robotics however I do have some background with the python coding language. Recently I set myself the task of learning some basics for robotics just to increase my knowledge base....
2
votes
1answer
2k views

Is rospython subscriber thread safe?

I'm trying to write a python node, which has one class and two member functions as callback functions. so a TimeSynchronizer and Subscriber in a node. I saw in this link and tested that python ...
2
votes
1answer
145 views

How can I access the cliff sensors on an iRobot Create 2 via ROS/ Python?

I have an iRobot Create 2 and am currently using the create_autonomy package. Currently, they have cliff sensors as a "planned" feature. I see in the documentation that there are 4 cliff sensors (...
2
votes
1answer
2k views

Converting Image Coordinates to (x, y) Position for Robotic Arm

I have a Robotic Arm with a camera mounted above it looking down at a slight angle. Assuming I know the height of the camera, the angle of tilt and the small distance from the center of the robot ...
2
votes
2answers
1k views

How to convert raw Pitot tube readings to air speed in m/s?

I'm building a kite flying robot, for which I want to measure air speed. So I combined a Pitot tube with an ADC and connected it to my Raspberry Pi using this tutorial. It seems to work perfect, in ...
2
votes
0answers
36 views

Applying initial guessing to LiDAR point cloud for ICP processing in Graph SLAM

I am currently in the process of implementing Graph SLAM using ICP and g2o in python 2.7 The data I have are pose data (4 x 4 transformation matrix) and lidar data ( in the format of [x y z 1] with ...
2
votes
1answer
81 views

Are Rospy subscriber callbacks executed sequentially for a single topic?

Suppose a ROS node receives new batch of data on a topic while the previous batch is still being processed by callback. Will ROS wait for its completion or will it spin a new thread and run both at ...
2
votes
1answer
47 views

Make robot drive as far from obstacles as possible

I am trying to make robot drive around the room, avoiding obstacles with pathfinding. The problem is I get few waypoints from pathfinding algorithm for robot to drive to (green dots), but it drive a ...
2
votes
0answers
22 views

How to implement stop sign xml cascade [closed]

After training my RC car I use the following command: python drive.py --model trainmodel.h5 This give me Ip where I can go and see if the testing was successful ...
2
votes
1answer
513 views

Python PID tuning - Parrot Bebop 2 - Target follower - ROS

I'm developing a PID controller for making the drone follow a detected object. I used as reference these topics: Ttracking-objects-from-camera-pid-controlling-parrot-ar-drone Tracking-objects-...
2
votes
1answer
558 views

ROS how to use published data in a python script (darknet_ros)

I'm writing a python script to run with darknet_ros and bebop_autonomy package in order to take the bounding boxes of the detected objects and depending on the position of the detected objects send ...
2
votes
1answer
2k views

MSP (Multiwii Serial Protocol) receiving data with pyMultiWii issue

I want to get telemetry data from my flight controller (Matek F405-CTR) and send control commands to it via MSP protocol. I've already configured UART3 port on Matek in Inav configurator (look at pic)...
2
votes
2answers
565 views

Transform timestamped messages recorded in a bag file using tf messages

Note: this question was also asked in the ROS official Q&A website, but even after one week nobody has given me an answer. I have a .bag which contains ...
1
vote
1answer
79 views

How to become proficient in software development for an aspiring roboticist? [closed]

I am a masters student specializing in Robotics. I have a bachelors degree in Mechanical engineering and hence a bit sloppy with programming languages. MATLAB is one thing I am proficient in. But ...
1
vote
2answers
759 views

Issue with multiple bytes from Irobot Create 2

I was having problems reading sensor information from my Irobot Create 2 and sent an email asking for help from the Irobot staff. They were super helpful and gave me an answer(the next day!!!) that ...
1
vote
1answer
910 views

EKF-SLAM Computing the jacobians for landmark updates

I've been working through this informative guide on EKF-SLAM but I'm having difficulty understanding the jacobians required for the 'landmark update', on page 35. What exactly is Jxr and Jz taking as ...
1
vote
1answer
1k views

How to retrieve parameters from mavlink .tlog using pymavlink?

I've been able to use pymavlink.mavutil to read telemetry from a .tlog created by MissionPlanner. To do this, I create a mavlogfile like this: ...
1
vote
1answer
139 views

Why won't my PID line follower work?

I'm trying to implement a PID based line follower. The robot has 2 line sensors with ranges from 0-200, with 0 being black and 200 being white. I'm trying to follow a black line. I'm struggling to ...
1
vote
1answer
57 views

Image data fusion

I have three cameras separated by some distance, looking at a scene. I have calibrated them using checkerboard and I have their respective intrinsic parameters and their pose and rotation matrix, I am ...
1
vote
1answer
572 views

EKF-SLAM, how best to manage the 'P' covariance matrix, programatically

I've recently been learning about SLAM and EKF-SLAM. I've began my implementation in python, but have had trouble managing the updating of P, especially when it comes to adding new landmarks. ...
1
vote
1answer
157 views

Python3 Modules for motor movement

Are there any Python3 modules used to program robotic movement by declaring a device or component and then providing the instructions? I am not looking for modules that test the components.
1
vote
1answer
27 views

How do I convert centre-returning joystick values to dual hobby-motor direction?

Currently my setup is: 2x hobby TT motors connected to a Pi Zero with a motor HAT Python script running on the Pi which runs a Blynk python client and controls motors via the gpiozero library Blynk ...
1
vote
1answer
100 views

How to synchronise data for fusion in Kalman from multiple sensors with different timestamp information?

I'm using Kalman filter to track the position of a vehicle and receive position data from 2 sensors: A GPS sensor and an Ultrasonic sensor for which I want to implement sensor fusion into the Kalman. ...
1
vote
0answers
37 views

Inverse Kinematics of Puma 566 giving low angle results with DH convention

I am new at the robotics area, and i need to deliver an activity until this week in my college based to solve the inverse kinematics problem from an article that doesn't have any code done, and after, ...
1
vote
1answer
161 views

ROS packages for *pre-planned* path navigation rather than path generation? (Turtlebot3/ROS)

I am working on a project in which users will create paths fully constrained in terms of position (using a separate piece of software), and a robot will periodically follow those paths. We are using a ...
1
vote
0answers
26 views

Pausing at positing in GRBL while holding motor current

I'm trying to get grbl to move the carriage of my 2D scanner to a specific position, pause there for a certain amount of time (until the sensor does its thing), and then proceed to the next position ...
1
vote
0answers
68 views

Mission Planner: How to create a custom Waypoint Command

I am trying to set up a waypoint in Mission Planner that causes the drone to hover, take sensor data from a custom sensor, then either land or continue hovering based off of what the sensor data says. ...
1
vote
0answers
82 views

help to find the bug for calculating inverse kinematic using jacobian

I am calculating inverse kinematic for 5dof robotic arm using Jacobian matrix (first time). i used following formulas to do my calculation and also implemented in my code. for more information please ...
1
vote
0answers
52 views

Writing IMU accelerometer data into as twist messages into cmd_vel

I am reading accelerometer data from the wiimote /wiimote/state topic. A sample of the data I'm working with is as follows: ...