Ask Your Question

teshansj's profile - activity

2019-10-18 00:50:12 -0600 received badge  Popular Question (source)
2019-10-01 06:13:03 -0600 received badge  Popular Question (source)
2019-10-01 02:46:13 -0600 commented question C++ subscriber not working for first messages

I am launching them separately. And of course I am running the listeners first. To solve the problem, delay need to be a

2019-10-01 01:55:15 -0600 commented question C++ subscriber not working for first messages

@mgruhler Yes adding a delay solves the problem. So it it happening because init functions exit before they actually fin

2019-10-01 01:49:45 -0600 edited question C++ subscriber not working for first messages

C++ subscriber not working for first messages Just out of curiosity, I modified the simple c++ publisher and simple pyth

2019-10-01 01:45:07 -0600 commented question C++ subscriber not working for first messages

As I have mentioned at the beginning, I modified the code in the examples c++ and python. Didn't include it in the quest

2019-10-01 00:35:28 -0600 asked a question C++ subscriber not working for first messages

C++ subscriber not working for first messages Just out of curiosity, I modified the simple c++ publisher and simple pyth

2019-09-27 13:09:53 -0600 received badge  Notable Question (source)
2019-09-27 05:57:16 -0600 edited question C++ subscriber callback not working for Python publisher

C++ subscriber callback not working for Python publisher EDIT3: I just found out that the problem is not with the repo

2019-09-27 05:56:43 -0600 commented question C++ subscriber callback not working for Python publisher

Sorry my bad. I will update the output with that. Btw seems like it's not a problem with the nodes. Please see my EDIT3

2019-09-27 05:51:24 -0600 edited question C++ subscriber callback not working for Python publisher

C++ subscriber callback not working for Python publisher EDIT3: I just found out that the problem is not with the repo

2019-09-27 05:45:11 -0600 commented question C++ subscriber callback not working for Python publisher

@LeoE Launch file. I will add others at the end of the question

2019-09-27 01:53:45 -0600 received badge  Popular Question (source)
2019-09-26 23:37:00 -0600 edited question C++ subscriber callback not working for Python publisher

C++ subscriber callback not working for Python publisher I am trying to use this repo to control a UR5 arm. The rosnode

2019-09-26 23:24:23 -0600 commented question C++ subscriber callback not working for Python publisher

@stevemacenski Already checked that. There is only one /ur_driver/URScript topic and there are no other similar topics.

2019-09-26 23:22:25 -0600 edited question C++ subscriber callback not working for Python publisher

C++ subscriber callback not working for Python publisher I am trying to use this repo to control a UR5 arm. The rosnode

2019-09-26 23:10:11 -0600 commented question C++ subscriber callback not working for Python publisher

Thanks for noticing that. After you pointed that out, I tested both changing the publishing topic to ur_driver/URScript.

2019-09-26 13:53:19 -0600 asked a question C++ subscriber callback not working for Python publisher

C++ subscriber callback not working for Python publisher I am trying to use this repo to control a UR5 arm. The rosnode

2019-09-18 22:56:47 -0600 marked best answer Problem with launching ur_gazebo

I am checking out this tutorial on ur_gazebo. I have all the requirements installed. However, when I try roslaunch ur_gazebo ur5.launch, it gives me some errors and says (Full output attached at the end)

[spawn_gazebo_model-4] process has finished cleanly
[joint_state_controller_spawner-7] process has finished cleanly
[arm_controller_spawner-8] process has finished cleanly

Still I can see gazebo working as expected (I think). I can run the moveit config, plan a path using rviz and execute and in gazebo it seems to be working fine. What am I missing here? I have no prior experience in this so an explanation on this is much appreciated.

roslaunch ur_gazebo ur5.launch output:

... logging to /home/XXXX/.ros/log/fe8e0ec2-d9f5-11e9-a221-8c04ba099a14/roslaunch-tehan-l-l-13884.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://tehan-l-l:42425/

SUMMARY
========

