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

marinePhD's profile - activity

2022-02-15 09:59:33 -0500 received badge  Nice Question (source)
2021-06-08 02:54:14 -0500 received badge  Famous Question (source)
2021-01-19 00:40:49 -0500 received badge  Student (source)
2020-12-24 02:53:16 -0500 received badge  Famous Question (source)
2020-11-09 13:13:10 -0500 commented answer Visualize or plot Float32MultiArray data field

This looks quite good actually. I basically ended up converting my data to an image using opencv and then using an image

2020-11-09 12:53:48 -0500 commented answer Unable to sync with device error when porting rosserial to STM32F7 Discovery

I ended up just streaming my data over UART and reconstructing it in ROS. Overhead was probably lower as well.

2020-11-09 12:53:48 -0500 received badge  Commentator
2020-11-09 10:58:37 -0500 received badge  Famous Question (source)
2020-04-27 20:04:22 -0500 received badge  Notable Question (source)
2020-03-02 23:15:13 -0500 received badge  Famous Question (source)
2020-02-03 03:32:14 -0500 received badge  Notable Question (source)
2019-10-21 05:56:25 -0500 received badge  Popular Question (source)
2019-09-09 00:50:47 -0500 received badge  Notable Question (source)
2019-09-09 00:50:47 -0500 received badge  Popular Question (source)
2019-08-21 12:49:02 -0500 marked best answer Visualize or plot Float32MultiArray data field

Similar to this question, is there a way to plot the data field of a Float32MultiArray message type? I'm trying to show the FFT of a signal in real-time and I can't seem to find a straightforward method of implementing the visualization I've tried Plot juggler, rqt_plot amd rqt_multiplot and they don't seem to have the functionality

2019-08-21 11:43:51 -0500 commented question Using QtCreator to edit and show sub-folders in a package

@gvdhoorn I tried it a few years back and I wasn't a fan. I might have to give it another try if I don't get this workin

2019-08-21 11:03:27 -0500 edited question Using QtCreator to edit and show sub-folders in a package

Using QtCrerator to edit and show sub-folders in a package I'm using catkin tools and I'm trying to setup QtCreator to w

2019-08-21 10:52:18 -0500 asked a question Using QtCreator to edit and show sub-folders in a package

Using QtCrerator to edit and show sub-folders in a package I'm using catkin tools and I'm trying to setup QtCreator to w

2019-06-11 22:34:26 -0500 received badge  Notable Question (source)
2019-06-11 22:34:26 -0500 received badge  Popular Question (source)
2019-04-25 09:28:18 -0500 commented answer Visualize or plot Float32MultiArray data field

This is what I've come across as well. Looks like Ill have to write something it seems. Thanks.

2019-04-25 08:07:09 -0500 received badge  Popular Question (source)
2019-04-25 08:06:23 -0500 asked a question Visualize or plot Float32MultiArray data field

Visualize or plot Float32MultiArray data field Similar to this question, is there a way to plot the data field of a Floa

2019-04-10 16:25:00 -0500 commented answer STM32 with ROS , rosserial in Eclipse how?

@elgarbe Yeah, I've been meaning to tag you in this as I saw you opened an issue here: https://github.com/yoneken/rosser

2019-04-10 16:24:38 -0500 asked a question Unable to sync with device error when porting rosserial to STM32F7 Discovery

Unable to sync with device error when porting rosserial to STM32F7 Discovery I'm trying to use rosserial on the STM32F7

2019-04-10 12:05:50 -0500 commented answer STM32 with ROS , rosserial in Eclipse how?

@bryantan I'm also trying to do something similar with the f7 discovery and I'm running into the main issue. I came acro

2019-03-17 15:11:01 -0500 marked best answer Creating subscriber for a custom message type

I have a publisher in a package publishing a custom message type custom_gps.msg of the following format

Header header
float64 latitude      #degree
float64 longitude     #degree
float32 altitude      #WGS 84 reference ellipsoid fused by barometer
uint16  visibleSatelliteNumber #number of visible satellites

The message is published as drone_sdk/custom_gps. I'm trying to subscribe to the message in another package using a callback. In my class, I declare the callback and I add the header file generated by ROS for the custom message type

#include <drone_sdk/custom_gps.h>

//Declare Class
void fused_gps_callback(const drone_sdk::custom_gps::ConstPtr& msg);

but when I try to implement the subscriber:

void FlightControl::fused_gps_callback(const drone_sdk::custom_gps::ConstPtr& msg)
{
   // collect data here
}

