Questions tagged [python]

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

Filter by
Sorted by
Tagged with
8
votes
2answers
577 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 ...
6
votes
1answer
2k 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 (...
6
votes
1answer
271 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
2answers
620 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
10k 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
731 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 ...
4
votes
2answers
543 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
10k 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 ...
4
votes
2answers
62 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 - ...
4
votes
1answer
130 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....
3
votes
2answers
556 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
341 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
549 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
0answers
291 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 ...
2
votes
1answer
3k 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 ...
2
votes
2answers
237 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
4k 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 ...
2
votes
1answer
291 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
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
996 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
14 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
2answers
71 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/...
2
votes
1answer
362 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 ...
2
votes
1answer
257 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 ...
1
vote
1answer
73 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
720 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
815 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
2answers
67 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....
1
vote
1answer
707 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 ...
1
vote
1answer
85 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
55 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
90 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 (...
1
vote
1answer
498 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
0answers
26 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
0answers
17 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
20 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
1answer
128 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-...
1
vote
0answers
19 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
1answer
138 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 ...
1
vote
0answers
58 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
43 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: ...
1
vote
0answers
805 views

python code for closed form inverse kinematics solution

I solved the inverse kinematics of a 4DOF robotic arm (which is not planar) and I wrote this code bellow in python. The coordinates for each joint is: I considered the first three joints as a wrist ...
1
vote
1answer
876 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)...
1
vote
0answers
594 views

How can I send commands from raspberry pi model 3B to Seriously Pro 3 Flight controller? [duplicate]

I am trying to make a quadcopter that receives commands from my android mobile phone. I currently have the following: Raspberry Pi 3 Model B running on Raspbian. Pi Camera Seriously Pro F3 Flight ...
1
vote
0answers
86 views

Drone Feedback: Object Detection / Color Detection [closed]

I have been working on a code where an A.R Drone 2.0 will detect color and put a red dot in the middle of the image. I am using streaming for the drone. The goal is for the drone to detect a white ...
1
vote
0answers
232 views

Continual error attempting to use MicroPython with HC-SR04 sensor on Bit:Bot

On my Bit:Bot from 4Tronix ([see here])1 I have an HC-SR04 ultrasound sensor attached. It uses solely pin15, for both trig and echo. I am able to use Microsoft MakeCode 'block editor' to get a ...
1
vote
1answer
483 views

Is pyserial real time

I am using arduino with FreeRTOS and a computer with patched xenomai linux. I am using python library called pyserial to communicate with arduino. Right now I am using simple servo motors. I want to ...