ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Gary Servin's profile - activity

2020-08-06 12:38:08 -0500 received badge  Nice Answer (source)
2020-07-04 08:47:48 -0500 received badge  Good Answer (source)
2018-11-15 07:54:35 -0500 commented question Callback not updating class member variable

I've tried running this and it works fine on my machine running 16.04 and kinetic. Here's the test code I'm using to tes

2018-09-06 09:37:25 -0500 commented question Subscriber not receiving messages even though publisher is continuously publishing on the given same topic

Are you using C++ or Python for your subscriber code? If C++, do you have a ros::spinOnce(); that is called periodically

2018-08-30 14:37:08 -0500 answered a question how to use tum_simulator in kinetic ros?

The tum_simulator package has not been actively maintained for a long time. Thankfully someone has already ported it to

2017-11-14 09:34:43 -0500 commented question How to proceed with a IMU based odometry ?

One option would be to run some kind on visual odometry like viso2

2017-11-14 09:33:07 -0500 commented question How to proceed with a IMU based odometry ?

You don't really have an easy way to get odometry directly from the IMU, since you will need to integrate the accelerati

2017-11-14 09:19:22 -0500 answered a question How to calculate localization error for a robot moving in a custom map using amcl and navigation stack?

If you're using gazebo, you can subscribe to the /gazebo/model_states topic and compare it to the output of amcl. You ca

2017-11-07 12:25:25 -0500 commented question Arduino ROS communication using dc motor with encoder

You can add it to your original post, there is an icon (with 1 and 0s) to format the code

2017-11-07 09:13:42 -0500 commented question Arduino ROS communication using dc motor with encoder

Can you share the part of the code that reads the encoder? Are you using any example code? Without that it would be a bi

2017-11-06 10:29:43 -0500 received badge  Nice Answer (source)
2017-08-24 09:03:59 -0500 marked best answer Append parameters to parameter server using YAML files

Hi,

Is there a way to avoid overwriting parameters when being loaded from a launchfile using a YAML file?

For example, I have two YAML files like the following:

config1.yaml

topics:
  - topic: topic1
    type: geometry_msgs/Twist
  - topic: topic2
    type: std_msgs/Empty

config2.yaml

topics:
  - topic: topic3
    type: geometry_msgs/Twist
  - topic: topic4
    type: std_msgs/Empty

and want to have the 4 topics loaded under the topics parameter.

I know that namespacing is the way it's normally done to separate parameters with the same name, but I'm looking for some other way.

Thanks!

2017-08-08 08:29:15 -0500 commented answer Make nodes without making a package

Fixed the link

2017-08-08 08:29:02 -0500 edited answer Make nodes without making a package

You can do it, but it is very impractical. Take a look at this tutorial for a cpp example. Also, for python you can jus

2017-01-17 09:39:19 -0500 answered a question Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)

Currently we don't support using PkgConfig with the ROS NDK, you will need to use a workaround to specify the correct variables for the library you need to use (in this case libusb). Here's an example on how we do that for another package.

2017-01-15 19:32:06 -0500 received badge  Nice Answer (source)
2016-12-30 20:42:57 -0500 commented question rosserial mbed with EFM32 Wonder Gecko - no sync

Hi! Are you sure the serial port is ttyACM0 for the Gecko? Also, the default speed is 57600 (see line 17 in here) or did you change it on the example code?

2016-12-30 20:28:21 -0500 commented question rosserial_mbed Publisher example

Can you share how you solved it? thanks!

2016-11-10 10:48:57 -0500 commented question rosserial_mbed Publisher example

Are you still having this issue? are you using rosserial_mbed from debians or did you install it via sources?

2016-08-16 08:54:40 -0500 received badge  Nice Answer (source)
2016-05-09 15:51:05 -0500 answered a question android_ndk tutorials

This error was due to a name change on the tf2 package and it has been fixed here.

You need to pull the changes from the repo, run: sudo rm -r output/catkin_ws to delete the workspace and run the do_docker.sh script again.

2016-05-03 01:43:22 -0500 received badge  Nice Answer (source)
2016-04-26 11:43:53 -0500 answered a question Using Raspberry with ROS and communicate with PIC32

You can use the atmega microconteoller alone (without using any of the Arduino libraries) using this example.