I get the following error:

error: ‘custom_gps’ in namespace ‘drone_sdk’ does not name a type
 void FlightControl::fused_gps_callback(const drone_sdk::custom_gps::ConstPtr& msg)

My publisher works fine and I can see an output on rostopic echo. Also in my CMakeLists file, I believe I've added the dependency

using the following line: add_dependencies(flight_planner drone_sdk_generate_messages_cpp)

Here's what my CMAKE file looks like:

cmake_minimum_required(VERSION 2.8.3)
project(dji_flight_planner)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  drone_sdk
  nav_msgs
  roscpp
  rospy
  std_msgs
  sensor_msgs
  geometry_msgs
)


find_package(DJIOSDK REQUIRED)
find_package(Eigen3 REQUIRED)

catkin_package(
   INCLUDE_DIRS include
  CATKIN_DEPENDS
        #message_runtime    
        geometry_msgs
        nav_msgs
        std_msgs    
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

include_directories(
# include
  ${catkin_INCLUDE_DIRS}
  include ${EIGEN3_INCLUDE_DIR}
)            
add_executable(drone_flight_planner src/flight_control.cpp src/flight_planner.cpp src/mobile_comm.cpp src/PID.cpp)   

target_link_libraries(drone_flight_planner
        ${catkin_LIBRARIES}
        ${EIGEN_LIBRARIES}
    ${DJIOSDK_LIBRARIES}
        )

add_dependencies(drone_flight_planner drone_sdk_generate_messages_cpp)

target_link_libraries(drone_flight_planner
  ${catkin_LIBRARIES}
  ${DJIOSDK_LIBRARIES}
)

install(DIRECTORY launch
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)

Unfortunately, I can't use NavSatFix due to the additional field visibleSatelliteNumber in the message. Can anyone kindly point out what I'm doing wrong here?

2019-03-15 11:24:56 -0500 answered a question Creating subscriber for a custom message type

This seems to be fixed. I was adding #include <drone_sdk/customgps.h> instead of what I originally quoted in the q

2019-03-15 11:05:54 -0500 asked a question Creating subscriber for a custom message type

Creating subscriber for a custom message type I have a publisher in a package publishing a custom message type custom_gp

2019-03-01 16:34:55 -0500 marked best answer Kalman Filter implementation for a drone. Help confirming my sensor inputs are correct.

Hi, I'm learning more about the kalman filter and I thought I'd write a simple implementation for position tracking based on the details at this link and this link

However, The filter estimates and the real sensor readings are far off. I'm using a Matrice 100 drone and subscribing to the following messages to populate my state estimate:

/dji_sdk/imu ( publishes imu data)
/dji_sdk/velocity ( publishes velocity)
/dji_sdk/local_position ( publishes local position in Cartesian coordinates)

My state estimate is a 9 x 1 vector tracking position, velocity and acceleration

x << pos_x, pos_y, pos_z, vel_x, vel_y, vel_z, acc_x, acc_y, acc_z;

I populate these variables using the following which I get from the callbacks above:

pos_x = local_position.point.x;
pos_y = local_position.point.y;
pos_z = local_position.point.z;
vel_x = current_velocity.vector.x;
vel_y = current_velocity.vector.y;
vel_z = current_velocity.vector.z;
acc_x = current_acceleration.linear_acceleration.x;
acc_y = current_acceleration.linear_acceleration.y;
acc_z = current_acceleration.linear_acceleration.z;

I defined the rest of the filter as

 MatrixXd A(9,9);
    A <<    1, 0, 0, dt, 0, 0, dt_squared, 0 , 0,
            0, 1, 0, 0,  dt, 0, 0, dt_squared, 0,
            0, 0, 1, 0, 0, dt, 0, 0, dt_squared,
            0, 0, 0, 1, 0, 0, dt, 0, 0,
            0, 0, 0, 0, 1, 0, 0 , dt, 0,
            0, 0, 0, 0, 0, 1, 0, 0, dt,
            0, 0, 0, 0, 0, 0, 1, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 1, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 1;

    // State Covariance Matrix
MatrixXd P(9,9);
P<< 100, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 100, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 100, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 100, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 100, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 100, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 100, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 100, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 100;


MatrixXd H = MatrixXd::Identity(3,9);

  // Measurement noise Matrix. 
 MatrixXd R(3,3);
R << 0.1, 0, 0,
     0, 0.1, 0,
     0, 0, 0.1;

and I also defined an appropriate Q Matrix based on the CA model as defined in the second link.

I initialise the filter:

One of the things I'm not sure of is the values of my measurements vector z . I've defined it as

z << pos_x , pos_y , pos_z;

which is also technically the first three elements of my state vector. Is this correct?

I then run the filter at 100Hz which is the rate at which the drone publishes the messages but my results are shown at this link:)

