Ask Your Question

curi_ROS's profile - activity

2020-11-02 18:27:14 -0500 received badge  Famous Question (source)
2020-10-05 23:58:16 -0500 received badge  Notable Question (source)
2020-08-31 03:22:06 -0500 received badge  Popular Question (source)
2020-08-26 09:44:37 -0500 commented answer Best practices for using ros_control (hardware_interface) to send different data types to a PLC controller?

Thanks for that quick and comprehensive answer! Some follow up questions: 1. Can multiple controller plugins be loaded

2020-08-26 09:44:23 -0500 commented answer Best practices for using ros_control (hardware_interface) to send different data types to a PLC controller?

Thanks for that quick and comprehensive answer! Some follow up questions: 1. Can multiple controller plugins be loaded

2020-08-26 09:05:59 -0500 marked best answer Best practices for using ros_control (hardware_interface) to send different data types to a PLC controller?

image description

I'm using the ROS(Kinetic) navigation stack with an industrial AGV and a Siemens S7 PLC as the central controller. The motors and encoders are interfaced to the PLC. Currently the PLC communicates with ROS over TCP/IP sockets using ros_control and the diff_drive_controller plugin. This has worked well so far to receive odom feedback and send the corresponding wheel velocity commands.

Now I plan to send some extra information to the PLC, such as current waypoint, pose, goal status etc as part of the “telegram” (in the Write method). This additional data may not really make sense to be represented in the joint space so I’m unsure if a custom hardware interface such as the ones written for force-torque sensors, IMUs etc might make sense here. This information is internally published on various topics from different nodes and has to be inserted into the PC-PLC real time communication.

My understanding is that the controller plugin has to implement all the ROS related non realtime communication so that it is real time safe. The read and write methods implement the realtime specific communication to and from the hardware.

  1. Could I introduce multiple subscribers in the diff_drive_controller plugin to gather this extra data from the ROS side? I notice that the cmd_vel callback in diff_drive_controller uses a Command object to “writeFromNonRT”.

  2. Could I extend this struct to include other datatypes and perform a similar write function from multiple subscriber callbacks? If so, is there a way to ensure all of the callbacks are executed within the control loop “update” cycle? Or am I over complicating this?

How do I go about achieving this in a way that can be easily extended for newer data that I might want to send to the hardware (PLC)?

2020-08-26 08:05:00 -0500 received badge  Famous Question (source)
2020-08-26 07:48:44 -0500 asked a question Best practices for using ros_control (hardware_interface) to send different data types to a PLC controller?

Best practices for using ros_control (hardware_interface) to send different data types to a PLC controller? I'm usin

2020-07-02 07:01:26 -0500 marked best answer Getting descriptive outcomes from ExePathAction

I am trying to design some recovery behaviors for a bot following a set of waypoints, with velocities issued by TEB. I am using ExePathAction to start the navigation with TEB.

I would like to know when the path is blocked (BLOCKED_PATH = 109) in order to trigger either a GetPathAction until the next waypoint, or maybe some other recovery behaviour.

Are the descriptive outcomes + messages already implemented in MBF? Or do these descriptive outcomes have to be implemented in the controller (in this case: TEBLocalPlannerROS)? Or should it be implemented by extending some function of the controller_action or abstract_controller_execution?

Thank you for your time, any help will be appreciated! :)

2020-02-17 16:55:56 -0500 received badge  Student (source)
2019-09-16 15:19:40 -0500 received badge  Famous Question (source)
2019-08-08 12:27:58 -0500 received badge  Famous Question (source)
2019-08-05 08:12:41 -0500 received badge  Famous Question (source)
2019-07-25 08:21:07 -0500 received badge  Famous Question (source)
2019-07-23 06:22:56 -0500 received badge  Taxonomist
2019-07-15 03:31:45 -0500 commented question Avoid to hit corners using A* algorithm

which local planner are you using?

2019-07-10 03:31:01 -0500 received badge  Notable Question (source)
2019-06-11 03:30:00 -0500 commented answer Custom Global Path

Shouldn't it be /mbf_costmap_nav/exe_path?

2019-06-06 18:02:29 -0500 received badge  Famous Question (source)
2019-06-03 00:16:26 -0500 commented question How to get all position in a map (SLAM) for robot to go to?

can you already visualise the map on Rviz?

2019-05-31 00:49:25 -0500 edited answer How can I make a robot which could drive autonomously in a given map (made using hector slam and lidar) if i give it a ending point.

Please follow the Navigation Tutorials. EDIT I'm not aware of any such tutorial. Your motor driver should give you v