If you want to use a PIC32, which AFAIK doesn't have a ROS library yet, you can use something like the serial package from wjwwood on the host and write your own protocol and serial parser on the PIC32.

Here's a simple example of how to use the serial package to communicate with an arduino, but without using the rosserial_arduino library. It should be easy to replicate this on the PIC32.

2016-04-26 11:36:09 -0500 answered a question do_docker.sh failing on console_bridge

Sorry for the delay, I've just seen this.

We've already fixed that issue (here), it turns out, console_bridge move from using boost to using std C++11 mutex which is not currently available for the android_ndk.

If you update the repository, it should work.

2016-04-26 10:22:29 -0500 commented question error python serial ros arduino

first of all, does your user have permissions to access the serial port?

second, ros_time is of type 'rospy.rostime.Time' so you can't write that directly to the serial port, you should do something like ros_time = ser.write(str(ros_time)) to send the time.

2016-02-20 12:43:01 -0500 commented question How to interface STM32F4 with ROS?

If you have mbed support for your board, you can use rosserial_mbed

2016-02-05 14:07:07 -0500 commented answer Simulation of multiple Husky robots

What I did was create two different husky.gazebo.xacro files and hard-code the robotNamespace for each robot there. And on the description.gazebo.xacro included each of those files depending on a namespace arg like: <xacro:include filename="/home/gary/$(arg namespace).gazebo.xacro"/>

2016-02-05 14:03:26 -0500 commented answer Simulation of multiple Husky robots

Yeah, that's the tricky part. You can pass arguments to a xacro file and use the arg to set the robotNamespace tag. The problem is that you can't pass an arg from a xacro file to an <xacro:include as stated here.

2016-02-02 21:44:22 -0500 answered a question Simulation of multiple Husky robots

Each controller is running in a single namespace (see here), so you will need to adjust that. You will also need to configure the namespace for the imu and for the gps.

You need to also modify the -model parameter in spawn_husky_model or both robots will get an error.

here's a screenshot of the two huskies moving independently after applying the modifications

2016-02-02 07:28:43 -0500 commented question ros servo control arduino fails

can you try disconnecting the servos and running the serial node again? If it works without the servo, then it should be a problem related with the power supply, the regulator on the arduino can't provide enough current to the servo and it resets the arduino when you try to move the motor

2016-02-01 12:14:15 -0500 commented question ros servo control arduino fails

does your user have permission to access the serial port?

did you try specifying the port to use?

rosrun rosserial_python serial_node.py /dev/ttyUSB0

or

rosrun rosserial_python serial_node.py /dev/ttyACM0

2016-01-15 21:41:14 -0500 received badge  Critic (source)
2016-01-13 10:58:22 -0500 answered a question best ubuntu version for vm to install ros?

I'd suggest you go with 14.04 since is the current Long Term Support. For ROS you can go either with Indigo or Jade for the 14.04 release.

2016-01-04 22:07:45 -0500 answered a question How to set namespace for tf?

There's no off the shelf solution, you will need to create a node that subscribes to /tf in each of the robot's masters, apply the prefix to each of the transformations needed and re-publishes on a "common" tf topic you chose.

2016-01-04 22:03:33 -0500 answered a question How to communicate between multiple ROS master?

You will need to use something like multimaster_fkie or rocon_multimaster and namespace each of your robots. You can take a look at this answer about the namespacing.

2015-12-20 16:47:12 -0500 commented question Ardunio IMU (mpu6050) interfacing with ROS

did you try the code without the ROS part? so you can confirm that the arduino is in fact communicating with the IMU.

2015-12-20 16:45:12 -0500 edited question Ardunio IMU (mpu6050) interfacing with ROS

I tried to interface IMU (mpu6050) which is controlled by Ardunio and it should send ROS messages (Publishing the coordinates) I tried the following code

#include <ros.h>
#include <std_msgs/Int8.h>
#include "I2Cdev.h"
#include "MPU6050_6Axis_MotionApps20.h"
#include "Wire.h"
std_msgs::Int8 ul_msg;
ros::Publisher pub_ul("temperature", &ul_msg);


MPU6050 mpu;
//MPU6050 mpu(0x69); // <-- use for AD0 high

