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

zweistein's profile - activity

2020-04-27 01:45:59 -0500 received badge  Famous Question (source)
2020-04-20 18:14:02 -0500 received badge  Enlightened (source)
2020-04-20 18:14:02 -0500 received badge  Good Answer (source)
2020-01-03 05:42:53 -0500 received badge  Nice Answer (source)
2019-11-07 09:07:18 -0500 commented question unindexed bag using RQT

I have the same problem. Did you record /rosout and /rosout_agg? I only recorded some of the active topics.

2019-08-22 07:45:07 -0500 received badge  Famous Question (source)
2019-05-26 16:16:27 -0500 received badge  Nice Question (source)
2019-02-18 08:15:47 -0500 commented answer Get DH parameters from URDF

On the linked page, only the Jacobian values are given and no DH params... how should one generate that output?

2018-06-28 04:06:15 -0500 received badge  Notable Question (source)
2018-06-28 04:06:15 -0500 received badge  Popular Question (source)
2018-04-13 07:53:15 -0500 commented answer Raspberry Pi 2, ROS and GPIO access

I have the same issue but exporting the pin is not helping: $ gpio export 17 out, same error: wiringPinSetup: Must be ro

2017-12-04 09:32:45 -0500 received badge  Nice Answer (source)
2017-12-04 09:30:39 -0500 marked best answer MoveGroup init object issue

In Moveit there is the MoveGroup class used to control a group of links and joints. In official tutorial is showed an initialization of the object in the main like:

moveit::planning_interface::MoveGroup group("arm");

I would like to create a service call, which executes some movement of the arm. How can I create/initialize the MoveGroup object such that it is visible (e.g. as global variable) to the service callback function and also visible for other functions? The constructor of the MoveGroup is defined like this:

/** \brief Construct a client for the MoveGroup action using a specified set of options \e opt. Optionally, specify a TF instance to use. If not specified, one will be constructed internally. A timeout for connecting to the action server can also be specified. If it is not specified, the wait time is unlimited. */
  MoveGroup(const Options &opt, const boost::shared_ptr<tf::Transformer> &tf = boost::shared_ptr<tf::Transformer>(), const ros::Duration &wait_for_server = ros::Duration(0, 0));

  /** \brief Construct a client for the MoveGroup action for a particular \e group. Optionally, specify a TF instance to use. If not specified, one will be constructed internally. A timeout for connecting to the action server can also be specified. If it is not specified,   the wait time is unlimited. */
  MoveGroup(const std::string &group, const boost::shared_ptr<tf::Transformer> &tf = boost::shared_ptr<tf::Transformer>(), const ros::Duration &wait_for_server = ros::Duration(0, 0));

I also tired to create my own class that has a MoveGroup argument, but I couldn't initialize in the constructor like:

group = new moveit::planning_interface::MoveGroup("arm");

Error at build is:

/home/elod/catkin_ws/src/arm_control/arm_action_server/src/main.cpp:36:39: error: no matching function for call to ‘moveit::planning_interface::MoveGroup::MoveGroup()’
 moveit::planning_interface::MoveGroup group;
                                       ^
