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

Obeseturtle's profile - activity

2023-03-24 08:05:55 -0500 received badge  Favorite Question (source)
2022-05-24 19:37:29 -0500 commented question Gazebo Vacuum Plugin grabbing the center of object

Unfortunately this tag creates a link to the object, like it will lock to the object origin. What I did was that I edite

2022-02-04 08:35:33 -0500 received badge  Great Answer (source)
2022-02-04 08:35:33 -0500 received badge  Guru (source)
2022-02-04 08:35:28 -0500 received badge  Good Question (source)
2021-09-28 07:52:04 -0500 received badge  Famous Question (source)
2021-06-24 03:26:53 -0500 marked best answer [ROS2-Crystal] rclcpp::executors Interrupt guard condition

Hi,

After upgrading to ROS2 crystal clemmys, I am receiving a error message:

Failed to create interrupt guard condition in Executor constructor

The same code was used in ROS bouncy but for some reason I am receiving the above mentioned error on Crystal.

The source of the issue is caused when assigning the executor rclcpp::executors::SingleThreadedExecutor executor;.

I am currently trying to pass arguments on assignment to avoid this error message. Was there any changes to how the executors should be called on crystal?


Update:

I tried to reproduce the error message using a simple example using a pure ROS package. I received a different error message this time but, I believe it something to do with the original issue I am facing.

#include <iostream>
#include "rclcpp/executor.hpp"
#include "std_msgs/msg/string.hpp"
#include "rclcpp/rclcpp.hpp"


    std::shared_ptr<rclcpp::Node> master_node;


        void static topic_callback(std_msgs::msg::String::SharedPtr msg)
      {
        std::cout  <<" Subscriber Received [" << msg->data << "]" << std::endl;
      }


    int main(){
    rclcpp::init(0, nullptr);

    rclcpp::executors::MultiThreadedExecutor executor;
    master_node = rclcpp::Node::make_shared("MasterNode");
    auto subscription_ = master_node->create_subscription<std_msgs::msg::String>("TopicName",topic_callback);

    executor.add_node(master_node);


    executor.spin_node_some(master_node);

    }

Just to give a little background on what I am trying to do. Script A is the main code. I will initialize ROS and create a node in script B.

The std::shared_ptr<rclcpp::Node> master_node; is being saved in a Header file of script B which will be used as a global variable.

Other scrips will use this pointer to create their publishers and subscribers. For example script C will create a publisher publisher_ = master_node->create_publisher<std_msgs::msg::String>("topic"); and script D will subscribe to said publisher or other publishers subscription_ = master_node->create_subscription<std_msgs::msg::String>("TopicName",topic_callback); .

The reason I want to use (Single/Multi)ThreadingExecutor is due to main code's thread being used in other matters.


Update2:

I believe the following is a better representation of my current code.

using rclcpp::executors::MultiThreadedExecutor;



std::shared_ptr<rclcpp::Node> master_node;


    void topic_callback(std_msgs::msg::String::SharedPtr msg)
  {
    std::cout  <<" Subscriber Received [" << msg->data << "]" << std::endl;
  }


int main(){
rclcpp::init(0, nullptr);

MultiThreadedExecutor executor;
master_node = rclcpp::Node::make_shared("MasterNode");
auto subscription_ = master_node->create_subscription<std_msgs::msg::String>("TopicName",topic_callback);

executor.add_node(master_node);
std::thread executor_thread(std::bind(&MultiThreadedExecutor::spin, &executor));
executor_thread.detach();
while(true){
std::cout << "hey" << std::endl;
usleep(3000000);
}
}
2021-03-03 17:58:28 -0500 received badge  Famous Question (source)
2021-02-23 09:11:29 -0500 received badge  Famous Question (source)
2020-11-19 19:48:59 -0500 received badge  Nice Question (source)
2020-08-05 18:28:30 -0500 received badge  Famous Question (source)
2020-08-05 18:28:30 -0500 received badge  Notable Question (source)
2020-05-28 11:30:43 -0500 marked best answer ros2: embedding a msg as a field in a custom msg

Hi,

In ROS, I could import other messages using headers.

Header header
int32 cout
int32 nch
int32 lenght

This way I could include std_msg's stamp and frame_id. Other wise, I have to add them manually but I am not sure if this is ideal or not.