Is anyone able to help share some pointers on this? Also, here's a link to my current source code if anyone is willing to take a look and see what I'm doing wrong.

2019-01-31 14:56:04 -0500 received badge  Famous Question (source)
2019-01-17 10:35:30 -0500 marked best answer Issues with odometry in robot_localization

I'm using the robot_localization package with ROS Kinetic and I'm trying to fuse the IMU and GPS data from the Matrice M100 similar to the work done here.

My issue is the odometry/gps topic looks wacky and isn't in line with what I expect the output to be. If you take a look at the picture below, red is the real drone odometry, purple is the odometry/filtered_map topic and green is odometry/gps. I can't upload files yet but you can see it at this link. Occasionally, I experience jumps but nothing too big at all. I recorded a bag file and plotted the coordinates of the drone and raw GPS and gps/filtered seem to be close enough as seen here: however, the 3d position messages on the odometry topic is inaccurate as shown here: I'm not sure if I'm doing something wrong in the configuration .

I've also attached a copy of the bag file here: Any help is appreciated.

Here's a sample of my dual_ekf_navsat file:

ekf_se_odom:
  frequency: 30
  sensor_timeout: 0.1
  two_d_mode: false
  transform_time_offset: 0.0
  transform_timeout: 0.0
  print_diagnostics: true
  debug: false

  map_frame: map
  odom_frame: odom
  base_link_frame: m100/base_link
  world_frame: odom

  odom0: dji_odom
  odom0_config: [true, true, true,
                 true, true, true,
                 true,  true,  true,
                 true, true, true,
                 true, true, true]
  odom0_queue_size: 10
  odom0_nodelay: true
  odom0_differential: false
  odom0_relative: false

  imu0: imu/data
  imu0_config: [false, false, false,
                true,  true,  true,
                false, false, false,
                true,  true,  true,
                true,  true,  true]
  imu0_nodelay: false
  imu0_differential: false
  imu0_relative: false
  imu0_queue_size: 10
  imu0_remove_gravitational_acceleration: true

  use_control: false

  process_noise_covariance: [0.05, 0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                              0,    0.05, 0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                              0,    0,    0.06, 0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                              0,    0,    0,    0.03, 0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                              0,    0,    0,    0,    0.03, 0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                              0,    0,    0,    0,    0,    0.06, 0,     0,     0,    0,    0,    0,    0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0.025, 0,     0,    0,    0,    0,    0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,     0.025, 0,    0,    0,    0,    0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,     0,     0.04, 0,    0,    0,    0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0.01, 0,    0,    0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0.01, 0,    0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.02, 0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0.01, 0,    0,
                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0.01, 0,
                              0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0 ...
(more)
2019-01-10 11:33:08 -0500 commented answer Issues with odometry in robot_localization

@Tom Moore, Edited the original question.

2019-01-10 11:28:42 -0500 received badge  Famous Question (source)
2019-01-10 11:13:17 -0500 edited answer Issues with odometry in robot_localization

@TomMoore. Hi, You have zero_altitude set to true, so that makes sense. I think this effectively answered the qu

2019-01-10 11:13:17 -0500 received badge  Editor (source)
2019-01-10 11:09:16 -0500 answered a question Issues with odometry in robot_localization

@TomMoore. Hi, You have zero_altitude set to true, so that makes sense. I think this effectively answered the qu

2019-01-10 09:12:38 -0500 received badge  Supporter (source)
2018-12-30 00:04:29 -0500 received badge  Famous Question (source)
2018-12-18 03:17:27 -0500 received badge  Notable Question (source)
2018-12-01 10:38:12 -0500 received badge  Popular Question (source)
2018-11-30 10:23:56 -0500 edited question Issues with odometry in robot_localization

Issues with odometry in robot_localization I'm using the robot_localization package with ROS Kinetic and I'm trying to f

2018-11-30 10:07:25 -0500 asked a question Issues with odometry in robot_localization

Issues with odometry in robot_localization I'm using the robot_localization package with ROS Kinetic and I'm trying to f

2018-11-20 11:33:33 -0500 received badge  Notable Question (source)
2018-11-20 10:36:20 -0500 commented question robot_localization problems

@JakeSheng, did you manage to solve this? I'm doing something similar but using only the IMU and GPS on the Matrice 100.

2018-10-30 06:23:27 -0500 marked best answer Using robot_localization navsat_transform_node to fuse IMU and GPS measurements from a drone

Hi, I'm looking throuh the robot_localization package and I'm a bit confused on how to use the navsat_transform node to fuse measurements coming from a drone.

I have three topics:

dji_odom for odometry.
dji_imu for Imu data.
dji_gps for gps data.

which according to the tutorial are the sample inputs. My issue is I'm not quite sure where these inputs are meant to be in the package. I'm using the sample dual_ekf_navsat_example file which looks like:

<launch>

  <rosparam command="load" file="$(find robot_localization)/params/dual_ekf_navsat_example.yaml" />

  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_odom" clear_params="true"/>

  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_map" clear_params="true">
    <remap from="odometry/filtered" to="odometry/filtered_map"/>
  </node>

  <node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform" clear_params="true">
    <remap from="odometry/filtered" to="odometry/filtered_map"/>
  </node>

</launch>

Initally, I thought this was meant to be added in the dual_ekf_navsat_example.yaml. Mine looks like this:

ekf_se_odom:
  frequency: 50
  sensor_timeout: 0.1
  two_d_mode: false
  transform_time_offset: 0.0
  transform_timeout: 0.0
  print_diagnostics: true
  debug: false

  map_frame: map
  odom_frame: odom
  base_link_frame: m100/base_link
  world_frame: odom

  odom0: dji_odom
  odom0_config: [true, true, true,
                 true, true, true,
                 true,  true,  true,
                 true, true, true,
                 true, true, true]
  odom0_queue_size: 10
  odom0_nodelay: true
  odom0_differential: false
  odom0_relative: false

  imu0: dji_imu
  imu0_config: [true, true, true,
                true,  true,  true,
                true, true, true,
                true,  true,  true,
                true,  true,  true]
  imu0_nodelay: false
  imu0_differential: false
  imu0_relative: false
  imu0_queue_size: 10
  imu0_remove_gravitational_acceleration: true

  use_control: false
   //covariances removed for brevity


ekf_se_map:
  frequency: 30
  sensor_timeout: 0.1
  two_d_mode: false
  transform_time_offset: 0.0
  transform_timeout: 0.0
  print_diagnostics: true
  debug: false

  map_frame: map

  odom_frame: odom
  base_link_frame: base_link
  world_frame: map

  odom0: dji_odom
  odom0_config: [true, true, true,
                 true, true, true,
                 true,  true,  true,
                 true, true, true,
                 true, true, true]
  odom0_queue_size: 10
  odom0_nodelay: true
  odom0_differential: false
  odom0_relative: false

  odom1: dji_gps
  odom1_config: [true,  true,  true,
                 false, false, false,
                 false, false, false,
                 false, false, false,
                 false, false, false]
  odom1_queue_size: 10
  odom1_nodelay: true
  odom1_differential: false
  odom1_relative: false

  imu0: dji_imu
  imu0_config: [false, false, false,
                true,  true,  false,
                false, false, false,
                true,  true,  true,
                true,  true,  true]
  imu0_nodelay: true
  imu0_differential: false
  imu0_relative: false
  imu0_queue_size: 10
  imu0_remove_gravitational_acceleration: true

  use_control: false

  process_noise_covariance: // removed for brevity

  initial_estimate_covariance: //removed for brevity

navsat_transform:
  frequency: 30
  delay: 3.0
  magnetic_declination_radians: 0.013945181  # For lat/long 55.944831, -3.186998
  yaw_offset: 0  # IMU reads 0 facing magnetic north, not east
  zero_altitude: false
  broadcast_utm_transform: true
  publish_filtered_gps: true
  use_odometry_yaw: false
  wait_for_datum: false

But I get the following error: Client [/ekf_se_map] wants topic to have datatype/md5sum [nav_msgs/Odometry/cd5e73d190d741a2f92e81eda573aca7], but our version has [sensor_msgs/NavSatFix/2d3a8cd499b9b4a0249fb98fd05cfa48]. Dropping connection. which has to do with odom1 on ekf_se_map which makes sense I guess. My question is where do you add the GPS data to fuse into the package?

2018-10-30 06:23:27 -0500 received badge  Scholar (source)
2018-10-30 05:35:54 -0500 received badge  Popular Question (source)