PARAMETERS
 * /arm_controller/action_monitor_rate: 10
 * /arm_controller/constraints/elbow_joint/goal: 0.1
 * /arm_controller/constraints/elbow_joint/trajectory: 0.1
 * /arm_controller/constraints/goal_time: 0.6
 * /arm_controller/constraints/shoulder_lift_joint/goal: 0.1
 * /arm_controller/constraints/shoulder_lift_joint/trajectory: 0.1
 * /arm_controller/constraints/shoulder_pan_joint/goal: 0.1
 * /arm_controller/constraints/shoulder_pan_joint/trajectory: 0.1
 * /arm_controller/constraints/stopped_velocity_tolerance: 0.05
 * /arm_controller/constraints/wrist_1_joint/goal: 0.1
 * /arm_controller/constraints/wrist_1_joint/trajectory: 0.1
 * /arm_controller/constraints/wrist_2_joint/goal: 0.1
 * /arm_controller/constraints/wrist_2_joint/trajectory: 0.1
 * /arm_controller/constraints/wrist_3_joint/goal: 0.1
 * /arm_controller/constraints/wrist_3_joint/trajectory: 0.1
 * /arm_controller/joints: ['shoulder_pan_jo...
 * /arm_controller/state_publish_rate: 25
 * /arm_controller/stop_trajectory_duration: 0.5
 * /arm_controller/type: position_controll...
 * /joint_state_controller/publish_rate: 50
 * /joint_state_controller/type: joint_state_contr...
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 50.0
 * /robot_state_publisher/tf_prefix: 
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_sim_time: True

NODES
  /
    arm_controller_spawner (controller_manager/controller_manager)
    fake_joint_calibration (rostopic/rostopic)
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    joint_state_controller_spawner (controller_manager/controller_manager)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_gazebo_model (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [13899]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to fe8e0ec2-d9f5-11e9-a221-8c04ba099a14
process[rosout-1]: started with pid [13912]
started core service [/rosout]
process[gazebo-2]: started with pid [13922]
process[gazebo_gui-3]: started with pid [13940]
process[spawn_gazebo_model-4]: started with pid [13946]
process[robot_state_publisher-5]: started with pid [13947]
process[fake_joint_calibration-6]: started with pid [13948]
process[joint_state_controller_spawner-7]: started with pid [13949]
process[arm_controller_spawner-8]: started with pid [13952]
[ INFO] [1568798618.512260316]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1568798618.512910501]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1568798618.515966508]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1568798618.516420817]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
SpawnModel script started
[INFO] [1568798618.830303, 0.000000]: Loading model XML from ros parameter
[INFO] [1568798618.832155, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1568798619.032186013, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1568798619.062803814, 0.052000000]: Physics dynamic reconfigure ready.
[INFO] [1568798619.138086, 0.121000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1568798619.275586, 0.157000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1568798619.341170165, 0.157000000]: Loading gazebo_ros_control plugin
[ERROR] [1568798619.341286713, 0.157000000]: GazeboRosControlPlugin missing <legacyModeNS> while using DefaultRobotHWSim, defaults to true.
This setting assumes you have an old package with an ...
(more)
2019-09-18 22:56:43 -0600 commented answer Problem with launching ur_gazebo

Yes these are not errors. The thing is they exit without me killing them with ctrl+c You can see there are a few errors

2019-09-18 22:56:35 -0600 commented answer Problem with launching ur_gazebo

Yes these are not errors. The thing is they exit without me killing them with ctrl+c You can see there are a few errors

2019-09-18 06:23:30 -0600 commented answer Problem with launching ur_gazebo

Yes these are not errors. The thing is they exit without me killing them with ctrl+c You can see there are a few errors

2019-09-18 04:45:54 -0600 asked a question Problem with launching ur_gazebo

Problem with launching ur_gazebo I am checking out this tutorial on ur_gazebo. I have all the requirements installed. Ho

2019-09-17 23:00:35 -0600 commented answer gazebo_ros_control plugin: GazeboRosControlPlugin missing <legacyModeNS> DefaultRobotHWSim