#define LED_PIN 13 // (Arduino is 13, Teensy is 11, Teensy++ is 6)
bool blinkState = false;
// MPU control/status vars
bool dmpReady = false;  // set true if DMP init was successful
uint8_t mpuIntStatus;   // holds actual interrupt status byte from MPU
uint8_t devStatus;      // return status after each device operation (0 = success, !0 = error)
uint16_t packetSize;    // expected DMP packet size (default is 42 bytes)
uint16_t fifoCount;     // count of all bytes currently in FIFO
uint8_t fifoBuffer[64]; // FIFO storage buffer
// orientation/motion vars
Quaternion q;           // [w, x, y, z]         quaternion container
VectorInt16 aa;         // [x, y, z]            accel sensor measurements
VectorInt16 aaReal;     // [x, y, z]            gravity-free accel sensor measurements
VectorInt16 aaWorld;    // [x, y, z]            world-frame accel sensor measurements
VectorFloat gravity;    // [x, y, z]            gravity vector
float euler[3];         // [psi, theta, phi]    Euler angle container
float ypr[3];           // [yaw, pitch, roll]   yaw/pitch/roll container and gravity vector

// packet structure for InvenSense teapot demo
uint8_t teapotPacket[14] = { '$', 0x02, 0,0, 0,0, 0,0, 0,0, 0x00, 0x00, '\r', '\n' };
// ================================================================
// ===               INTERRUPT DETECTION ROUTINE                ===
// ================================================================

volatile bool mpuInterrupt = false;     // indicates whether MPU interrupt pin has gone high
void dmpDataReady() {
    mpuInterrupt = true;
}
// ================================================================
// ===                      INITIAL SETUP                       ===
// ================================================================

