Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ros_upstart: Nodes using third party libraries won't run [Python]

I'm using ROS on raspberry pi 3. I'm using two third party libraries, one for reading sensor registers from I2C (FaBo9AXIS-MPU9250-Python) and one for generating PWM signal on pins (pigpio). Any node importing one won't start by ros_upstart. What's wrong?
Here's one of the nodes:

import rospy
import FaBo9Axis_MPU9250
from sensor_msgs.msg import Imu


rospy.init_node('imu')

mpu9250 = FaBo9Axis_MPU9250.MPU9250()

pub = rospy.Publisher('imu/data_raw',Imu, queue_size = 1)
msg = Imu()
msg.orientation_covariance[0] = -1
msg.header.frame_id = 'imu'
rate = rospy.Rate(100)

while not rospy.is_shutdown():
    accel = mpu9250.readAccel()
    gyro = mpu9250.readGyro()

    msg.header.stamp = rospy.Time.now()

    msg.linear_acceleration.x = accel['x'] * 9.81
    msg.linear_acceleration.y = accel['y'] * 9.81
    msg.linear_acceleration.z = accel['z'] * 9.81

    msg.angular_velocity.x = (gyro['x'] - 0.9) * 0.01745329251
    msg.angular_velocity.y = (gyro['y'] - 0.5) * 0.01745329251
    msg.angular_velocity.z = gyro['z'] * 0.01745329251

    pub.publish(msg)
    rate.sleep()

ros_upstart: Nodes using third party libraries won't run [Python]

I'm using ROS on raspberry pi 3. I'm using two third party libraries, one for reading sensor registers from I2C (FaBo9AXIS-MPU9250-Python) and one for generating PWM signal on pins (pigpio). ).
Any node importing one won't start by ros_upstart. What's wrong?
Here's one of the nodes:

import rospy
import FaBo9Axis_MPU9250
from sensor_msgs.msg import Imu


rospy.init_node('imu')

mpu9250 = FaBo9Axis_MPU9250.MPU9250()

pub = rospy.Publisher('imu/data_raw',Imu, queue_size = 1)
msg = Imu()
msg.orientation_covariance[0] = -1
msg.header.frame_id = 'imu'
rate = rospy.Rate(100)

while not rospy.is_shutdown():
    accel = mpu9250.readAccel()
    gyro = mpu9250.readGyro()

    msg.header.stamp = rospy.Time.now()

    msg.linear_acceleration.x = accel['x'] * 9.81
    msg.linear_acceleration.y = accel['y'] * 9.81
    msg.linear_acceleration.z = accel['z'] * 9.81

    msg.angular_velocity.x = (gyro['x'] - 0.9) * 0.01745329251
    msg.angular_velocity.y = (gyro['y'] - 0.5) * 0.01745329251
    msg.angular_velocity.z = gyro['z'] * 0.01745329251

    pub.publish(msg)
    rate.sleep()

ros_upstart: Nodes using third party libraries won't run [Python]

I'm using ROS on raspberry pi 3. I'm using two third party libraries, one for reading sensor registers from I2C (FaBo9AXIS-MPU9250-Python) and one for generating PWM signal on pins (pigpio).
). Any node importing one won't start by ros_upstart. as if it doesn't exit in the launch file. What's wrong?
Here's one of the nodes:

import rospy
import FaBo9Axis_MPU9250
from sensor_msgs.msg import Imu


rospy.init_node('imu')

mpu9250 = FaBo9Axis_MPU9250.MPU9250()

pub = rospy.Publisher('imu/data_raw',Imu, queue_size = 1)
msg = Imu()
msg.orientation_covariance[0] = -1
msg.header.frame_id = 'imu'
rate = rospy.Rate(100)

while not rospy.is_shutdown():
    accel = mpu9250.readAccel()
    gyro = mpu9250.readGyro()

    msg.header.stamp = rospy.Time.now()

    msg.linear_acceleration.x = accel['x'] * 9.81
    msg.linear_acceleration.y = accel['y'] * 9.81
    msg.linear_acceleration.z = accel['z'] * 9.81

    msg.angular_velocity.x = (gyro['x'] - 0.9) * 0.01745329251
    msg.angular_velocity.y = (gyro['y'] - 0.5) * 0.01745329251
    msg.angular_velocity.z = gyro['z'] * 0.01745329251

    pub.publish(msg)
    rate.sleep()

ros_upstart: Nodes using third party libraries won't run [Python]

I'm using ROS on raspberry pi 3. I'm using two third party libraries, one for reading sensor registers from I2C (FaBo9AXIS-MPU9250-Python) and one for generating PWM signal on pins (pigpio). ).
Any node importing one won't start by ros_upstart as if it doesn't exit exist in the launch file. What's wrong?
Here's one of the nodes:

import rospy
import FaBo9Axis_MPU9250
from sensor_msgs.msg import Imu


rospy.init_node('imu')

mpu9250 = FaBo9Axis_MPU9250.MPU9250()

pub = rospy.Publisher('imu/data_raw',Imu, queue_size = 1)
msg = Imu()
msg.orientation_covariance[0] = -1
msg.header.frame_id = 'imu'
rate = rospy.Rate(100)