What do you mean by "fixing the gazebo_ros_control plugin"? I have kinetic on Ubuntu 16.04 ang having the same problem e

2019-08-28 21:51:09 -0600 received badge  Popular Question (source)
2019-08-22 08:36:29 -0600 received badge  Taxonomist
2019-08-19 22:43:14 -0600 commented question Using external opencv version - kinetic

@parzival This node is in c++

2019-08-19 22:43:07 -0600 commented question Using external opencv version - kinetic

@parzival This noce is in c++

2019-08-19 22:43:07 -0600 received badge  Commentator
2019-08-19 06:06:42 -0600 asked a question Using external opencv version - kinetic

Using external opencv version - kinetic I need to use OpenCV dnn for a ROS node. Since the default OpenCV version that c

2019-07-17 11:15:13 -0600 received badge  Student (source)
2019-02-03 06:23:08 -0600 received badge  Famous Question (source)
2019-01-24 05:03:47 -0600 received badge  Famous Question (source)
2018-12-26 23:27:56 -0600 received badge  Notable Question (source)
2018-12-26 23:27:56 -0600 received badge  Popular Question (source)
2018-12-17 13:50:45 -0600 marked best answer run_id on parameter server does not match declared run_id

I have set up several roslaunch files to be launched at system startup using systemd. However at the startup they show the above error and fail. When I set the systemd services to be restarted on failure, launch files are relaunched when failed and work fine. What might I be doing wrong here? Declared run_id for each roslaunch seems to be different from each other at the first launch.

The error is in the following format

run_id on parameter server does not match declared run_id: 686cb5dc-01cf-11e9-ab7c-b10995016401 vs 68b27f9a-01cf-11e9-ab7c-b10995016401

Here's a sample script that runs a launch file

#!/bin/bash
sleep 1
source /opt/ros/kinetic/setup.bash
source /my/workspace/path/devel/setup.bash
roslaunch /launch/file/path/myfile.launch

Here's the format of the systemd services I use

[Unit]
Description=Unit description
Wants=roscore.service
BindsTo=roscore.service

[Service]
User=username
ExecStart=/script/that/runs/the/launch/file.sh
Restart=on-failure
RestartSec=1

[Install]
WantedBy=multi-user.target

roscore.service starts a roscore. I am using kinetic on Ubuntu 16.04.

2018-12-17 10:18:23 -0600 answered a question run_id on parameter server does not match declared run_id

Adding a delay before starting the services (except for the roscore) solved the problem. roslaunch tries to get the run

2018-12-17 04:01:53 -0600 edited question run_id on parameter server does not match declared run_id

run_id on parameter server does not match declared run_id I have set up several roslaunch files to be launched at system

2018-12-17 03:38:08 -0600 asked a question run_id on parameter server does not match declared run_id

run_id on parameter server does not match declared run_id I have set up several roslaunch files to be launched at system

2018-10-16 04:23:33 -0600 received badge  Famous Question (source)
2018-09-14 10:04:54 -0600 marked best answer Creating generic subscriber in kinetic (C++11)

I am trying go create a generic subscriber as in this wiki example. But when I try catkin_make with the example code, it gives me error: ‘ROSTypeList’ was not declared in this scope static std::map<std::string,ROSTypeList> registered_type;

I am a noob to ROS. I searched the files of the ros_type_introspection pkg installation for ROSTypeList in the ros_type_introspection namespace but couldn't find anything similar. However this is typedef'ed in here in parser.hpp but it is for jade as I understand. There is no parser.hpp or a ROSTypeList in here which is for kinetic. What am I doing wrong?


I did both apt installation and package installation from git in order to install ros_type_introspection. Both gives the same output. Here's the full catkin_make error

[ 97%] Building CXX object loggertest/CMakeFiles/logging_server.dir/src/gen_sub.cpp.o
[ 97%] Built target loggertest_generate_messages
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp: In function ‘void messageCallback(const ConstPtr&, const string&)’:
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:26:31: error: ‘ROSTypeList’ was not declared in this scope
static std::map<std::string,ROSTypeList> registered_type;
                            ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:26:42: error: template argument 2 is invalid