unit32 seq
builtin_interfaces/Time stamp
string frame_id    
int32 count
int32 nch
int32 lenght

I tried using std_msgs/Header header but I received error message.

Message interface 'std_msgs/Header' contains an unknown field type: std_msgs/Header header

I added find_package(std_msgs REQUIRED) to my CMakelist, I am not sure if I am missing anything else

I looked at how other ROS2 msg's used the messages I wanted to use but it seems they are doing it manually as well link text. I was wondering if it would be okay for me to do this too(writing it manually).

2020-05-28 11:30:43 -0500 received badge  Enlightened (source)
2020-05-28 11:30:43 -0500 received badge  Good Answer (source)
2020-05-08 19:12:36 -0500 received badge  Famous Question (source)
2020-04-06 22:52:06 -0500 received badge  Citizen Patrol (source)
2020-03-25 02:55:48 -0500 received badge  Popular Question (source)
2020-03-23 07:44:45 -0500 edited question Gazebo Vacuum Plugin grabbing the center of object

Gazebo Vacuum Plugin grabbing the center of object HI guys, I am trying to utilize the Gazebo Vacuum plugin and I am al

2020-03-23 07:44:13 -0500 edited question Gazebo Vacuum Plugin grabbing the center of object

Gazebo Vacuum Plugin grabbing the center of object HI guys, I am trying to utilize the Gazebo Vacuum plugin and I am al

2020-03-23 07:37:40 -0500 edited question Gazebo Vacuum Plugin grabbing the center of object

Gazebo Vacuum Plugin grabbing the center of object HI guys, I am trying to utilize the Gazebo Vacuum plugin and I am al

2020-03-23 07:29:51 -0500 edited question Gazebo Vacuum Plugin grabbing the center of object

Gazebo Vacuum Plugin grabbing the center of object HI guys, I am trying to utilize the Gazebo Vacuum plugin and I am al

2020-03-23 07:29:23 -0500 edited question Gazebo Vacuum Plugin grabbing the center of object

Gazebo Vacuum Plugin grabbing the center of object HI guys, I am trying to utilize the Gazebo Vacuum plugin and I am al

2020-03-23 07:26:31 -0500 edited question Gazebo Vacuum Plugin grabbing the center of object

Gazebo Vacuum Plugin grabbing the center of object HI guys, I am trying to utilize the Gazebo Vacuum plugin and I am al

2020-03-23 07:24:35 -0500 edited question Gazebo Vacuum Plugin grabbing the center of object

Gazebo Vacuum Plugin grabbing the center of object HI guys, I am trying to utilize the Gazebo Vacuum plugin and I am al

2020-03-23 07:23:19 -0500 asked a question Gazebo Vacuum Plugin grabbing the center of object

Gazebo Vacuum Plugin grabbing the center of object HI guys, I am trying to utilize the Gazebo Vacuum plugin and I am al

2020-03-18 12:39:27 -0500 received badge  Notable Question (source)
2020-03-01 18:55:37 -0500 commented question SolidWorks URDF to Xacro

I just wanted to link the robot base I made in SolidWorks to 2 UR5s. When launching the UR5s in the launch file it conv

2020-03-01 18:50:38 -0500 commented question SolidWorks URDF to Xacro

I just wanted to link the robot base I made in SolidWorks to 2 UR5s. When launching the UR5s in the launch file it conv

2020-02-28 08:51:49 -0500 received badge  Popular Question (source)
2020-02-26 20:03:18 -0500 marked best answer [Kinetic] UR3 overshooting goal using Moveit python api

HI,

For some reason when using the moveit API on python, when executing the code the UR3 overshoots. I am not sure if this is an issue with the code or something else.

Doing some research, I found other users having the same issue but with different robots example: link text

I have attached some information I thought would be useful.

Using: Ros Kinetic Ubuntu 18.04 UR3 Moveit installed by apt-get UR3 Moveit packages installed via apt-get ur_modern_driver installed using catkin make(Using the kinetic branch) My teach pendent speed is set to 100% I am using a tool that weighs 1.2kg. (I set the weight in the teach pendent) Used both the joint goal and tpc goals.

I have also attached my code below.