2019-05-29 10:46:59 -0500 received badge  Nice Answer (source)
2019-05-29 08:27:59 -0500 answered a question How can I make a robot which could drive autonomously in a given map (made using hector slam and lidar) if i give it a ending point.

Please follow the Navigation Tutorials.

2019-05-24 12:02:50 -0500 received badge  Nice Answer (source)
2019-05-24 04:52:14 -0500 commented question How to create subscriber to get USB2 camera images

You need to do rosrun image_view image_view image:=/cam0/arducam/camera/image_raw. Image_view subscribes to topic image

2019-05-24 04:45:56 -0500 commented question How to create subscriber to get USB2 camera images

You need to do rosrun image_view image_view image:=/cam0/arducam/camera/image_raw. Image_view subscribes to topic image

2019-05-24 04:45:26 -0500 commented question How to create subscriber to get USB2 camera images

You need to do rosrun image_view image_view image:=/cam0/arducam/camera/image_raw. Image_view subscribes to topic image

2019-05-24 04:13:00 -0500 commented question How to create subscriber to get USB2 camera images

Can you already visualise the image data in image_view as suggested in the link you added?

2019-05-24 04:00:53 -0500 answered a question Question about laserscan and hector_slam mapping

In RViz->Displays->Laser Scan->Color Transformer, you can set the laser scan colours to reflect the intensity o

2019-05-22 05:27:41 -0500 received badge  Teacher (source)
2019-05-22 04:56:15 -0500 commented answer How to publish a map frame?

SLAM is not always a replacement for an odometry source. You are using robot_localization with visual odometry sources t

2019-05-22 03:23:42 -0500 commented question How to publish a map frame?

Could you also post your tf tree when you are running your simulation on Gazebo?

2019-05-22 03:22:29 -0500 answered a question How to publish a map frame?

Map server doesn't actually provide a map frame. It provides the data on the topic /map with a desired frame_id in the h

2019-05-21 03:48:50 -0500 commented question Why does rospy::wait_for_message get stucked even though messages are being published?

wait_for_message is explicitly meant to get just one message on the topic. Does it detect at least one message? If you

2019-05-21 03:37:02 -0500 received badge  Notable Question (source)
2019-05-21 01:47:44 -0500 received badge  Popular Question (source)
2019-05-18 10:20:27 -0500 commented question Using teb_local_planner with via_points and obstacle avoidance

This seems interesting, is there any documentation you have created for this that might help me follow it better? For ex

2019-05-17 06:06:48 -0500 commented question Is it possible to move a robot using odom without localiation but using actions particularly actionlib ?

You don't actually need actionlib to do drive using only odometry. You can subscribe to your vehicle's odometry, and pub

2019-05-17 02:43:24 -0500 commented question Can I perform Hector Navigation using ROS kinetic?

The navigation tutorials are the best place to start.

2019-05-17 02:39:23 -0500 commented question Can one node be a client for several action/service servers?

does the answer to this question help?

2019-05-17 02:22:40 -0500 commented question Using teb_local_planner with via_points and obstacle avoidance

@croesmann could you have a look at this?

2019-05-17 02:21:41 -0500 asked a question Using teb_local_planner with via_points and obstacle avoidance

Using teb_local_planner with via_points and obstacle avoidance I'm using ROS Kinetic on a real 2-wheel differential driv

2019-05-16 03:33:49 -0500 received badge  Popular Question (source)
2019-05-15 05:58:14 -0500 marked best answer Stopping std::threads in ROS

I am trying to stop two threads from within a while loop but it doesn't stop on the Ctrl+C (SIGINT).How do I terminate the threads on receiving Ctrl+C from CLI? Would an AsyncSpinner help me here? I do not understand the syntax implementation of AsyncSpinner, specifically how to assign a method to a thread spun by it (as I have been able to do with std::threads below).

void Listener::spin(int sockfd){

int n;
sock_fd_ = sockfd;
ros::Rate loop_rate(MESSAGE_FREQ);      // set the rate as defined in the macro MESSAGE_FREQ

while(ros::ok) {          

    loop_rate.sleep();

    std::thread t_write(&Listener::getMessageValue, this); //writes data onto tcp socket
    std::thread t_read(&Listener::readBuffer, this);  // reads data from tcp socket

    t_write.join();
    t_read.join();        

    ros::spinOnce();

   }  

   n = close(sock_fd_);

}

This is being called in the main like this:

int main(int argc, char *argv[]) {
     .... 
    listener.spin(sockfd);
    return 0;
}