static std::map<std::string,ROSTypeList> registered_type;
                                        ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:26:42: error: template argument 4 is invalid
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:29:10: error: ‘ROSTypeFlat’ does not name a type
static ROSTypeFlat flat_container;
        ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:34:23: error: request for member ‘find’ in ‘registered_type’, which is of non-class type ‘int’
if( registered_type.find( datatype ) == registered_type.end() )
                    ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:34:59: error: request for member ‘end’ in ‘registered_type’, which is of non-class type ‘int’
if( registered_type.find( datatype ) == registered_type.end() )
                                                        ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:36:17: error: expected ‘;’ before ‘typelist’
    ROSTypeList typelist = buildROSTypeMapFromDefinition(datatype, definition);
                ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:37:20: error: no match for ‘operator[]’ (operand types are ‘int’ and ‘const string {aka const std::__cxx11::basic_string<char>}’)
    registered_type[datatype] = typelist;
                    ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:37:33: error: ‘typelist’ was not declared in this scope
    registered_type[datatype] = typelist;
                                ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:43:22: error: ‘const ConstPtr {aka const class boost::shared_ptr<const topic_tools::ShapeShifter>}’ has no member named ‘size’
buffer.resize( msg.size() ); 
                    ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:47:21: error: ‘_ros_type_map’ was not declared in this scope
buildRosFlatType( _ros_type_map, 
                    ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:51:22: error: ‘flat_container’ was not declared in this scope
                    &flat_container // the output
                    ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:52:19: error: ‘buildRosFlatType’ was not declared in this scope
                );
                ^
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp: In function ‘int main(int, char**)’:
/home/teshanl/catkin_ws/src/loggertest/src/gen_sub.cpp:70:30: error: ‘DataStreamROS’ has not been declared
    callback = boost::bind( &DataStreamROS::topicCallback, this ...
(more)
2018-09-09 11:26:38 -0600 received badge  Notable Question (source)
2018-09-06 05:21:58 -0600 received badge  Notable Question (source)
2018-09-06 04:08:43 -0600 received badge  Famous Question (source)
2018-09-06 04:08:01 -0600 marked best answer ROS-kinetic (C++11) resource retriever undefined references

I need to get an MySQL query from a file. For that I a trying to use this example. But when I have resource_retriever::Retriever r; in the code, I get the following errors.

resource_retriever::Retriever r; is the line causing the error and I don't get it. Any idea? (The header files are included and the files are present - I checked)

[ 95%] Building CXX object xxxxx/CMakeFiles/xxxxx.dir/src/xxxxx.cpp.o
[100%] Linking CXX executable /home/teshanl/catkin_ws/devel/lib/xxxxxx/xxxxxx
CMakeFiles/xxxxxx.dir/src/xxxxxx.cpp.o: In function `main':
xxxxx.cpp:(.text+0xd9): undefined reference to `resource_retriever::Retriever::Retriever()'
xxxxx.cpp:(.text+0x132): undefined reference to `resource_retriever::Retriever::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const
&)'
xxxxx.cpp:(.text+0x1a0): undefined reference to `resource_retriever::Retriever::~Retriever()'
xxxxx.cpp:(.text+0x243): undefined reference to `resource_retriever::Retriever::~Retriever()'
collect2: error: ld returned 1 exit status
xxxxx/CMakeFiles/xxxxx.dir/build.make:117: recipe for target '/home/teshanl/catkin_ws/devel/lib/xxxxx' failed
make[2]: *** [/home/teshanl/catkin_ws/devel/lib/xxxxx] Error 1
CMakeFiles/Makefile2:1836: recipe for target 'xxxxx/CMakeFiles/xxxxxx.dir/all' failed
make[1]: *** [xxxxx/CMakeFiles/xxxxxx.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
2018-09-06 04:08:01 -0600 received badge  Scholar (source)
2018-09-06 03:52:59 -0600 commented answer ROS-kinetic (C++11) resource retriever undefined references

@gvdhoom Sorry this is work related so I can't share files without some redaction which takes time :)