/home/elod/catkin_ws/src/arm_control/arm_action_server/src/main.cpp:36:39: note: candidates are:
In file included from /home/elod/catkin_ws/src/arm_control/arm_action_server/src/main.cpp:9:0:
/opt/ros/indigo/include/moveit/move_group_interface/move_group.h:122:3: note: moveit::planning_interface::MoveGroup::MoveGroup(const string&, const boost::shared_ptr<tf::Transformer>&, const ros::Duration&)
   MoveGroup(const std::string &group, const boost::shared_ptr<tf::Transformer> &tf = boost::shared_ptr<tf::Transformer>(),
   ^
/opt/ros/indigo/include/moveit/move_group_interface/move_group.h:122:3: note:   candidate expects 3 arguments, 0 provided
/opt/ros/indigo/include/moveit/move_group_interface/move_group.h:116:3: note: moveit::planning_interface::MoveGroup::MoveGroup(const moveit::planning_interface::MoveGroup::Options&, const boost::shared_ptr<tf::Transformer>&, const ros::Duration&)
   MoveGroup(const Options &opt, const boost::shared_ptr<tf::Transformer> &tf = boost::shared_ptr<tf::Transformer>(),
   ^
/opt/ros/indigo/include/moveit/move_group_interface/move_group.h:116:3: note:   candidate expects 3 arguments, 0 provided
In file included from /home/elod/catkin_ws/src/arm_control/arm_action_server/src/main.cpp:9:0:
/opt/ros/indigo/include/moveit/move_group_interface/move_group.h:69:7: note: moveit::planning_interface::MoveGroup::MoveGroup(const moveit::planning_interface::MoveGroup&)
 class MoveGroup
       ^
/opt/ros/indigo/include/moveit/move_group_interface/move_group.h:69:7: note:   candidate expects 1 argument, 0 provided
make[2]: *** [CMakeFiles/arm_action.dir/src/main.cpp ...
(more)
2017-11-18 04:20:28 -0500 received badge  Necromancer (source)
2017-09-06 06:01:55 -0500 received badge  Self-Learner (source)
2017-02-24 02:13:44 -0500 received badge  Notable Question (source)
2017-02-24 02:13:44 -0500 received badge  Popular Question (source)
2017-02-17 15:23:40 -0500 marked best answer service waiting for a subscriber msg

I would like to have a Service server that upon request takes the next available camera image from the topic /raw_image and returns the position of a red blob. I would like to do this with a detector class, but I'm not sure how to do the conditoning: when client request received than process the next available video frame and send the response

My code so far:

class SwitchState_Detector
{
public:
    explicit SwitchState_Detector(ros::NodeHandle *nh);
    ~SwitchState_Detector();
    void image_callback(const sensor_msgs::ImageConstPtr &original_image);
    bool find_redBlob(cv::Mat input_image, cv::Mat output_image);
private:
    image_transport::Subscriber sub;
    cv::Mat I;                                       //OpeCV image
    std::string filename;                            //calibration file path
    cv::Mat *intrinsics;                             //camera intrinsics
    cv::Mat *distortion_coeff;                       //camera distortion coeffs
    cv::Size *image_size;  
}
SwitchState_Detector::SwitchState_Detector(ros::NodeHandle *nh) 
{
    image_transport::ImageTransport it(nh);
    sub = it.subscribe("/image_raw", 1, &SwitchState_Detector::image_callback, this);
}

SwitchState_Detector::~SwitchState_Detector()
{
    delete intrinsics;
    delete distortion_coeff;
    delete image_size;
}

void
SwitchState_Detector::image_callback(const sensor_msgs::ImageConstPtr &original_image)
{
  //ROS Image to Mat structure
  cv_bridge::CvImagePtr cv_ptr;
  try
  {
    cv_ptr = cv_bridge::toCvCopy(original_image, enc::BGR8);
  }
  catch (cv_bridge::Exception& e)
  {
    ROS_ERROR("red_ball_detection::cv_bridge_exception %s", e.what());
    return;
  }
  I = cv_ptr->image;

   imshow("RGB", I);
   cv::waitKey(10);

}

double find_redBlob(cv::Mat input_image, cv::Mat output_image)
{
     // do the processing and calculations on Mat I received after the request was issued from a client
    // This Part I don't know how to condition that a fresh image was received.
return blob_size;
}

main(int argc, char *argv[])
{
  ros::init(argc, argv, "switch_state_detection");
  ros::NodeHandle nh;

  SwitchState_Detector detector(&nh);

  ros::ServiceServer service = nh.advertiseService("detect_switch_state", &SwitchState_Detector::find_redBlob, &detector);

  ros::spin();

  return(0);
}
2017-02-17 15:23:09 -0500 received badge  Famous Question (source)
2017-02-16 06:45:24 -0500 answered a question catkin_make can't seem to find package joyConfig

I had a similar issue, simple solution (maybe not the cleanest) install all pcl and joy related pkgs, like:

$ sudo apt-get install ros-indigo-joy*

The *Config.cmake missing error massage suggest that the linker can't find some pkg.

2017-01-05 03:53:00 -0500 marked best answer how to send empty message?

Hey,

I'm working with an Ar Drone and i would like to send from my node a command to the helicopter to take off. The command in terminal is given(works): rostopic pub /ardrone/takeoff std_msgs/Empty

I try to send an empty msg from my node but the drone does not take off and i do not get an echo of the msg. What am I missing? or what is wrong with my code? My code is:

#include <std_msgs/Empty.h>

int main(int argc, char **argv){

init(argc, argv, "takeoff_fly");
Nodehandle n;
std_msg::Empty myMsg;
Publisher takeOff=n.advertise<std_msgs::Empty>("/ardrone/takeoff",1);
takeOff.publish(myMsg);
spinOnce();

return 0;
}
2016-11-01 04:40:36 -0500 commented question Dynamixel multiple motor speed controller

I just add this feature and pushed to the repo. I did not test if it works well, so please let me know if there is any problem with it.

2016-10-31 14:10:56 -0500 answered a question Dynamixel multiple motor speed controller

I'v created a joint velocity controller and a multiple joint velocity controller, the modified dynamixel_motor pkg can be found here: https://bitbucket.org/ElodP/dynamixel...

Details are in the README. For more information feel free to contact me.

Notice: Min Angle (CW) and Max Angle (CCW) *are not the same as *minAngle and maxAngle parameters. The first pair is the original parameters for CW and CCW, while the second pair of params are specific for my velocity controller applied on a robot arm that has physical angle limits.

2016-10-31 14:05:35 -0500 commented question Dynamixel multiple motor speed controller

In a yam save motor parameters e.g. JointSpeedController_2motors.yam, in the control_spawner create only one and the controller_manager can be the same as int he 2 motor example. Check out the tutorial http://wiki.ros.org/dynamixel_control...

2016-10-31 08:45:48 -0500 commented question Dynamixel multiple motor speed controller

I created a modified dynamixel_motor driver, you can find it here: https://bitbucket.org/ElodP/dynamixel...

2016-10-28 06:10:41 -0500 commented question dynamixel torque controller does not move ax12 servo

Did you managed to implement the driver? If so, would you share it or help me to implement it?

2016-10-28 06:09:39 -0500 commented answer dynamixel torque controller does not move ax12 servo

Could you elaborate in more details what did you mean by closed loop compensation?

2016-06-29 07:37:13 -0500 marked best answer How to re-initiate simulation Gazebo & Rviz

I have a UAV simulation lounched like: roslaunch cvg_sim_test track.launch. i'm using Fuerte on ubuntu 12.04.

The position of the drone is set in the launch file. I want to put the drone back to its initial position the position of the drone. How can i do that without restarting the simulation?

2016-06-29 07:37:13 -0500 received badge  Nice Answer (source)
2016-05-10 09:25:20 -0500 received badge  Famous Question (source)
2016-04-27 03:40:58 -0500 asked a question Simulink MultiArray message generation

How can I create a publisher that in Simulink (Matlab R2015A) that sends an array of floats? I should use the BlankMSG block with msg type: std_msgs/Float32MultiArray, a Publish block with the same msg type and my own topic name.

I don't know how to add the vector to the data field on the msg bus. I tired, with a Bus Assignment block where the data input is a constant vector, but I got an error:

The Bus input port of the Bus Assignment block 'SubscriberMotorStates/Bus Assignment' does not support an array of buses as a sub-element. image description

UPDATE

I tried in Matlab to send an array and did work by following the instructions.

chatpub = rospublisher('/chatter','std_msgs/Float64MultiArray');
msg = rosmessage(chatpub);
msg.Data = [1 2 3];
send(chatpub,msg);

So, I can also use in simulink this by implementing a function in an *.m file and use the Interpreted MATLAB function block.

I'm still curious how can I use the intended blocks for array message sending, because it might be better optimized. (I'm going to use in a real application)

2016-04-11 03:09:09 -0500 received badge  Famous Question (source)
2016-03-18 17:45:38 -0500 received badge  Notable Question (source)
2016-03-18 17:45:38 -0500 received badge  Famous Question (source)
2016-03-07 22:52:33 -0500 received badge  Notable Question (source)
2016-03-07 09:24:52 -0500 received badge  Popular Question (source)
2016-02-24 04:18:02 -0500 asked a question Dynamixel multiple motor speed controller

I would like to control some dynamixel motors (namely MX 28 and MX 64) by there speed while not using 'goal_position'. In the documentation is mentioned the Wheel Mode (by setting CW = 0 and CCW =0) which I suppose is designed for my needs.

I can't find any joint_speed_controller in the dynamixel_motor pkg. Did anyone found or wrote its own joint speed controller?

If not, I'v seen the functions set_speed(self, servo_id, speed) in dynamixel_io.py but I'm not sure what is required to be set in a jont_speed_controller node. Can someone help me in this?

UPDATE

I found the solution to control a single motor velocity, but now I'm interested if I would be able to control multiple motor velocities with a single controller. In the dynamixel_io.py there is a function: def set_multi_speed(self, valueTuples) which should be used for this task.

My main question is, should I reuse the already existing JointController class or build one on my own?

2016-02-23 09:38:12 -0500 commented question I am passionate about learning ROS and i am a beginner.I don't know where to start and how to start. can someone help me out in learning this software.

Please rephrase the post (title and body). Never late to learn nor to correct our mistakes.

2016-02-23 09:36:10 -0500 received badge  Critic (source)