void setup() {


        Wire.begin();
       // TWBR = 24; // 400kHz I2C clock (200kHz if CPU is 8MHz). Comment this line if having compilation difficulties with TWBR.
        Serial.begin(57600);
        while (!Serial);
        Serial.println("Initializing I2C devices...");
        mpu.initialize();
        // verify connection
        Serial.println(F("Testing device connections..."));
        Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed"));
        // wait for ready
        Serial.println(F("\nSend any character to begin DMP programming and demo: "));
        while (Serial.available() && Serial.read()); // empty buffer
        while (!Serial.available());                 // wait for data
        while (Serial.available() && Serial.read()); // empty buffer again
        // load and configure the DMP
        Serial.println(F("Initializing DMP..."));
       devStatus = mpu.dmpInitialize();

    // supply your own gyro offsets here, scaled for min sensitivity
    mpu.setXGyroOffset(220);
    mpu.setYGyroOffset(76);
    mpu.setZGyroOffset(-85);
    mpu.setZAccelOffset(1788); // 1688 factory default for my test chip

    // make sure it worked (returns 0 if so)
    if (devStatus == 0) {
        // turn on the DMP, now that it's ready
        Serial.println(F("Enabling DMP..."));
        mpu.setDMPEnabled(true);

        // enable Arduino interrupt detection
        Serial.println(F("Enabling interrupt detection (Arduino external interrupt 0)..."));
        attachInterrupt(0, dmpDataReady, RISING);
        mpuIntStatus = mpu.getIntStatus();

        // set our DMP Ready flag so the main loop() function knows it's okay to use it
        Serial.println(F("DMP ready! Waiting for first interrupt..."));
        dmpReady = true;

        // get expected DMP packet size for later comparison
        packetSize = mpu.dmpGetFIFOPacketSize();
    } else {
        // ERROR!
        // 1 = initial memory load failed
        // 2 = DMP configuration updates failed
        // (if it's going to break, usually the code will be 1)
        Serial.print(F("DMP Initialization failed (code "));
        Serial.print(devStatus);
        Serial.println(F ...
(more)
2015-12-08 11:00:09 -0500 commented answer ROS of sick_tim series lidar's drivers package

did you uncomment the following line? https://github.com/uos/sick_tim/blob/... . Also you need to make your document public so we can see it.

2015-12-08 09:43:56 -0500 commented question [rospack] couldn't find package [image_view]

did you install the image_view package?

sudo apt-get install ros-indigo-image-view
2015-11-30 13:22:46 -0500 commented question Build native ROS nodes using the Android NDK Errors

I've upload my rosndk image for now, can you try using it instead of building? https://hub.docker.com/r/garyservin/r...

2015-11-26 09:01:02 -0500 commented question Build native ROS nodes using the Android NDK Errors

It seems it failed to install correctly the Android SDK inside the container, thus the "SDK target: lib_target_sdk_target-NOTFOUND".

Can you manually install the SDK again inside the container? Here are the instructions: https://gist.github.com/garyservin/34...

2015-11-25 19:01:59 -0500 commented question Build native ROS nodes using the Android NDK Errors

It seems like opencv is failing to build, I just cleaned my workspace and started a new do_docker from scratch to see if I can reproduce this issue. I'll let you know.

2015-11-25 18:57:30 -0500 edited question Build native ROS nodes using the Android NDK Errors

hi,I'm trying to build native ROS nodes using the Android NDK by this tutorial[http://wiki.ros.org/android_ndk/Tutorials/BuildingNativeROSPackages]. I use Ubuntu 64bit 14.04LTS as the host on the VM. I installed docker by step 1 and step 2 successfully and run ./do_docker.sh cmd,then something goes wrong with this:

[ 84%] Building CXX object modules/ts/CMakeFiles/opencv_ts.dir/src/ts.cpp.o
Linking CXX static library ../../lib/libopencv_ts.a
[ 84%] Built target opencv_ts
[ 84%] Generating OpenCV Android library project. SDK target: lib_target_sdk_target-NOTFOUND
make[2]: *** [build.xml] Error 1
make[1]: *** [modules/java/CMakeFiles/opencv_java.dir/all] Error 2
make: *** [all] Error 2
Cross-compiling ROS.
Running catkin_make.
Base path: /opt/roscpp_output/catkin_ws
Source space: /opt/roscpp_output/catkin_ws/src
Build space: /opt/roscpp_output/catkin_ws/build
Devel space: /opt/roscpp_output/catkin_ws/devel
Install space: /opt/roscpp_output/target

Then the cmake comeout some errors :

CMake Error at catkin/cmake/catkin_workspace.cmake:95 (message):
  This workspace contains non-catkin packages in it, and catkin cannot build
  a non-homogeneous workspace without isolation.  Try the
  'catkin_make_isolated' command instead.
Call Stack (most recent call first):
  CMakeLists.txt:63 (catkin_workspace)


-- Configuring incomplete, errors occurred!
See also "/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

Installing.

make: *** No rule to make target `install'.  Stop.
build_cpp.sh /opt/roscpp_output died with error code 2

Creating output/roscpp_android_ndk.tar.gz.

tar: roscpp_android_ndk: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

the CMakeError.log shows like :

CheckIncludeFile.c:1:22: fatal error: execinfo.h: No such file or directory
compilation terminated.
make[1]: Leaving directory `/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec2484976465.dir/CheckIncludeFile.c.o] Error 1
make: *** [cmTryCompileExec2484976465/fast] Error 2

and 


/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeTmp/src.cxx:2:8: error: expected constructor, destructor, or type conversion before '(' token
make[1]: Leaving directory `/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec640946834.dir/src.cxx.o] Error 1
make: *** [cmTryCompileExec640946834/fast] Error 2


main:CheckFunctionExists.c(.text.main+0x14): error: undefined reference to 'backtrace'
collect2: ld returned 1 exit status
make[1]: Leaving directory `/opt/roscpp_output/catkin_ws/build/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec4272716319] Error 1
make: *** [cmTryCompileExec4272716319/fast] Error 2

I don't know if the cmake errors come from the opencv errors. Any one Know something about this problem?Thanks a lot!

2015-11-18 09:01:11 -0500 answered a question any example of rosserial_embeddedlinux over serial port?

You can use something like https://github.com/wjwwood/serial/ .

Here is a simple example of how to use it to communicate with arduino (without using rosserial_arduino)

2015-11-15 18:02:16 -0500 commented question Beaglebone Pin Issues?

I don't think we have enough information to help you based solely on this. Can you edit your question and add the code (or the relevant part of it) you're using? Maybe permissions issue?

2015-11-05 11:28:22 -0500 commented question Connecting two laptops through serial rs232

take a look at the rosserial_windows package