I believe it is an issue with the planning itself and if it is, I was wondering if there is a way to use the Moveit api to just move to the specified goal and wait until the robot has reached that goal?

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import rospy, sys
import moveit_commander
from geometry_msgs.msg import Pose
from copy import deepcopy
from math import pi 
from moveit_commander.conversions import pose_to_list
import moveit_msgs.msg
import time

moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node('moveit_ur3', anonymous=False)


robot = moveit_commander.RobotCommander()
scene = moveit_commander.PlanningSceneInterface()
group_name = 'manipulator'
group  = moveit_commander.MoveGroupCommander(group_name)

display_trajectory_publisher = rospy.Publisher('/move_group/display_planned_path', moveit_msgs.msg.DisplayTrajectory, queue_size=20)

pose_a = [-1.4873150030719202, -1.5659659544574183, -2.1959059874164026, -0.9785626570331019, 1.5747051239013672, 0.08589393645524979]
pose_b = [-1.5720184485064905, -1.5519183317767542, -2.28664476076235, -0.8552258650409144, -1.5674932638751429, 0.1681944876909256]
pose_c = [-1.5748141447650355, -1.5515945593463343, -2.289560143147604, -0.851447884236471, -3.107366387044088, 0.17082464694976807]
#pose_d = [-1.5748141447650355, -1.5516184012042444, -2.2895482222186487, -0.8514960447894495, -3.1073783079730433, -3.207879130040304]
#pose_e = [-1.5748260656939905, -1.5515826384173792, -2.289499823247091, -0.8514598051654261, 0.00015579492901451886, -6.283077074647075]
#pose_f = [-1.574789826069967, -1.5515945593463343, -2.289572302495138, -0.8514121214496058, -0.005062405263082326, -3.1386335531817835]

def go_to_joint_state():
    joint_goal = group.get_current_joint_values()
    print joint_goal
    #joint_goal[0] = pose_a[0]
    #joint_goal[1] = pose_a[1]
    #joint_goal[2] = pose_a[2]
    #joint_goal[3] = pose_a[3]
    #joint_goal[4] = pose_a[4]
    #joint_goal[5] = pose_a[5]

    group.go(pose_a, wait=True)
    time.sleep(7)
    group.go(pose_b,wait=True)
    time.sleep(7)
    group.stop()

def go_to_pose_goal():
    pose_goal = geometry_msgs.msg.Pose()
    #pose_goal.orientation.w = 0.4900
    pose_goal.position.x = -0.4900
    pose_goal.position.y = 0.4900
    pose_goal.position.z = 0.4900    
    group.set_pose_target(pose_goal)

    group.go(joint_goal, wait=True)
    time.sleep(3)
    group.stop()
    group.clear_pose_targets()

def main():
    go_to_joint_state()

if __name__ == '__main__':
    main()
2020-02-26 20:03:04 -0500 received badge  Notable Question (source)
2020-02-26 20:03:04 -0500 received badge  Popular Question (source)
2020-02-26 20:00:51 -0500 edited question SolidWorks URDF to Xacro

SolidWorks URDF to Xacro Hey guys, I am new to gazebo and Rviz and I am struggling with something. I exported my robo

2020-02-26 20:00:21 -0500 edited question SolidWorks URDF to Xacro

SolidWorks URDF to Xacro Hey guys, I am new to gazebo and Rviz and I am struggling with something. I exported my robo

2020-02-26 19:59:59 -0500 edited question SolidWorks URDF to Xacro

SolidWorks URDF to Xacro Hey guys, I am new to gazebo and Rviz and I am struggling with something. I exported my robo

2020-02-26 19:57:18 -0500 asked a question SolidWorks URDF to Xacro

SolidWorks URDF to Xacro Hey guys, I am new to gazebo and Rviz and I am struggling with something. I exported my robo

2020-02-24 14:10:36 -0500 received badge  Famous Question (source)
2019-08-20 09:03:36 -0500 received badge  Famous Question (source)
2019-08-15 21:45:27 -0500 received badge  Rapid Responder (source)
2019-08-15 21:45:27 -0500 answered a question [Kinetic] UR3 overshooting goal using Moveit python api

Well then, I was able to resolve this issue by lowering the acceleration scaling. In my case: group.set_max_acceleratio

2019-08-15 20:31:29 -0500 edited question [Kinetic] UR3 overshooting goal using Moveit python api

[Kinetic] UR3 overshooting goal using Moveit python api HI, For some reason when using the moveit API on python, when e