while not rospy.is_shutdown():
    accel = mpu9250.readAccel()
    gyro = mpu9250.readGyro()

    msg.header.stamp = rospy.Time.now()

    msg.linear_acceleration.x = accel['x'] * 9.81
    msg.linear_acceleration.y = accel['y'] * 9.81
    msg.linear_acceleration.z = accel['z'] * 9.81

    msg.angular_velocity.x = (gyro['x'] - 0.9) * 0.01745329251
    msg.angular_velocity.y = (gyro['y'] - 0.5) * 0.01745329251
    msg.angular_velocity.z = gyro['z'] * 0.01745329251

    pub.publish(msg)
    rate.sleep()

ros_upstart: Nodes using third party libraries won't run [Python]

I'm using ROS on raspberry pi 3. I'm using two third party libraries, one for reading sensor registers from I2C (FaBo9AXIS-MPU9250-Python) and one for generating PWM signal on pins (pigpio).
Any node importing one won't start by ros_upstart as if it doesn't exist in the launch file. What's wrong?
Here's one of the nodes:

import rospy
import FaBo9Axis_MPU9250
from sensor_msgs.msg import Imu


rospy.init_node('imu')

mpu9250 = FaBo9Axis_MPU9250.MPU9250()

pub = rospy.Publisher('imu/data_raw',Imu, queue_size = 1)
msg = Imu()
msg.orientation_covariance[0] = -1
msg.header.frame_id = 'imu'
rate = rospy.Rate(100)

while not rospy.is_shutdown():
    accel = mpu9250.readAccel()
    gyro = mpu9250.readGyro()

    msg.header.stamp = rospy.Time.now()

    msg.linear_acceleration.x = accel['x'] * 9.81
    msg.linear_acceleration.y = accel['y'] * 9.81
    msg.linear_acceleration.z = accel['z'] * 9.81

    msg.angular_velocity.x = (gyro['x'] - 0.9) * 0.01745329251
    msg.angular_velocity.y = (gyro['y'] - 0.5) * 0.01745329251
    msg.angular_velocity.z = gyro['z'] * 0.01745329251

    pub.publish(msg)
    rate.sleep()

ros_upstart: Nodes using third party libraries won't run are ignored [Python]

I'm using ROS on raspberry pi 3. I'm using two third party libraries, one for reading sensor registers from I2C (FaBo9AXIS-MPU9250-Python) and one for generating PWM signal on pins (pigpio).
Any node importing one won't start by ros_upstart as if it doesn't exist in the launch file. file (also no log file is generated). What's wrong?
Here's one of the nodes:

import rospy
import FaBo9Axis_MPU9250
from sensor_msgs.msg import Imu


rospy.init_node('imu')

mpu9250 = FaBo9Axis_MPU9250.MPU9250()

pub = rospy.Publisher('imu/data_raw',Imu, queue_size = 1)
msg = Imu()
msg.orientation_covariance[0] = -1
msg.header.frame_id = 'imu'
rate = rospy.Rate(100)

while not rospy.is_shutdown():
    accel = mpu9250.readAccel()
    gyro = mpu9250.readGyro()

    msg.header.stamp = rospy.Time.now()

    msg.linear_acceleration.x = accel['x'] * 9.81
    msg.linear_acceleration.y = accel['y'] * 9.81
    msg.linear_acceleration.z = accel['z'] * 9.81

    msg.angular_velocity.x = (gyro['x'] - 0.9) * 0.01745329251
    msg.angular_velocity.y = (gyro['y'] - 0.5) * 0.01745329251
    msg.angular_velocity.z = gyro['z'] * 0.01745329251

    pub.publish(msg)
    rate.sleep()

ros_upstart: Nodes using third party libraries are ignored [Python]

I'm using ROS on raspberry pi 3. I'm using two third party libraries, one for reading sensor registers from I2C (FaBo9AXIS-MPU9250-Python) and one for generating PWM signal on pins (pigpio).
Any node importing one won't start by ros_upstart as if it doesn't exist in the launch file (also no log file is generated). What's wrong?
Here's one of the nodes:

import rospy
import FaBo9Axis_MPU9250
from sensor_msgs.msg import Imu


rospy.init_node('imu')

mpu9250 = FaBo9Axis_MPU9250.MPU9250()

pub = rospy.Publisher('imu/data_raw',Imu, queue_size = 1)
msg = Imu()
msg.orientation_covariance[0] = -1
msg.header.frame_id = 'imu'
rate = rospy.Rate(100)

while not rospy.is_shutdown():
    accel = mpu9250.readAccel()
    gyro = mpu9250.readGyro()

    msg.header.stamp = rospy.Time.now()

    msg.linear_acceleration.x = accel['x'] * 9.81
    msg.linear_acceleration.y = accel['y'] * 9.81
    msg.linear_acceleration.z = accel['z'] * 9.81

    msg.angular_velocity.x = (gyro['x'] - 0.9) * 0.01745329251
    msg.angular_velocity.y = (gyro['y'] - 0.5) * 0.01745329251
    msg.angular_velocity.z = gyro['z'] * 0.01745329251

    pub.publish(msg)
    rate.sleep()